> ## 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.

# Gemini-native API

> Use OmniaKey with Gemini Generate Content and Google Gen AI SDKs.

Use this raw HTTP base URL for Gemini-native requests:

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

## Generate Content

The model id is part of the URL path:

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

<CodeGroup>
  ```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)
  ```
</CodeGroup>

<Note>
  The Google Gen AI SDK defaults to the Gemini `v1beta` API version, so SDK
  examples use the bare host as `base_url`. Raw HTTP calls include `/v1beta` in
  the URL path.
</Note>

## Models

Use `GET /v1beta/models` for Gemini-native model discovery. For the curated
human-readable catalog, see [Supported Models](/en/models).

## Gemini models through OpenAI-compatible tools

If your tool only supports OpenAI-compatible endpoints, use
`https://api.omniakey.com/v1` and pass a Gemini model id such as
`gemini-3.1-pro-preview` to Chat Completions.
