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

# autogen.oai.gemini.calculate_gemini_cost

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### calculate\_gemini\_cost

```python theme={null}
calculate_gemini_cost(
    use_vertexai: bool,
    input_tokens: int,
    output_tokens: int,
    model_name: str
) -> float
```

<b>Parameters:</b>

| Name            | Description    |
| --------------- | -------------- |
| `use_vertexai`  | **Type:** bool |
| `input_tokens`  | **Type:** int  |
| `output_tokens` | **Type:** int  |
| `model_name`    | **Type:** str  |

<br />
