> ## 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 yerel API

> OmniaKey'i Gemini Generate Content ve Google Gen AI SDK'leriyle kullanın.

Gemini yerel istekler için bu raw HTTP base URL'i kullanın:

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

## Generate Content

Model id URL path'inin parçasıdır:

```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>
  Google Gen AI SDK varsayılan olarak Gemini `v1beta` API version'ını kullanır;
  bu yüzden SDK örnekleri `base_url` olarak çıplak host'u kullanır. Raw HTTP
  çağrıları URL path'inde `/v1beta` içerir.
</Note>

## Models

Gemini yerel model discovery için `GET /v1beta/models` kullanın. Seçilmiş,
insan tarafından okunabilir katalog için [Desteklenen Modeller](/tr/models)
sayfasına bakın.

## OpenAI uyumlu araçlarda Gemini modelleri

Aracınız yalnızca OpenAI uyumlu endpoint'leri destekliyorsa
`https://api.omniakey.com/v1` kullanın ve Chat Completions'a
`gemini-3.1-pro-preview` gibi bir Gemini model id'si geçin.
