Upload a RAG document for an account
const url = 'https://example.com/v1/a/adapters/llm/rag/document/example?index_type=vector';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"content":"example","type":"txt"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url 'https://example.com/v1/a/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.
Permission
This operation needs the permission llm:document:manage.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”RAG document id.
Query Parameters
Section titled “Query Parameters”Document split mode.
Header Parameters
Section titled “Header Parameters”Target account for principals broader than one account (tenant / account API key); account-scoped principals use their own.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Responses
Section titled “Responses”Accepted
object
Examplegenerated
{ "message": "example"}Invalid request body or parameters
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
Examplegenerated
{ "error": "example", "details": "example"}Unauthorized
Forbidden
Resource busy
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
Examplegenerated
{ "error": "example", "details": "example"}Bad gateway (upstream adapter error)