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

# Create an Anthropic-Compatible Message

> Use the VoidAI Messages endpoint with model-specific access, streaming, token limits, and Claude usage disclosures.

`POST https://api.voidai.app/v1/messages`

Requires [authentication](/authentication), account eligibility, and a model that supports this endpoint. The API accepts Anthropic-style messages. Optional `anthropic-version` and `anthropic-beta` headers are forwarded to the selected provider.

| Field | Type | Description |
| - | - | - |
| `model` | string, required | Exact model ID. |
| `messages` | array, required | Anthropic-format conversation messages and content blocks. |
| `max_tokens` | number, required | Output limit of at least 1 token. |
| `system` | string or content blocks | Optional system instructions. |
| `stream` | boolean | Request server-sent events. |
| `temperature`, `top_p`, `top_k`, `stop_sequences` | varies | Sampling controls where supported. |
| `tools`, `tool_choice`, `thinking`, `metadata` | varies | Anthropic-format options where supported by the model/provider. |

```bash theme={null}
curl https://api.voidai.app/v1/messages \
  -H "x-api-key: $VOIDAI_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'anthropic-version: 2023-06-01' \
  -d '{"model":"claude-sonnet-4-6","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'
```

Non-streaming output uses the Messages shape, including `id`, `content`, `stop_reason`, and `usage`. Streaming emits Anthropic-style events. Provider-specific extensions and beta features are not guaranteed across every route.

## Claude access and usage checks

Claude models require an explicit account access grant in addition to plan eligibility. Requests are subject to usage checks, including restrictions on certain roleplay content. Flagged requests may result in staff review of account/request metadata and a prompt excerpt of up to 400 characters. Some requests may be rejected by these checks.

This applies to Claude-family requests through chat and Responses formats as well. Contact [support](https://discord.gg/pQab7kukfu) for account eligibility or permitted-use questions.

Use [Count Tokens](/api-reference/messages/count-tokens) for an input count and [credits and caching](/guides/credits) to interpret usage.
