> ## 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 Asli Gemini

> Gunakan OmniaKey dengan Gemini Generate Content dan SDK Google Gen AI.

Gunakan base URL HTTP mentah ini untuk permintaan asli Gemini:

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

## Generate Content

ID model menjadi bagian dari jalur 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]
>
> SDK Google Gen AI memakai versi API Gemini `v1beta` secara bawaan, jadi contoh
> SDK memakai host saja sebagai `base_url`. Panggilan HTTP mentah menyertakan
> `/v1beta` pada jalur URL.

## Model

Gunakan `GET /v1beta/models` untuk penemuan model asli Gemini. Katalog pilihan
yang mudah dibaca manusia ada di [Model yang Didukung](https://docs.omniakey.com/id/models.md).

## Model Gemini lewat alat kompatibel OpenAI

Jika alat Anda hanya mendukung endpoint kompatibel OpenAI, gunakan
`https://api.omniakey.com/v1` dan kirim ID model Gemini seperti
`gemini-3.1-pro-preview` ke Chat Completions.


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