Skip to navigation

Create an Anthropic message

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-keystringRequired
Your Respan API key in Anthropic's native authentication header. Bearer authentication is also accepted.
anthropic-versionstringOptionalDefaults 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
402
Payment Required Error
403
Forbidden Error
424
Failed Dependency Error
429
Too Many Requests Error