Skip to main content
This page documents Graphor’s source ingestion endpoints. All ingestion is asynchronous: you send a request, receive a build ID immediately, and then poll the build status endpoint until processing completes. Use these endpoints to add content to your project — whether that content is a local file, a public web page URL, a public GitHub repository, or a public YouTube video.

Endpoints

Get build status

GET https://sources.graphorlm.com/builds/{build_id}Poll status and optional parsed elements for an async ingestion

Ingest file

POST https://sources.graphorlm.com/ingest-fileUpload a local file; processing runs in the background

Ingest URL

POST https://sources.graphorlm.com/ingest-urlIngest a public web page by URL (async)

Ingest GitHub

POST https://sources.graphorlm.com/ingest-githubIngest a public GitHub repository (async)

Ingest YouTube

POST https://sources.graphorlm.com/ingest-youtubeIngest a public YouTube video (async)

Authentication

All endpoints on this page require 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.

Async ingestion flow

  1. Call one of the ingest endpoints (file, URL, GitHub, or YouTube). The request is validated and the job is scheduled; the response returns immediately with a build_id.
  2. Poll GET /builds/{build_id} to check status. When status is Completed, the source is ready; when status indicates failure, check the error field.
  3. Use the returned file_id (once the build has completed) for subsequent API calls (ask, extract, retrieve, delete, etc.).
The Get build status endpoint can also return paginated parsed elements (chunks) for a completed build when you do not set suppress_elements=true.

Get build status

Use this endpoint to poll the result of an async ingestion (or re-process). The build_id is returned by:
  • POST /ingest-file
  • POST /ingest-url
  • POST /ingest-github
  • POST /ingest-youtube
  • POST /reprocess (re-process)

Endpoint overview

Path parameter

Query parameters

Success response (200 OK)

When the build has been persisted (history exists), the response includes status and optional metadata:
When the build is pending (request received but build has not started yet):
When the build is still in progress (running):

Response fields

Code example: poll until complete

Poll until success is true. While status is Pending (request received, build not started) or Processing, keep polling. Only treat Processing failed or a non-null error (when status is not not_found) as failure.

Ingest file

Upload a local file and schedule ingestion in the background. The API validates size (max 100 MB) and extension, stores the file, then runs the full pipeline (partitioning, chunking, embedding) asynchronously.

Endpoint overview

Request format

Headers

Request body (multipart/form-data)

Partition methods

When provided, partition_method controls how the document is parsed. If omitted, the system default is used.
For more details, see the Process Source documentation.

File requirements

Documents: PDF, DOC, DOCX, ODT, TXT, TEXT, MD, HTML, HTM
Presentations: PPT, PPTX
Spreadsheets: CSV, TSV, XLS, XLSX
Images: PNG, JPG, JPEG, TIFF, BMP, HEIC
Audio: MP3, WAV, M4A, OGG, FLAC
Video: MP4, MOV, AVI, MKV, WEBM
Maximum file size: 100 MB per file.
The request must include a Content-Length header so the server can enforce the limit.
The file must have a valid filename with extension; the extension determines allowed processing.

Success response (200 OK)

Response fields

Code examples

JavaScript/Node.js

Python

cURL

cURL with partition method

Error responses

Example error body:

Ingest URL

Ingest a web page (or multiple pages via crawling) as a source. The job runs in the background; use the returned build_id to poll Get build status. If the URL points to a downloadable file (by extension or Content-Type), the file is downloaded and then processed in the background.

Endpoint overview

HTTP Method

POST

Request format

Headers

Request body (JSON)

Success response (200 OK)

Code examples

JavaScript/Node.js

Python

cURL

Error responses

To ingest local files (PDF, DOCX, etc.), use Ingest file.

Ingest GitHub

Ingest a public GitHub repository as a source. Processing runs in the background; use the returned build_id with Get build status.

Endpoint overview

Request format

Headers

Request body (JSON)

Success response (200 OK)

Code examples

JavaScript/Node.js

Python

cURL

Error responses

Only public repositories are supported.

Ingest YouTube

Ingest a public YouTube video (transcript/captions) as a source. Processing runs in the background; use the returned build_id with Get build status.

Endpoint overview

Request format

Headers

Request body (JSON)

Success response (200 OK)

Code examples

JavaScript/Node.js

Python

cURL

Error responses

The video must be public; transcripts/captions are downloaded and processed in the background.

Best practices

  • Poll with backoff: When polling Get build status, use a reasonable interval (e.g. 2–5 seconds) and a timeout to avoid tight loops.
  • Store file_id: Once the build completes (success: true), store file_id for use with ask, extract, retrieve, delete, and list elements.
  • Validate before upload: Check file type and size client-side before calling Ingest file.
  • Protect API tokens: Never expose tokens in client-side code or public repositories; use HTTPS only.

Next steps

After ingestion completes (build status Completed):

Parse source

Re-process a source with a different partition method (async; returns a new build_id)

List sources

List all sources in your project

Get elements

Retrieve parsed elements (chunks) for a source

Delete source

Remove a source from your project