POST /v1/embeddings converts one string or a batch of strings into vectors. Use it for semantic search, retrieval, clustering, recommendations, and similarity comparisons.
Create an Embedding
- TypeScript
- Python
- cURL
data array and input-token usage.
Choosing a Model
Use a model that advertises theembeddings operation and copy its model ID from the model registry. The Planck endpoint, authentication, and response shape stay the same regardless of the selected model.
Anthropic does not expose an embeddings API. The Anthropic-compatible Messages
route is for text generation, not embeddings.
Billing and Tracking
Embedding requests are recorded in Requests with the selected provider, model, input tokens, duration, cost, request body, and response body. If you send the optionaluser field, it is used as the request’s user attribution.
See the Embeddings API reference for request and response fields.