---
title: "Create an Anthropic message"
method: POST
path: "/api/anthropic/v1/messages"
tags: ["anthropicGateway"]
---

# Create an Anthropic message

`POST /api/anthropic/v1/messages`

Send an Anthropic Messages API payload through Respan. Use x-api-key for native Anthropic SDKs, or Authorization: Bearer for Claude Code and bearer clients. Provider credentials are configured in Respan.

## Headers

- `x-api-key` string, required
- `anthropic-version` string, required
- `anthropic-beta` string

## Request body

- object
  - `model` string, required
  - `max_tokens` integer, required
  - `messages` object[], required
  - `stream` boolean
  - `respan_params` object

## Response `200`

Anthropic response or event stream.

- object

## Other responses

- `400` — Invalid request.
- `401` — Invalid Respan API key.
- `402` — Insufficient credits.
- `424` — Upstream provider failed.
- `429` — Rate limit exceeded.

## Changes

> 6 revisions in range; 3 could not be searched.

- **2026-07-31** `c26d550029f8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/anthropic/v1/messages/post.md)

---

[API](https://skmtc.dev/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.dev/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/c61efaf24756/schema)
