Use our OpenAI-compatible chat completions API to integrate with any platform.
role
(“system”, “user”, or “assistant”) and content
.type
(currently only “function” is supported) and a function
object with name
, description
, and parameters
(JSON Schema format).stream
is set to true
, the response will be a stream of server-sent events (SSE). Each event contains a chunk of the response in the following format:
finish_reason: "stop"
and will be followed by data: [DONE]
.
Status Code | Description |
---|---|
400 | Invalid request body |
401 | Invalid authentication |
500 | Internal server error |
tool_calls
, you should: