Create a chat completion
Changed onOpenAI-compatible Chat Completions endpoint. Supports streaming via stream: true, which returns a Server-Sent Events stream of chat.completion.chunk objects.
Request
- Base URLhttps://api.sailresearch.com/v1
- URLhttps://api.sailresearch.com/v1/chat/completions
- AuthHTTP bearer
Headers
Identifies one submission within your organization and API key. Reuse the same value and request body when retrying; use a new value for new work. See Idempotency.
Completion window for this request, for clients that cannot set metadata.completion_window in the body. A window in the body takes precedence. See Completion windows.
Request body
Response
Chat completion. Returns a single JSON object by default, or a Server-Sent Events stream of chat.completion.chunk objects when stream: true (terminated by a final data: [DONE] line).
Changes
- breaking
removed the enum value
priorityof the request property/ - warning
added the new
content_filterenum value to the//response property for the response status (media type: text/event-stream) - warning
added the new
lengthenum value to the//response property for the response status (media type: text/event-stream) - info
added the new optional
headerrequest parameterX-Sail-Completion-Window - info
added the new optional request property
/ - info
added the new optional request property
- info
added the new
balancedenum value to the request property/ - info
added the new
maxenum value to the request property/ - info
added to the
////request propertyoneOflist - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
removed the non-success response with the status
- info
added the optional property
to the response with the status (media type: application/json) - info
added the optional property
to the response with the status (media type: text/event-stream)
- breaking