One embedding vector per input string. Each vector is a plain number[]
of floats whose dimensionality depends on the model (and the optional
dimensions parameter).
Model identifier reported by the provider (may differ from the requested model).
Provider identifier used for the run.
Token usage for the embedding request. Most embedding APIs only report prompt tokens (the input); completion tokens are typically zero.
Number of tokens consumed by the input text(s).
Sum of prompt and any other tokens (usually equal to promptTokens).
Optional costUSD?: numberCost in USD: Gemini's when it prices the call itself (embedding models with a catalog price), and an OpenAI embedding model's from OpenAI's price table. Absent when neither is known.
The result returned by embedText.
Example