Product model invocation common objects¶
Product model invocation uses workspace and product identity. Genesis inference, backend administration, and Worker execution follow separate contracts.
Before you call this API¶
Obtain the product API base URL, credentials, and workspace ID in one environment. Examples use $BASE_URL, $MOI_KEY, and $WORKSPACE_ID. BASE_URL already includes its product prefix; do not append /v1. Workspace models/endpoints must meet applicable access, configuration, and online conditions.
Production deployment version is unconfirmed. Regular product identities pass through the current gateway; task credentials and system Worker identities are not interchangeable user authentication methods.
Context preflight¶
|
Type |
Condition |
|---|---|---|
|
string |
|
|
integer |
Measured input token count when checked. |
|
integer |
Model context window when checked. |
|
integer |
Reserved output when checked; positive max_completion_tokens takes precedence, otherwise max_tokens. |
|
string |
May be adapter_unsupported when unknown. |
The checker determines whether output reservation, template input, and extension fields can be measured. if_supported does not guarantee all backends bypass measurement errors. unknown does not mean sufficient budget.
Errors and billing¶
Regular product errors from both endpoints use numeric code and message, optionally details. Do not reuse root backend administration string code/msg. Identity/permission layers may reject first; inspect actual HTTP status and machine fields.
Billing admission rejection may include details.reason, string details.retryable, and optional details.action. Handle402,403, dependency unavailability, and other statuses as returned. Model usage, successful requests, and final settlement differ. A service_slot query parameter cannot grant quota or privileges.
Streaming chat can return JSON errors before committing the response. After commitment, HTTP status cannot change; consume SSE error events and connection termination. SDK StreamResponse and CLI streaming deliver bytes only; applications must interpret business errors in the stream.
Complete credential signatures, Service Slots, quota charging, and accounting recovery still require live-environment retesting.