The embeddings endpoint converts text into a numerical vector that captures its semantic meaning. You can use these vectors for tasks such as semantic search, document clustering, similarity comparison, and classification.Documentation Index
Fetch the complete documentation index at: https://doc.hitopen.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Request parameters
The embedding model ID, for example
text-embedding-3-small, text-embedding-3-large, or text-embedding-ada-002.The text to embed. Pass a single string or an array of strings. Each input must not exceed the model’s token limit. To embed large documents, split them into chunks first.
Format of the returned vectors.
"float" returns an array of floating-point numbers. "base64" returns a base64-encoded binary string, which is more compact for network transfer.The number of dimensions in the output embedding. Only supported by certain models (for example,
text-embedding-3-small and text-embedding-3-large). Reduces the vector size while preserving most of the semantic information.Response fields
Always
"list".The model used to generate the embeddings.
Examples
Batch embedding example
Pass an array to embed multiple texts in a single request:Python (batch)