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

> Use OmniaKey with Anthropic Messages, Claude Code, and Anthropic SDKs.

Use the bare API host for Anthropic-native tools:

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

Claude Code and the Anthropic SDK append `/v1/messages` automatically.

## Messages

`POST /v1/messages` is the Anthropic Messages endpoint. It is the native path for
Claude models and the protocol Claude Code expects. Use Claude model ids on this
surface; use the OpenAI-compatible or Gemini-native surfaces for GPT and Gemini.

<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 uses the same Anthropic-native base URL:

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

See [Claude Code API Key](/en/guides/claude-code-api-key) for the full setup.
