Google Banana / Gemini Image / Gemini 2.5 Pro / Text generation (chat completion)
google_banana/gemini-2.5-pro/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
| Name | Type | Required | Description | Allowed values | Bundle dim. |
|---|---|---|---|---|---|
| tools | object[] | no | Function-calling: list of tools the model may invoke. The response contains tool_calls in `meta.tool_calls`. | — | — |
| top_k | integer | no | — | — | — |
| top_p | number | no | — | — | — |
| prompt | string | no | Convenience alternative to `messages`: a single user turn. Ignored when `messages` is set. | — | — |
| messages | object[] | no | Chat history. Provide either `messages` OR `prompt`; if both are present `messages` wins. | — | — |
| temperature | number | no | — | — | — |
| tool_choice | — | no | — | — | — |
| callback_url | string | no | Webhook URL invoked when async task completes. | — | — |
| stop_sequences | string[] | no | — | — | — |
| response_format | object | no | OpenAI-style structured output: { "type":"json_schema", "schema":{…} } or { "type":"json_object" }. Translated to Gemini responseSchema — equivalent to setting response_schema directly. | — | — |
| response_schema | object | no | JSON Schema (draft-07 subset) the response must conform to. Implies `response_mime_type=application/json`. | — | — |
| max_output_tokens | integer | no | — | — | — |
| response_mime_type | string | no | Force the model to emit JSON when set to "application/json". Pair with `response_schema` for strict structured output. | text/plain, application/json | — |
| system_instruction | string | no | System-level guidance prepended to the prompt (separate from the messages array). | — | — |
Example request
{
"provider": "google_banana",
"model": "gemini-2.5-pro",
"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..."
}