Chat Completions
Create chat completion
Changed onCreates a chat completion for the provided messages. OpenAI-compatible endpoint. Messages are converted to a prompt internally; responses use object "chat.completion" and choices[].message with role and content.
post/v1/chat/completions
Request
- Base URL/ (relative, and the document was published on a file host, not at the API’s origin)
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"model": "test-model"
}Response
Successful chat completion (JSON) or streaming (text/event-stream)
Example response
{
"id": "chatcmpl-abc123def456"
}Changes
- warning
removed the request property
- warning
- info
added the new optional request property
- info