Skip to navigation

Ingesting Documents

For direct API calls, choose an ingest method:

The supported SDKs provide an ingest method for local and remote documents.

Ingest

The options below are for the Python SDK. The TypeScript example passes the document array directly to ingest().

documents
arrayRequired

An array of Document objects.

wait_for_complete
bool

Waits until ingest completes when true. Default is false.

batch_size
int

Maximum files per batch when wait_for_complete is true. The default is 10, with a standard range of 1 to 50. When wait_for_complete is false, the SDK sends one batch of up to 50 files by default.

upload_api
str

Optional legacy endpoint for local uploads. It returns a presigned upload URL in the JSON key URL. By default, local uploads use POST /v1/bucket/{bucketId}/file-upload on the configured GroundX API.

callback_url
str

An endpoint that receives processing updates through POST requests. See Receiving callbacks.

callback_data
str

A string included in processing updates sent to the callback URL.

Document

bucketId
integerRequired

The ID of the destination bucket. Python uses bucket_id.

filePath
stringRequired

The document’s local file path or remote URL. Python uses file_path.

fileName
string

The file’s display name. Python uses file_name.

fileType
enum

A supported document type. Python uses file_type.

filter
object

Key-value metadata used to restrict which documents a search can return.

processLevel
enum

The processing level for document chunks. Default is full. Python uses process_level.

searchData
object

Custom metadata used to improve search ranking. Python uses search_data.

Receiving callbacks

GroundX does not sign or authenticate callbacks, so any server that knows your callback URL can send requests to it. Treat a callback as a notice that a process changed, not as proof. To confirm the result, call GET /v1/ingest/{processId} with your own API key, using the processId from the callback. See get_processing_status_by_id.

Private sources and initial policies

On compatible deployments, remote ingest accepts public source URLs and private-upload hostedUrl values owned by your account. Each local, remote or crawl item can set an initial fileAccess policy without a revision. Omitted or null policies inherit account or bucket settings. Use private upload before sending protected files, including protected files in public buckets. See File Access and Sharing for upload steps, per-file policies and inherited limits.