Submit
SendPOST /v1/embeddings with your API key. input accepts one string or an array of strings:
data[].embedding and match each data[].index to its input. Read token usage separately from the vectors.
Parameters and limits
Current compatible metadata leaves input-count limits, input-token limits, dimensions and encoding choices undocumented. Do not borrow another model’s limits or assume a default encoding.
Native Gemini embedding operations and reranking do not have reviewed contracts in this reference. There is no chat or embedding fallback for
/v1/rerank. Embeddings return vectors, not relevance scores.
Errors and billing
Check required fields and published limits on400, the API key on 401, group access and funds on 403, and rate limits on 429.
Embedding usage reports prompt_tokens and total_tokens. Pricing depends on the selected model/group; see Model Square. The response’s indexes and usage apply to the submitted inputs.