> ## 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 네이티브 API

> Anthropic Messages, Claude Code, Anthropic SDK에서 OmniaKey를 사용합니다.

Anthropic 네이티브 도구에는 호스트만 사용하세요.

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

Claude Code와 Anthropic SDK는 `/v1/messages`를 자동으로 붙입니다.

## Messages

`POST /v1/messages`는 Anthropic Messages 엔드포인트입니다. Claude 모델의 네이티브 경로이며
Claude Code가 기대하는 프로토콜입니다. 이 경로에서는 Claude 모델 ID를 사용하고, GPT와
Gemini는 OpenAI 호환 또는 Gemini 네이티브 경로를 사용하세요.

```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도 같은 Anthropic 네이티브 Base URL을 사용합니다.

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

전체 설정은 [Claude Code API 키](https://docs.omniakey.com/ko/guides/claude-code-api-key.md)를 참고하세요.


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