---
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.

---

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