Chat Completions
Request
Parameters
Message format
Each message has arole and content:
Vision (multimodal)
For vision models,content can be an array of parts:
Structured output
Useresponse_format to get JSON conforming to a schema:
Response
Streaming
Set"stream": true to receive Server-Sent Events:
data: line with a JSON chunk:
data: [DONE].