Skip to main content

Create a chat completion

POST 

/v1/chat/completions

OpenAI Chat Completions, on any model in the catalog. Send model (an alias) and messages; set stream: true for text/event-stream chunks terminated by data: [DONE]. Parameters the target model cannot take are dropped and named in X-MindsHub-Dropped-Params; response_format is the one refused with a 400 instead. The response's model is the resolved provider model, not the alias.

Request

Responses

The completion. Exactly one choice.

Response Headers
    X-MindsHub-Clamped-Params

    Parameters adjusted to the model's range, as name=requested>applied. Absent when nothing was clamped.

    X-MindsHub-Dropped-Params

    Comma-separated parameters the target model could not take and that were dropped. Absent when nothing was dropped.