Create a chat completion
Generates a model response for the given conversation. Set stream: true to receive the response incrementally as Server-Sent Events.
Authorizations
Your Deepshi API key, sent as Authorization: Bearer <key>.
Body
Unsupported or model-specific fields are ignored rather than rejected.
The model id to use, e.g. deepshi-3.0 or gpt-4o. Use the bare id returned by GET /v1/models, not a provider-prefixed id.
"deepshi-3.0"
The conversation so far, oldest first.
Sampling temperature. Lower is more deterministic.
0 <= x <= 2Nucleus sampling cutoff. Use instead of temperature, not both.
0 <= x <= 1Maximum tokens to generate in the response.
Alias of max_tokens accepted for OpenAI compatibility.
Up to 4 sequences at which generation stops.
Stream tokens as Server-Sent Events.
Best-effort deterministic sampling seed.
Number of choices to generate.
-2 <= x <= 2-2 <= x <= 20 <= x <= 20Set to { "type": "json_object" } to force valid JSON output, or { "type": "json_schema", "json_schema": { ... } } for a schema (model-dependent).
Function/tool definitions the model may call.
Controls tool use: "auto", "none", "required", or a specific tool.
none, auto, required An opaque identifier for your end user.
Response
A chat completion. When stream: true, the response is instead an SSE stream of ChatCompletionChunk events terminated by data: [DONE].