Skip to content

Upload a RAG document for an account

PUT
/v1/adapters/llm/rag/document/{id}
curl --request PUT \
--url 'https://example.com/v1/adapters/llm/rag/document/example?index_type=vector' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "content": "example", "type": "txt" }'

Accepts either a JSON text body or a multipart file upload, selected by Content-Type.

id
required
string

RAG document id.

mode
string

Document split mode.

index_type
string
Allowed values: vector fulltext
chunk_size
integer
X-Account-Sid
string

Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.

object
content
required
string
type
required
string
Allowed values: txt csv

Accepted

Media typeapplication/json
object
message
string
Examplegenerated
{
"message": "example"
}

Invalid request body or parameters

Media typeapplication/json

Flat error shape emitted by the RAG document, public models and admin registry handlers. details is present only on validation failures that carry per-field diagnostics.

object
error
required
string
details
string
Examplegenerated
{
"error": "example",
"details": "example"
}

Unauthorized

Forbidden

Resource busy

Media typeapplication/json

Flat error shape emitted by the RAG document, public models and admin registry handlers. details is present only on validation failures that carry per-field diagnostics.

object
error
required
string
details
string
Examplegenerated
{
"error": "example",
"details": "example"
}

Bad gateway (upstream adapter error)