---
title: "Create an Anthropic Message"
method: POST
path: "/messages"
---

# Create an Anthropic Message

`POST /messages`

## Request

- Base URL: `https://reapi.ai/api/v1`
- URL: `https://reapi.ai/api/v1/messages`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Native Anthropic Messages for the listed Claude models. Authenticate with your reAPI key; no group lookup or group parameter is needed. Returns the result directly or via SSE, with no automatic retries. Model-specific and beta capability restrictions are documented on each model page.

## Headers

- `anthropic-version` string
- `anthropic-beta` string

## Request body

- object
  - `model` 'claude-haiku-5-5' | 'claude-sonnet-5-5' | 'claude-opus-5-5' | 'claude-fable-5' | 'claude-fable-5-1', required
  - `messages` object[], required: Native content blocks, including tool results and signed thinking. Preserve full assistant content across turns. Media inputs require public HTTP(S) URLs; base64 and data URIs are not accepted.
    - `role` 'user' | 'assistant', required
    - `content` union, required
      - string
      - object[]
  - `max_tokens` integer, required: Required output ceiling, including thinking tokens. Zero is forwarded for cache warmup; availability and behavior are determined upstream.
  - `system` union
    - string
    - object[]
  - `stream` boolean
  - `output_config` object: Native effort and structured output. output_config.format.schema is preserved unchanged. Supported effort values depend on the model; see its API documentation.
  - `thinking` object: Official thinking options. Thinking modes depend on the model. Haiku 5.5 supports disabled thinking; Sonnet 5.5 supports between_tools at low, medium or high effort. Beta options pass through.
  - `tools` object[]
  - `tool_choice` object
  - `stop_sequences` string[]
  - `cache_control` object, nullable
  - `temperature` number
  - `top_p` number
  - `top_k` integer
  - `metadata` object
  - `container` union
    - string
    - object
  - `diagnostics` object, nullable: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
  - `service_tier` string: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
  - `inference_geo` string, nullable: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
  - `context_management` object, nullable
  - `mcp_servers` object[]
  - `speed` string, nullable: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
  - `fallbacks` union: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
    - string
    - object[]
  - `fallback_credit_token` union: Forwarded unchanged. Availability and parameter behavior are determined upstream; acceptance alone does not verify an effect.
    - string
    - object
  - `compaction` object, nullable
  - `output_format` object, nullable

## Response `200`

Anthropic Message or native SSE events

- object
  - `id` string
  - `type` 'message'
  - `role` 'assistant'
  - `model` string
  - `content` object[]
  - `stop_reason` string, nullable
  - `usage` object

## Other responses

- `400`: Invalid request or unsupported model
- `401`: Missing or invalid reAPI key
- `402`: Insufficient credits
- `403`: Access denied
- `413`: Request body too large
- `429`: Rate or concurrency limit exceeded
- `502`: Invalid or unavailable model response
- `503`: Pricing, configuration, or requested capability unavailable

---

[API](https://skmtc.dev/reapi/apis/reapi-http-api.md) - [All operations](https://skmtc.dev/reapi/apis/reapi-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reapi/apis/reapi-http-api/revisions/1d2713a6058a?raw)
