openai Embedding
openai Embedding
Zilla runtime openai embedding resolves text to a vector using OpenAI's embeddings API, or any server that implements the same /v1/embeddings request and response schema. It backs semantic tool search or any other consumer of the embedding engine SPI with a hosted or self-hosted embedding model.
embeddings:
embedding0:
type: openai
options:
model: text-embedding-3-small
credentials:
api-key: ${{env.OPENAI_API_KEY}}Configuration (* required)
type: openai
const
Specifies the embedding is openai.
options
object
The openai specific options.
options.model *
string
The OpenAI embedding model id, e.g. text-embedding-3-small or text-embedding-3-large.
options.endpoint
string| Default:https://api.openai.com/v1/embeddings
The full URL of the embeddings endpoint, including the /v1/embeddings path, used as given. Set it to use an OpenAI-compatible server, such as text-embeddings-inference, instead of OpenAI. options.model and options.credentials.api-key are still required, but a server that ignores them, such as text-embeddings-inference serving the single model it was started with, accepts any value.
options.credentials *
object
The OpenAI credentials.
options.credentials.api-key *
string
The OpenAI API key, sent as an Authorization: Bearer header on each request. Typically supplied via an environment variable reference, e.g. ${{env.OPENAI_API_KEY}}, rather than inlined directly.
Note
The key needs only one restricted permission: Model capabilities > Embeddings (/v1/embeddings): Request. No other scopes are required.

