Request
Send aPOST request with your enterprise API key as a Bearer token.
curl
Body
json
Body Attributes
The body follows the OpenAI Chat Completions format. The server sends every field to the model without changes, exceptmodel, models, route, and preset.
string
required
Required by most SDKs. Send any value: the server always uses your plan’s model.
array
required
The conversation, as a list of
{ "role", "content" } objects. Roles are system, user, assistant, and tool. content can be a string or a list of content parts, such as text parts with cache_control or image parts if the model accepts images.boolean
default:"false"
Set to
true to get the reply as Server-Sent Events while the model generates it. Use streaming for long outputs: a request that is not streamed must finish in about 110 seconds.integer
The maximum number of tokens in the reply.
number
The sampling temperature. Higher values make the output more random.
number
Nucleus sampling: the model picks the next token only from tokens whose total probability is
top_p.array
Functions the model can call, in the OpenAI
tools format. Use tool_choice to control when the model calls them.object
Ask for JSON output, for example
{ "type": "json_object" } or a json_schema, if the model supports it.string | array
One or more sequences where the model stops.
Response
json
Streaming
With"stream": true, the response is text/event-stream. Each event is a data: line that holds one chunk, and the stream ends with data: [DONE].
Prompt caching
If the model supports prompt caching, mark a long, repeated part of the prompt withcache_control. The next requests that start with the same prefix read it from the cache. usage.prompt_tokens_details.cached_tokens shows how many tokens came from the cache.
json

