Read file

Read contents from a file. <Info>This acts on files in the AI Hub filesystem, not your local filesystem.</Info> <Note>Ensure the path is accessible within the context defined by the `IB-Context` header.</Note>

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

pathstringRequired
Full path to the file.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

RangestringOptional

The portion of the file to read. A single HTTP byte range, with inclusive bounds and a non-negative start value. If not provided, return the entire file. Example: bytes=0-4

IB-Retry-ConfigstringOptional

Configures retry logic if no file is found at the target path. Uses a constant backoff algorithm. Don’t retry if this header isn’t provided. Example: {retries:3,backoff-seconds:5}

Query parameters

expect-node-typeenumRequired
Type of node at the target path.
Allowed values:

Response headers

Content-Typestring
Content-Lengthinteger

Response

Indicates that the response contains the entire file contents.