pydo.embeddings.create()
Generated on 3 Aug 2026
from pydo version
v0.40.0
Usage
client.embeddings.create(
model="qwen3-embedding-0.6b",
input=["hello world", "goodbye world"],
encoding_format="float",
user="user-1234",
)Serverless inference methods can authenticate with a model access key instead of a DigitalOcean API token:
client = Client(token=os.environ.get("MODEL_ACCESS_KEY"))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.
inputobject 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.