inferenceClient.embeddings.create()
Generated on 27 Oct 2026
from DoTs version
v1.21.0
Usage
inferenceClient.embeddings.create(params: Record<string, any>): Promise<any>Description
Create vector embeddings for one or more text inputs. OpenAI-compatible request and response. Unknown fields in the request body are rejected. There is no streaming response for this endpoint.
Parameters
modelstring requiredExample:
qwen3-embedding-0.6bModel id to use for embeddings. Must match a model your account can access.
inputstring or array of strings requiredExample:
hello worldA single string or 1, 2048 strings; each string produces one row in
data, in order.userstring optionalExample:
user-1234Optional end-user identifier to help with abuse monitoring.
encoding_formatstring optionalHow embedding values are returned in each
data[].embeddingfield.
Request Sample
Response Example
More Information
See /v1/embeddings in the API reference for additional detail on responses, headers, parameters, and more.