Serverless AI Data Document Upload
AI service that loads and processes text data into vector embeddings for semantic search and retrieval.
Endpoint
Upload and process text data into vector embeddings for a specified collection
POSThttps://api.xtartapp.com/data/loader
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
collection | string | Yes | - | The name of the collection to store the data in. This will be used as part of the collection identifier. |
docId | string | Yes | 50 | Unique identifier for the document. Must be less than 50 characters and contain only letters, numbers, underscores, and hyphens. |
action | string | No | - | Specifies whether to "append" or "replace" the content. Defaults to "append" if not specified. |
content | string | Yes | 30000 | The text content to process and store. Will be automatically chunked into smaller pieces for vector embedding. |
Response
Name | Type | Description |
---|---|---|
data | object | The data of the upload process |
data.count | number | Number of documents/chunks created and stored from the uploaded content |
data.collectionName | string | The name of the collection where the data was stored |
metadata | object | Metadata about the data loader upload process |
metadata.cost | number | The cost of the data loader upload request (approximately $0.000001 per document) |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | Occurs when the payload is invalid. |
400 | INVALID_REQUEST | Ex.: The request is invalid. |
400 | DATA_LOADER_ERROR | Ex: could not load data | parsing error |
400 | HARM_CONTENT | Ex.: The content is harmful and cannot be processed. |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | Ex.: The token is invalid. |
429 | TOO_MANY_REQUESTS | Ex.: The request limit has been reached. |