Skip to content
INRENT
API

Embeddings

Turn text into vectors for search, clustering and retrieval.

res = client.embeddings.create(
    model="openai/text-embedding-3-small",
    input=["first document", "second document"],
)
vectors = [d.embedding for d in res.data]
  • input accepts a string, an array of up to 2,048 strings, or token arrays.
  • dimensions is forwarded to models that support shortening.
  • Embeddings are billed on input tokens only.
Edit this page