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

# OpenAI uyumlu API

> OmniaKey'i OpenAI uyumlu Chat Completions, Responses ve model listesi endpoint'leriyle kullanın.

OpenAI SDK'leri, Cursor, Codex, Cline, aider ve çoğu custom araç için
OpenAI uyumlu base URL'i kullanın:

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

## Chat Completions

`POST /v1/chat/completions` en taşınabilir endpoint'tir. Desteklenen Claude, GPT
ve Gemini modellerini id ile çağırabilir.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.omniakey.com/v1/chat/completions \
    -H "Authorization: Bearer your-omniakey-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "claude-opus-4-8",
      "messages": [{"role": "user", "content": "Refactor this function for readability."}]
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="your-omniakey-api-key",
      base_url="https://api.omniakey.com/v1",
  )

  response = client.chat.completions.create(
      model="claude-opus-4-8",
      messages=[{"role": "user", "content": "Refactor this function for readability."}],
  )

  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "your-omniakey-api-key",
    baseURL: "https://api.omniakey.com/v1",
  });

  const response = await client.chat.completions.create({
    model: "claude-opus-4-8",
    messages: [{ role: "user", content: "Refactor this function for readability." }],
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

## Responses

`POST /v1/responses` OpenAI'ın daha yeni Responses biçimini izler ve GPT
modellerini sunar. Codex tarzı GPT iş akışları için kullanın. Claude veya Gemini
için, aracınız açıkça farklı bir protokol gerektirmiyorsa Chat Completions kullanın.

```bash theme={null}
curl https://api.omniakey.com/v1/responses \
  -H "Authorization: Bearer your-omniakey-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "input": "Refactor this function for readability."
  }'
```

`POST /v1/responses/compact`, Codex tarzı context compaction akışları dahil olmak
üzere Responses compaction path'ini çağıran client'lar için kullanılabilir.

## Models

OpenAI uyumlu model listesi için `GET /v1/models` kullanın. İnsan tarafından
okunabilir katalog için [Desteklenen Modeller](/tr/models) sayfasına bakın.
