> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openference.com/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/messages

> Anthropic Messages API surface (Claude format) proxied through Openference.

# POST /v1/messages

Direct Anthropic-compatible endpoint.

Use this when integrating tools that speak the Anthropic Messages format (Claude Code, some SDKs, etc.).

## Example

```json theme={null}
{
  "model": "GLM-5.2",
  "max_tokens": 1024,
  "messages": [
    {"role": "user", "content": "Hello from Anthropic format"}
  ]
}
```

Use any model ID from `GET /v1/models` — most catalog models accept both OpenAI and Anthropic formats on the same key.

## Headers

```
anthropic-version: 2023-06-01   (recommended)
Authorization: Bearer YOUR_API_KEY
```

## Behavior

Openference will forward or convert as needed based on how the model route is configured.

Many models are configured to accept both formats on the same key.

## Streaming

Use the Anthropic streaming format (`event: message_start`, etc.).

## See also

* [OpenAI chat completions](/api-reference/chat-completions)
* [Client: Claude Code](/integrations/claude-code)
