# Google (Gemini)

## Endpoints

| API | URL |
|---|---|
| OpenAI-compatible | `https://www.aixapi.io/v1/chat/completions` |

```python
from openai import OpenAI

client = OpenAI(base_url="https://www.aixapi.io/v1", api_key="sk-...")
resp = client.chat.completions.create(
    model="gemini-3.8-flash",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
```

## Thinking

On by default, not returned, cannot be turned off. Reasoning tokens count as output.

| Parameter | Values |
|---|---|
| `reasoning_effort` | `low`, `high` |

## Tool calling

Supported, OpenAI `tools` format.

## Image input

Supported; `image_url` takes a URL or a base64 data URL.

## Image generation

Models: `nano-banana-2`, `nano-banana-pro`. Call `/v1/chat/completions`; the image is returned as a Markdown image link in `message.content`.

```python
resp = client.chat.completions.create(
    model="nano-banana-2",
    messages=[{"role": "user", "content": "Draw a red circle on a white background."}],
)
print(resp.choices[0].message.content)  # ![image](https://...)
```

## Embeddings

Model: `gemini-embedding-001`, 3072 dimensions.

```python
resp = client.embeddings.create(model="gemini-embedding-001", input="Hello")
```

## Limits

- `/v1/responses` and the native Gemini API are not supported.
