Endpoints
Get build status
GET
https://sources.graphorlm.com/builds/{build_id}Poll status and optional parsed elements for an async ingestionIngest file
POST
https://sources.graphorlm.com/ingest-fileUpload a local file; processing runs in the backgroundIngest 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 theAuthorization header.
Learn how to create and manage API tokens in the API Tokens guide.
Async ingestion flow
- 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. - Poll GET
/builds/{build_id}to check status. WhenstatusisCompleted, the source is ready; whenstatusindicates failure, check theerrorfield. - 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
HTTP Method
GET
Endpoint URL
Path parameter
| Parameter | Type | Description |
|---|---|---|
build_id | string | The build identifier returned when the job was scheduled |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
suppress_elements | boolean | false | When true, elements are omitted from the response |
suppress_img_base64 | boolean | false | When true, img_base64 is omitted from each element |
page | integer | — | 1-based page number (use with page_size for pagination) |
page_size | integer | — | Number of elements per page (max 100) |
Success response (200 OK)
When the build has been persisted (history exists), the response includes status and optional metadata:Response fields
| Field | Type | Description |
|---|---|---|
build_id | string | The requested build identifier |
status | string | Pending, Processing, Completed, Processing failed, or not_found when no history exists |
success | boolean | true only when status is Completed |
file_id | string | null | Source file ID; present when the build has been persisted |
file_name | string | null | Display name of the source; present when persisted |
error | string | null | Error message from the pipeline when the build failed |
method | string | null | Strategy used (e.g. fast, balanced, accurate, vlm, agentic) |
total_partitions | integer | null | Number of partitions; present when history exists |
total_pages | integer | null | Total pages in the source; present when history exists |
created_at | string | null | ISO8601 timestamp when the build was created |
updated_at | string | null | ISO8601 timestamp when the build was last updated |
message | string | null | Human-readable message (e.g. when status is not_found) |
elements | array | null | Parsed elements (chunks) when suppress_elements=false and build completed |
total_elements | integer | null | Total number of elements (when elements are returned) |
page | integer | null | Current page of elements (1-based) when pagination is used |
page_size | integer | null | Elements per page when pagination is used |
total_pages_elements | integer | null | Total pages of elements when pagination is used |
Code example: poll until complete
Poll untilsuccess 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
HTTP Method
POST
Endpoint URL
Request format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | multipart/form-data | Yes |
Request body (multipart/form-data)
| Field | Type | Description | Required |
|---|---|---|---|
file | File | The document file to upload | Yes |
method | string | Processing method: fast, balanced, accurate, vlm, or agentic (see Partition methods) | No |
Partition methods
When provided,partition_method controls how the document is parsed. If omitted, the system default is used.
| Value | Name | Description |
|---|---|---|
fast | Fast | Fast processing with heuristic classification. No OCR. |
balanced | Balanced | OCR-based extraction with structure classification. |
accurate | Accurate | Fine-tuned model for highest accuracy (Premium). |
vlm | VLM | Best for manuscripts and handwritten content. |
agentic | Agentic | Highest accuracy for complex layouts, tables, and diagrams. |
For more details, see the Process Source documentation.
File requirements
Supported file types
Supported file types
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
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
File size limits
File size limits
Maximum file size: 100 MB per file.
The request must include a
The request must include a
Content-Length header so the server can enforce the limit.File name requirements
File name requirements
The file must have a valid filename with extension; the extension determines allowed processing.
Success response (200 OK)
Response fields
| Field | Type | Description |
|---|---|---|
build_id | string | Use this ID to poll Get build status |
success | boolean | Whether the request was successfully scheduled |
error | string | null | Error message if the request was not scheduled successfully |
Code examples
JavaScript/Node.js
Python
cURL
cURL with partition method
Error responses
| Status Code | Description |
|---|---|
400 | Unsupported file type or missing file name |
411 | Missing Content-Length header |
413 | File exceeds 100 MB limit |
500 | Internal server error |
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
Endpoint URL
Request format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Request body (JSON)
| Field | Type | Description | Required |
|---|---|---|---|
url | string | The web page URL to ingest | Yes |
crawlUrls | boolean | When true, follow and ingest links found on the page (ignored when URL resolves to a file) | No (default: false) |
method | string | One of: fast, balanced, accurate, vlm, agentic | No |
Success response (200 OK)
Code examples
JavaScript/Node.js
Python
cURL
Error responses
| Status Code | Description |
|---|---|
400 | Unsupported file type detected from a file URL |
500 | Internal server error during URL processing |
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
HTTP Method
POST
Endpoint URL
Request format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Request body (JSON)
| Field | Type | Description | Required |
|---|---|---|---|
url | string | GitHub repository URL (e.g. https://github.com/owner/repo) | Yes |
Success response (200 OK)
Code examples
JavaScript/Node.js
Python
cURL
Error responses
| Status Code | Description |
|---|---|
500 | Internal server error during GitHub processing |
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
HTTP Method
POST
Endpoint URL
Request format
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Request body (JSON)
| Field | Type | Description | Required |
|---|---|---|---|
url | string | YouTube video URL (e.g. https://www.youtube.com/watch?v=...) | Yes |
Success response (200 OK)
Code examples
JavaScript/Node.js
Python
cURL
Error responses
| Status Code | Description |
|---|---|
500 | Internal server error during YouTube processing |
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), storefile_idfor 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 statusCompleted):
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

