Skip to main content
The Index build endpoint chunks, embeds, and indexes an existing build from its already-parsed content — without re-parsing the document. It is the way out of indexing: 'none': after ingesting or re-processing a source with indexing: 'none', call this endpoint to make the source searchable.

Endpoint overview

HTTP Method

POST

Authentication

This endpoint requires authentication using an API token. Include your API token as a Bearer token in the Authorization header.
Learn how to create and manage API tokens in the API Tokens guide.

Request format

Headers

Request body

Send a JSON body with the following fields:

Behavior

  • Chunks, embeds, and indexes the build’s persisted partitions — the document is not re-parsed.
  • Makes the build the source’s active build.
  • Sets the build’s indexing level to full.
  • Afterwards, ask, extraction, and prebuilt RAG retrieval see the source, and Get build status reports searchable: true.
The request is synchronous — the response arrives when indexing has finished. For large documents the connection is kept alive with whitespace heartbeats that JSON parsers ignore, so no client changes are needed.

Request example

With a specific build:

Response format

Success response (200 OK)

Response fields

Code examples

JavaScript/Node.js

Python

cURL

Error responses

Common error codes

Error response format

Error examples

Cause: The deployment does not support indexing through this endpoint.
Solution: Check GET https://sources.graphorlm.com/config — see Deployment support.
Cause: The build is still pending or processing.
Solution: Poll Get build status until the build reaches a settled status, then retry.
Cause: The build produced no parsed content to index.
Solution: Re-process the source (see Reprocess) and check the build’s error field.
Cause: The build is already indexed; there is nothing to do.
Solution: None needed — the source is already searchable. The response detail says so.
Cause: The given file_id (or build_id) does not exist in your project.
Solution: Verify the IDs (e.g. from List sources or a previous build status response).

Best practices

  • Ingest with indexing: 'none' first: Use this endpoint as the second step of a two-phase flow — parse fast without indexing, review the parse results, then index only the sources you keep.
  • Allow generous timeouts: Indexing is synchronous; large documents take longer. The heartbeats keep the connection alive, but set a generous client timeout anyway.
  • Verify with build status: After a successful call, Get build status reports searchable: true for the build.

Next steps

Get build status

Confirm the build is now active and searchable: true

Ingest sources

Upload files, URLs, GitHub repos, or YouTube videos — with enrichment and indexing options

Reprocess source

Re-run the ingestion pipeline with a different partition method

List sources

View all sources and their status in your project