Serverless AI Text Embedding
AI powered text embedding service that converts text into high-dimensional vector representations. Use these embeddings for semantic search, text similarity comparisons, or to power your ML models with semantic understanding.
Endpoint
Convert text into vector embeddings for semantic search and AI applications.
POSThttps://api.xtartapp.com/embeddings/embed
*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 |
---|---|---|---|---|
text | string | Yes | 2500 | The text to convert to vector embeddings |
Response
Name | Type | Description |
---|---|---|
data | array | The vector embedding representation of the input text |
data[] | number | Individual floating-point values in the embedding vector |
metadata | object | Metadata about the embedding process |
metadata.cost | number | The cost of the embedding request |
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 | EMBEDDINGS_EMBED_ERROR | Ex: could not generate embeddings from the text |
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. |