Create an Anthropic message

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

Respan API key in Anthropic’s native auth header. Bearer authentication is also accepted by the backend but is not the generated native-SDK form.

anthropic-versionstringRequiredDefaults to 2023-06-01
anthropic-betastringOptional

Request

This endpoint expects an object.
modelstringRequired
max_tokensintegerRequired>=1
messageslist of maps from strings to anyRequired
streambooleanOptionalDefaults to false
respan_paramsmap from strings to anyOptional

Response

Anthropic response or event stream.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
424
Failed Dependency Error
429
Too Many Requests Error