For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
OverviewApp editorFlow editorAdminAPI & SDK
  • Overview
    • Using the API and SDK
    • Authorization
    • Response statuses
  • API & SDK guides
    • Run automation apps by SDK
  • API reference
      • GETRead file
      • PUTCreate or overwrite file
      • HEADRead file or folder metadata
      • DELDelete file or folder
  • Legacy APIs
    • Job status
    • Run apps
    • Run results
    • Mount
AI Hub
API referenceFiles

Read file

GET
https://aihub.instabase.com/api/v2/files/:path
GET
/api/v2/files/:path
$curl "${API_ROOT}/v2/files/<FILE-PATH>?expect-node-type=file" \
> -H "Authorization: Bearer ${API_TOKEN}" \
> -H "IB-Context: ${IB_CONTEXT}"
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>
Was this page helpful?
Previous

Create or overwrite file

Next
Built with

Read contents from a file.

This acts on files in the AI Hub filesystem, not your local filesystem.
Ensure the path is accessible within the context defined by the IB-Context header.

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.