Use CometAPI embeddings when your app needs vectors for semantic search, clustering, recommendations, or retrieval. Send text toDocumentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
/v1/embeddings, store the returned vector, and search it with your vector database.
Create an embedding
The following example creates one embedding vector:Batch input
The following example embeds multiple strings in one request:Common errors
| Error | Fix |
|---|---|
| Input too long | Split long documents into chunks before embedding. |
| Wrong model type | Choose an embedding-capable model from the model directory. |
| Vector dimensions mismatch | Keep the same model and dimensions for one vector index. |
| Missing API key | Send Authorization: Bearer $COMETAPI_KEY. |