Text-to-Embedding
Text-to-Embedding converts text into vector representations for semantic search and similarity. The API returns embedding vectors along with a task ID to track processing.
Endpoint for requesting text to embedding inference
Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.
This is a sample text for embedding generation.
["First text for embedding","Second text for embedding","Third text"]
The embedding model to use. Available models can be retrieved via the GET /api/v1/client/models endpoint.
Bge_M3_FP16
ID of the inference request.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/txt2embedding HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: application/json
Content-Length: 81
{
"input": "This is a sample text for embedding generation.",
"model": "Bge_M3_FP16"
}
{
"data": {
"request_id": 1
}
}
Endpoint for calculating price for text to embedding inference
Input text(s) to generate embeddings for. Can be a single string or array of strings (max 2048 items). Each input limited to 8192 tokens, total request limited to 300k tokens.
This is a sample text for embedding generation.
["First text for embedding","Second text for embedding"]
The embedding model to use. Available models can be retrieved via the GET /api/v1/client/models endpoint.
Bge_M3_FP16
Calculated price for txt2embedding inference.
Unauthorized user.
Unauthorized user.
POST /api/v1/client/txt2embedding/price-calculation HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: application/json
Content-Length: 81
{
"input": "This is a sample text for embedding generation.",
"model": "Bge_M3_FP16"
}
{
"data": {
"price": 0.0003
}
}
Last updated