---
title: "Create a message"
method: POST
path: "/anthropic/v1/messages"
tags: ["Run a model"]
---

# Create a message

`POST /anthropic/v1/messages`

## Request

- Base URL: `https://api.hedra.com/v3`
- URL: `https://api.hedra.com/v3/anthropic/v1/messages`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Anthropic-compatible Messages API. Set the base URL of an Anthropic SDK or of Claude Code to the v3 base URL followed by `/anthropic`, and send an API key in `x-api-key` or `Authorization: Bearer`. Each request runs as a chat completion, and is charged, limited and recorded as one. The route serves client tools, and answers a tool of any other type with a 400. Each image the model does not accept becomes a text note in its place: every image on a model without image input, and on any other model the oldest images beyond the model's `max_images_per_request`. `output_config.effort` becomes chat's `reasoning_effort`, and `thinking` of type `disabled` becomes `reasoning_effort: none`, whatever `output_config.effort` says. `output_config.format` becomes chat's `response_format`, so the answer's `text` block holds JSON that matches the schema. Beside tools, a request with `output_config.format` must set `tool_choice` to `any`, `tool` or `none`, and gets a 400 under `auto`. The route accepts `thinking.budget_tokens`, `cache_control` and `context_management`, and they have no effect. The model's reasoning comes back as `thinking` blocks with an empty `signature`. Errors are those of `POST /chat/completions` in Anthropic's error body: the body's `type` is `error`, `error.type` is Anthropic's error type for the status, and `error` keeps the v3 error fields. The 400 for a value that chat rejects names the chat field, such as `reasoning_effort` or `messages[3].content`, under the message or `tool_result` block the caller sent. With `stream: true` the response is `text/event-stream` in the Messages event format, ending with `message_stop`, or with an `error` event for a failure after streaming has begun.

## Response `200`

Successful Response

- unknown

## Other responses

- `400`: Invalid or failed-validation request.
- `401`: Authentication failed: missing, malformed, or invalid credentials.
- `402`: The API wallet cannot cover this request. `error.billing` carries the balance, the price, and where to add funds.
- `403`: Insufficient scope or plan.
- `404`: Resource not found.
- `429`: Rate limit exceeded.
- `500`: Internal error.
- `503`: The model is temporarily unavailable.
- `504`: The model did not answer in time.

## Changes

- **2026-10-16** `06692d16e78a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hedra-labs/apis/hedra-api/changes/anthropic/v1/messages/post.md)

---

[API](https://skmtc.dev/hedra-labs/apis/hedra-api.md) - [All operations](https://skmtc.dev/hedra-labs/apis/hedra-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hedra-labs/apis/hedra-api/revisions/6ef35a11cefe?raw)
