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

# Anthropic yerel API

> OmniaKey'i Anthropic Messages, Claude Code ve Anthropic SDK'leriyle kullanın.

Anthropic yerel araçlar için çıplak API host'unu kullanın:

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

Claude Code ve Anthropic SDK `/v1/messages` yolunu otomatik ekler.

## Messages

`POST /v1/messages` Anthropic Messages endpoint'idir. Claude modelleri için yerel
path'tir ve Claude Code'un beklediği protokoldür. Bu yüzeyde Claude model id'leri
kullanın; GPT ve Gemini için OpenAI uyumlu veya Gemini yerel yüzeyleri kullanın.

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

  ```python Python theme={null}
  from anthropic import Anthropic

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

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

  print(message.content[0].text)
  ```
</CodeGroup>

## Claude Code

Claude Code aynı Anthropic yerel base URL'i kullanır:

```bash theme={null}
export ANTHROPIC_BASE_URL="https://api.omniakey.com"
export ANTHROPIC_AUTH_TOKEN="your-omniakey-api-key"
claude
```

Tam kurulum için [Claude Code API Key](/tr/guides/claude-code-api-key) sayfasına bakın.
