Create chat completion
Image input
Maitai parameters
string
required
The Application reference name (shown in the Portal). Maitai uses this to group your traffic.
string
required
The Intent / action type for this request (also called
action_type). This is used for organization, configuration, and quality tooling.string
Optional but recommended. Groups related requests into a session in the Portal. If omitted, the SDK will generate one.
map<string, any>
Optional metadata tags stored with the request for filtering/debugging.
object
Provider-agnostic reasoning controls:
effort ("low" | "medium" | "high", optional) and summary (boolean, default false) to include thinking text on the response. See Reasoning.string
Evaluations and corrections (optional)
boolean
Enable/disable Sentinel evaluations for this request (Portal config also controls this).
boolean
When enabled, Maitai may apply an automatic correction if evaluations find a fault.
boolean
Prioritize accuracy over latency when applying corrections.
Inference routing
boolean
Controls where inference runs.
Fallbacks (optional)
object
Optional fallback configuration used when the primary model fails or times out.
OpenAI parameters
Maitai accepts the standard OpenAIchat.completions.create parameters (for example: model, temperature, tools, tool_choice, response_format, stream, etc.). If you set them in the request, they override Portal defaults.
Related guides:
Response fields
Maitai returns an OpenAI-compatiblechat.completion response, plus a few extra fields:
string
The Maitai request identifier.
object or null
Evaluation results (when evaluations are enabled).
boolean
Whether a correction was applied.
number or null
Optional input safety score (when enabled). A number between 0 and 1 where lower values indicate a potential jailbreak attempt.
number
Time to first token (milliseconds), when available.
number
Total response time (milliseconds), when available.
string or null
Present when a fallback model was used (explains why).