Embeddings
Embeddings LLM
Generate embeddings for the given input text using the specified model.
The model field in the request body specifies the model to use. Check the /models route for complete list of embedding models. You can specify the encoding format (float or np) and the dimensions (up to 1536) of the output embedding vector.
post/v1/embeddings
Request
- Base URL: https://apipie.ai
- URL: https://apipie.ai/v1/embeddings
- Auth: API key in header Authorization
Request body
Example request
{
"model": "text-embedding-3-small",
"input": "why is the sky blue?",
"encoding_format": "float",
"dimensions": 1024
}Response
Embedding vector generated successfully
Example response
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": {
"object": "embedding"
}
}
],
"provider": "openai",
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 6,
"total_tokens": 6,
"prompt_characters": 20,
"cost": "0.0000001260",
"latency_ms": 349
}
}Changes
No recorded changes to this operation across all 1 revision of this API.