POST
/
api
/
r2r
/
v3
/
documents
Create a new document
curl --request POST \
  --url https://api.intelligence.io.solutions/api/r2r/v3/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "file": "format: \"binary\"",
  "raw_text": "<string>",
  "chunks": "<string>",
  "id": "format: \"uuid\"",
  "collection_ids": "<string>",
  "metadata": "<string>",
  "ingestion_mode": "hi-res",
  "ingestion_config": "<string>",
  "run_with_orchestration": true
}'
{
  "results": {
    "message": "Ingestion task queued successfully.",
    "document_id": "9fbe403b-c11c-5aae-8ade-ef22980c3ad1",
    "task_id": "c68dc72e-fc23-5452-8f49-d7bd46088a96"
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
file
string
default:format: "binary"

The file to ingest. Exactly one of file, raw_text, or chunks must be provided.

raw_text
string

Raw text content to ingest. Exactly one of file, raw_text, or chunks must be provided.

chunks
string

Pre-processed text chunks to ingest. Exactly one of file, raw_text, or chunks must be provided.

id
string
default:format: "uuid"

The ID of the document. If not provided, a new ID will be generated.

collection_ids
string

Collection IDs to associate with the document. If none are provided, the document will be assigned to the user's default collection.

metadata
string

Metadata to associate with the document, such as title, description, or custom fields.

ingestion_mode
enum<string>

Ingestion modes: hi-res: Thorough ingestion with full summaries and enrichment. ocr: OCR via Mistral and full summaries. fast: Quick ingestion with minimal enrichment and no summaries. custom: Full control via ingestion_config. If filters or limit (in ingestion_config) are provided alongside hi-res or fast, they will override the default settings for that mode.

Available options:
hi-res,
ocr,
fast,
custom
ingestion_config
string

An optional dictionary to override the default chunking configuration for the ingestion process. If not provided, the system will use the default server-side chunking configuration.

run_with_orchestration
boolean

Whether or not ingestion runs with orchestration, default is True. When set to False, the ingestion process will run synchronous and directly return the result.

Response

200

results
object