Chat Completions (OpenAI-compatible)
Changed onOpenAI-compatible chat completions endpoint. Accepts the standard OpenAI request schema and returns the standard OpenAI response schema. Supports both streaming (SSE) and non-streaming modes. Works as a drop-in replacement with the OpenAI Python and TypeScript SDKs.
Request
- Base URLhttps://api.swarms.world
- URLhttps://api.swarms.world/v1/chat/completions
- Authnone declared. Required headers: x-api-key
Headers
Request body
Response
Successful Response
Changes
- info
added the new optional request property
- info
- breaking
response property
choices/items/finish_reasonlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - info
added the new optional request property
// - info
added the new optional request property
// - info
added the new optional request property
- info
added the new optional request property
- info
added the optional property
///to the response with the status - info
added the optional property
///to the response with the status
- breaking