TheDocumentation Index
Fetch the complete documentation index at: https://docs.tokmodel.com/llms.txt
Use this file to discover all available pages before exploring further.
/v1/embeddings endpoint converts text into numerical vector representations (embeddings). You can pass a single string or a batch of strings in one request. The resulting vectors can be stored in a vector database and used for semantic search, document clustering, classification, or as input to a retrieval-augmented generation (RAG) pipeline. This endpoint is compatible with the OpenAI embeddings format.
Request parameters
The embedding model to use. Use the list models endpoint to find available embedding model IDs.
The text to embed. Pass a single string or an array of strings to embed multiple inputs in one request. Token limits vary by model.
The format in which to return the embedding vectors. Use
"float" for an array of floating-point numbers, or "base64" for a Base64-encoded string.Response fields
Always
"list".An array of embedding objects, one for each input string. Objects are returned in the same order as the input.
The model used to generate the embeddings.
Token usage for the request.