Try Bifrost Enterprise free for 14 days. Explore now
cURL
curl --request POST \ --url http://localhost:8080/pydanticai/v1/embeddings \ --header 'Content-Type: application/json' \ --data ' { "model": "text-embedding-3-small", "input": "<string>", "encoding_format": "float", "dimensions": 123, "user": "<string>", "fallbacks": [ "<string>" ] } '
{ "data": [ { "index": 123, "object": "<string>", "embedding": "<string>" } ], "model": "<string>", "object": "<string>", "usage": { "prompt_tokens": 123, "prompt_tokens_details": { "text_tokens": 123, "audio_tokens": 123, "image_tokens": 123, "cached_tokens": 123 }, "completion_tokens": 123, "completion_tokens_details": { "text_tokens": 123, "accepted_prediction_tokens": 123, "audio_tokens": 123, "citation_tokens": 123, "num_search_queries": 123, "reasoning_tokens": 123, "image_tokens": 123, "rejected_prediction_tokens": 123, "cached_tokens": 123 }, "total_tokens": 123, "cost": { "input_tokens_cost": 123, "output_tokens_cost": 123, "request_cost": 123, "total_cost": 123 } }, "extra_fields": { "request_type": "<string>", "provider": "openai", "model_requested": "<string>", "model_deployment": "<string>", "latency": 123, "chunk_index": 123, "raw_request": {}, "raw_response": {}, "cache_debug": { "cache_hit": true, "cache_id": "<string>", "hit_type": "<string>", "provider_used": "<string>", "model_used": "<string>", "input_tokens": 123, "threshold": 123, "similarity": 123 } } }
Creates embeddings using OpenAI-compatible format via PydanticAI.
Model identifier
"text-embedding-3-small"
Input text to embed
float
base64
Number of dimensions for the embedding
Successful response
Show child attributes
Token usage information
Additional fields included in responses
Was this page helpful?