Skip to main content
Uploading a document creates a Source, the platform’s representation of your file. After upload, an asynchronous extraction pipeline converts the file into structured page texts. You’ll poll for status and then retrieve the extracted content.
Prerequisites:
  • Authentication configured (see Authentication guide)
1

Upload a file

Send a multipart form-data request with your file. The server starts extraction automatically and returns the source metadata.Endpoint: POST /api/sources/upload
Response:
2

Check extraction status

Poll the source until extraction_status reaches a terminal state: extracted (success), attention_required (partial: some pages failed but the source is still indexable), failed, or cancelled. Small documents typically take a few seconds.Endpoint: GET /api/sources/{id}
3

View extracted content

Retrieve the extracted text. GET /page-texts returns { "page_texts": [string, ...], "count": N }, where page_texts is an array of strings, one per page, in order. To fetch a single page, pass ?page=N, which returns { "text": string, "page": N, "count": N }.Endpoint: GET /api/sources/{id}/page-texts

What’s Next

Create a Knowledge Base

Index your extracted content for semantic search.

Sources & Extraction

Understand the extraction pipeline in depth.

Sources API Reference

Full endpoint documentation.