Google Banana / Gemini Image / Text Embedding 004 / Text embedding
google_banana/text-embedding-004/embedding
Sync
Async
Generate a dense vector embedding for a piece of text. Useful for semantic search, classification, RAG, and recommendation. Input may be a single string or an array (batch). Returns one vector per input in `meta.embeddings`.
Parameters
| Name | Type | Required | Description | Allowed values | Bundle dim. |
|---|---|---|---|---|---|
| input | — | yes | The text(s) to embed. | — | — |
| title | string | no | Optional document title — only used when task_type=RETRIEVAL_DOCUMENT. | — | — |
| task_type | string | no | Hint to the embedding model about the downstream use case. Improves retrieval quality. | RETRIEVAL_QUERY, RETRIEVAL_DOCUMENT, SEMANTIC_SIMILARITY, CLASSIFICATION, CLUSTERING, QUESTION_ANSWERING, FACT_VERIFICATION, CODE_RETRIEVAL_QUERY | — |
| callback_url | string | no | Webhook URL invoked when async task completes. | — | — |
| output_dimensionality | integer | no | Truncate the output vector to N dimensions (default: model native — 768). | — | — |
Example request
{
"provider": "google_banana",
"model": "text-embedding-004",
"method": "embedding",
"params": {
"input": [
"SKF 6204-2RS deep groove ball bearing, 20mm bore, ZZ shielded",
"NSK 6205-RS sealed bearing 25mm bore"
],
"task_type": "RETRIEVAL_DOCUMENT",
"output_dimensionality": 768
}
}Example response
{
"status": "queued",
"task_id": "tsk_01H..."
}