ChatCompletionRequest schema
| Field | Type and description | ||||||
|---|---|---|---|---|---|---|---|
modelRequired | string Model identifier (e.g., | ||||||
messagesRequired | array of ChatMessage The conversation history. When the last message in the conversation is from the assistant, the model answers with a new assistant message. On some models this needs a short user message: "Continue." is then added, with a notice in
| ||||||
max_tokens | integer Maximum tokens to generate in the response. The largest accepted value is the model's own
| ||||||
temperature | number Sampling temperature (0–2).
| ||||||
top_p | number Nucleus sampling probability.
| ||||||
stream | boolean If true, returns an SSE stream of partial completions.
| ||||||
stop | schema Stop sequence(s) to end generation. oneOfstring array of string Array itemsstring | ||||||
frequency_penalty | number Penalizes repeated tokens based on frequency. | ||||||
presence_penalty | number Penalizes tokens based on presence in the text so far. | ||||||
tools | array of object A list of tools (functions) the model may call. Array itemsobject | ||||||
tool_choice | schema Controls which tool is called by the model. oneOfstring object | ||||||
reasoning_effort | string How much the model reasons before answering, on models that reason on request (for example low, medium, high). Reasoning tokens are billed as output tokens. | ||||||
reasoning | object
| ||||||
response_format | object Response format constraint (e.g., | ||||||
service_tier | string Request Priority or Flex processing on supported models. Omit for the standard tier. On models without the requested tier, the request is processed on the standard tier. See https://docs.devupai.com/docs/service-tiers Allowed values: | ||||||
prompt_cache_key | string Identifies a cached prompt prefix. Send the same key on following requests to read the cache. | ||||||
prompt_cache_options | object Writes the prompt prefix to the cache for the given retention time. Send it only on the request that writes the cache; every request that includes it writes again and is billed at the write price. Not allowed together with service_tier.
|