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

> Verwende OmniaKey mit Anthropic Messages, Claude Code und Anthropic SDKs.

Verwende für Anthropic-native Tools den bloßen API-Host:

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

Claude Code und das Anthropic SDK hängen `/v1/messages` automatisch an.

## Messages

`POST /v1/messages` ist der Anthropic-Messages-Endpunkt. Er ist der native Pfad
für Claude-Modelle und das Protokoll, das Claude Code erwartet. Verwende auf
dieser Oberfläche Claude-Modell-IDs; für GPT und Gemini nutze die
OpenAI-kompatible oder die Gemini-native Oberfläche.

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

## Claude Code

Claude Code verwendet dieselbe Anthropic-native Base URL:

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

Die vollständige Einrichtung findest du unter
[Claude Code API-Schlüssel](https://docs.omniakey.com/de/guides/claude-code-api-key.md).


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