AigenwayDocumentation

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

NameTypeRequiredDescriptionAllowed valuesBundle dim.
input
yes
The text(s) to embed.
titlestringnoOptional document title — only used when task_type=RETRIEVAL_DOCUMENT.
task_typestringnoHint 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_urlstringnoWebhook URL invoked when async task completes.
output_dimensionalityintegernoTruncate 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..."
}
Pricing: see your dashboard (auth required).