> ## Documentation Index
> Fetch the complete documentation index at: https://docs-vip.apigo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini extended-parameters example

> Gemini provider-specific passthrough example.

## When to use this

* You need to forward `generationConfig`, `thinkingConfig`, or modality settings
* Your unified layer should still preserve Google-specific capabilities

## Example

```json theme={null}
{
  "model": "gemini-2.5-flash",
  "contents": [
    {
      "role": "user",
      "parts": [{ "text": "Summarize this report." }]
    }
  ],
  "model_extra": {
    "generationConfig": {
      "thinkingConfig": { "thinkingBudget": 512 },
      "responseMimeType": "application/json"
    }
  }
}
```

## cURL example

```bash theme={null}
curl "https://api-vip.apigo.ai/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "Authorization: Bearer $YOUR API KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-2.5-flash",
    "contents": [
      {
        "role": "user",
        "parts": [{ "text": "Summarize this report." }]
      }
    ],
    "model_extra": {
      "generationConfig": {
        "thinkingConfig": { "thinkingBudget": 512 },
        "responseMimeType": "application/json"
      }
    }
  }'
```

## Python example

```python theme={null}
import requests

response = requests.post(
    "https://api-vip.apigo.ai/v1beta/models/gemini-2.5-flash:generateContent",
    headers={
        "Authorization": "Bearer <YOUR API KEY>",
        "Content-Type": "application/json",
    },
    json={
        "model": "gemini-2.5-flash",
        "contents": [
            {
                "role": "user",
                "parts": [{"text": "Summarize this report."}],
            }
        ],
        "model_extra": {
            "generationConfig": {
                "thinkingConfig": {"thinkingBudget": 512},
                "responseMimeType": "application/json",
            }
        },
    },
)

print(response.json())
```

## Node.js example

```js theme={null}
const response = await fetch(
  "https://api-vip.apigo.ai/v1beta/models/gemini-2.5-flash:generateContent",
  {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.YOUR API KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      model: "gemini-2.5-flash",
      contents: [
        {
          role: "user",
          parts: [{ text: "Summarize this report." }]
        }
      ],
      model_extra: {
        generationConfig: {
          thinkingConfig: { thinkingBudget: 512 },
          responseMimeType: "application/json"
        }
      }
    }),
  }
);

console.log(await response.json());
```

## Best practices

* Validate nested config objects before passthrough
* Record both model name and extension parameters for regression tracking
