AigenwayDocumentation

Google Banana / Gemini Image / Gemini 2.5 Flash / Image to text (vision)

google_banana/gemini-2.5-flash/image_to_text
Sync
Async

Analyse an input image and return text — or strict JSON via response_format/response_schema. Symmetric to text_to_image. Multimodal model; priced like text generation.

Parameters

NameTypeRequiredDescriptionAllowed valuesBundle dim.
imagenoInput image: a data-URI/URL string, or an object { type, media_type, data } / { type, url }. Formats: jpeg/png/webp.
imagesarraynoMultiple input images (analysed together).
promptstringnoInstruction / question about the image.
messagesobject[]noOptional chat history (alternative to `prompt`). Content arrays may carry { type:"image_url", image_url:{ url } } parts.
temperaturenumberno
callback_urlstringnoWebhook URL invoked when async task completes.
response_formatobjectnoOpenAI-style structured output: { "type":"json_schema", "schema":{…} } (or { "type":"json_object" }). Translated to Gemini responseSchema. Equivalent to setting response_schema directly.
response_schemaobjectnoJSON Schema the response must conform to (implies application/json). Native Gemini form; alternative to response_format.
max_output_tokensintegerno
response_mime_typestringnoForce JSON output when set to application/json.text/plain, application/json
system_instructionstringnoSystem-level guidance prepended to the prompt.

Example request

{
  "provider": "google_banana",
  "model": "gemini-2.5-flash",
  "method": "image_to_text",
  "params": {
    "image": {
      "data": "<BASE64>",
      "type": "base64",
      "media_type": "image/jpeg"
    },
    "prompt": "Определи блюдо и ингредиенты на фото, оцени вес, калории и БЖУ.",
    "response_format": {
      "type": "json_schema",
      "schema": {
        "type": "object",
        "required": [
          "dish",
          "kcal",
          "protein",
          "fat",
          "carbs"
        ],
        "properties": {
          "fat": {
            "type": "number"
          },
          "dish": {
            "type": "string"
          },
          "kcal": {
            "type": "number"
          },
          "carbs": {
            "type": "number"
          },
          "protein": {
            "type": "number"
          }
        }
      }
    }
  }
}

Example response

{
  "status": "queued",
  "task_id": "tsk_01H..."
}
Pricing: see your dashboard (auth required).