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

# API nativa Gemini

> Use o OmniaKey com Gemini Generate Content e SDKs Google Gen AI.

Use esta base URL HTTP bruta para requisições nativas Gemini:

```text theme={null}
https://api.omniakey.com/v1beta
```

## Generate Content

O ID do modelo faz parte do caminho da URL:

```text theme={null}
POST /v1beta/models/{model}:generateContent
```

```bash cURL theme={null}
curl "https://api.omniakey.com/v1beta/models/gemini-3.1-pro-preview:generateContent" \
  -H "Authorization: Bearer your-omniakey-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Refactor this function for readability."}]}]
  }'
```

```python Python theme={null}
from google import genai
from google.genai import types

client = genai.Client(
    api_key="your-omniakey-api-key",
    http_options=types.HttpOptions(base_url="https://api.omniakey.com"),
)

response = client.models.generate_content(
    model="gemini-3.1-pro-preview",
    contents="Refactor this function for readability.",
)

print(response.text)
```

> [!NOTE]
>
> O SDK Google Gen AI usa por padrão a versão de API `v1beta` do Gemini, então os
> exemplos de SDK passam apenas o host como `base_url`. Chamadas HTTP brutas
> incluem `/v1beta` no caminho da URL.

## Modelos

Use `GET /v1beta/models` para descoberta nativa de modelos Gemini. O catálogo
selecionado e legível por humanos está em
[Modelos suportados](https://docs.omniakey.com/pt-BR/models.md).

## Modelos Gemini em ferramentas compatíveis com OpenAI

Se sua ferramenta só suporta endpoints compatíveis com OpenAI, use
`https://api.omniakey.com/v1` e passe um ID de modelo Gemini como
`gemini-3.1-pro-preview` para Chat Completions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.