POST /v1/chat/completions sends a conversation to a model and returns its reply, in the OpenAI chat completions format. The cost of each request comes off your credit.
Request
Body
The model name, as listed by GET /models.
Return the reply as server-sent events while it is generated. See Streaming.
Model-specific options. For Qwen models,
{"enable_thinking": false} turns thinking off. See Models.Which options a model honours depends on the model. Fields not listed here are passed to the model unchanged.
Response
Streaming
With"stream": true, the response is a stream of server-sent events. Each event is a data: line with a JSON chunk whose choices[0].delta holds the next piece of the reply (content) or of the thinking (reasoning_content). The stream ends with data: [DONE].