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

# Create an Anthropic message

`POST /api/anthropic/v1/messages`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/anthropic/v1/messages`
- Auth: none required

Send native Anthropic Messages requests through Respan using provider credentials configured in Respan. Authenticate with your Respan key in `x-api-key` for Anthropic SDKs or `Authorization: Bearer` for bearer clients.

## Headers

- `x-api-key` string, required
- `anthropic-version` string
- `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.
- `402`: Insufficient credits.
- `403`: The API key is missing, invalid or expired.
- `424`: Upstream provider failed.
- `429`: Rate limit exceeded.

## Changes

- **2026-10-21** `c30bcb383ee8`: 2 breaking, 4 info
  - request body became required
  - the `messages` request property's minItems was increased to `1`
  - api operation id `anthropicGateway_api_anthropic_v1_messages_create` removed and replaced with `api_anthropic_v1_messages_create`
  - api tag `Anthropic Gateway` added
  - …2 more
- **2026-10-02** `b830b79cfd52`: 3 info
  - the `header` request parameter `anthropic-version` became optional
  - added the non-success response with the status `403`
  - removed the non-success response with the status `401`
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `api-anthropic-v-1-messages-create` removed and replaced with `anthropicGateway_api_anthropic_v1_messages_create`

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

---

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