Messages (Anthropic-compatible)
Changed onAnthropic Messages API format, non-streaming text only. Code written for the Anthropic SDK runs with base_url and api_key changed. Streaming, images, documents, tools, thinking, assistant prefill and any other field not listed here are rejected with a 400.
Request
- Base URLhttps://api.swarms.world
- URLhttps://api.swarms.world/v1/messages
- Authnone declared. Required headers: x-api-key
Headers
Request body
Response
Successful Response
Changes
- breaking
the response's body type changed from no type to
objectfor status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking
- info
endpoint added
- info