Documents
Create a document
Creates a new text document and generates an embedding vector for semantic search, in the project named in the path.
post/v1/projects/{project_id}/documents
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/documents
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Request body
Example request
{
"content": "The quick brown fox jumps over the lazy dog.",
"path": "/reports/q1.txt",
"filename": "my-doc.txt",
"metadata": {
"author": "John",
"revision": 2
},
"tags": {
"team": "finance",
"env": "prod"
},
"chunk_size": 1000,
"chunk_overlap": 200
}Response
Document created
Example response
{
"id": "doc_V1StGXR8Z5jdHi6B",
"file_id": "file_V1StGXR8Z5jdHi6B",
"project_id": "proj_V1StGXR8Z5jdHi6B",
"path": "/reports/q1.txt",
"filename": "my-doc.txt",
"content_type": "application/pdf",
"size": 42,
"status": "ready",
"version": 1,
"content": "The quick brown fox jumps over the lazy dog.",
"chunk_strategy": "size",
"chunk_size": 800,
"chunk_overlap": 120
}Changes
No recorded changes to this operation across all 1 revision of this API.