AigenwayDocumentation

Google Banana / Gemini Image / Gemini 2.5 Flash Lite / Text generation (chat completion)

google_banana/gemini-2.5-flash-lite/text_generation
Sync
Async

Chat-style text completion with the Gemini 2.5 family. Supports system/user/assistant messages, structured JSON output (response_schema), and function calling (tools). Compatible with the OpenAI ChatCompletion request shape for easy migration.

Parameters

NameTypeRequiredDescriptionAllowed valuesBundle dim.
toolsobject[]noFunction-calling: list of tools the model may invoke. The response contains tool_calls in `meta.tool_calls`.
top_kintegerno
top_pnumberno
promptstringnoConvenience alternative to `messages`: a single user turn. Ignored when `messages` is set.
messagesobject[]noChat history. Provide either `messages` OR `prompt`; if both are present `messages` wins.
temperaturenumberno
tool_choiceno
callback_urlstringnoWebhook URL invoked when async task completes.
stop_sequencesstring[]no
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 (draft-07 subset) the response must conform to. Implies `response_mime_type=application/json`.
max_output_tokensintegerno
response_mime_typestringnoForce the model to emit JSON when set to "application/json". Pair with `response_schema` for strict structured output.text/plain, application/json
system_instructionstringnoSystem-level guidance prepended to the prompt (separate from the messages array).

Example request

{
  "provider": "google_banana",
  "model": "gemini-2.5-flash-lite",
  "method": "text_generation",
  "params": {
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful product catalog assistant."
      },
      {
        "role": "user",
        "content": "Find SKU \"6204-2RS\" and return its specs as JSON."
      }
    ],
    "temperature": 0.2,
    "response_schema": {
      "type": "object",
      "required": [
        "sku"
      ],
      "properties": {
        "sku": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "width_mm": {
          "type": "number"
        },
        "inner_diameter_mm": {
          "type": "number"
        },
        "outer_diameter_mm": {
          "type": "number"
        }
      }
    },
    "max_output_tokens": 512,
    "response_mime_type": "application/json"
  }
}

Example response

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