Skip to main content
POST
Chat Completions

Request contract

Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based billing; Default request estimate: $0.01 USD (not a fixed price). Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.
  • Default request reference estimate (USD): 0.01
  • Cost contract: request_formula
  • Published reference multiplier: 1.0
  • Settlement evidence source: request_snapshot

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request for the chat completions endpoint.

Note that all parameters except for model, stream, and response_format are ignored.

messages
any[]
required
Minimum array length: 1
model
enum<string>
required
Available options:
base,
core,
lite,
speed
frequency_penalty
number | null

The frequency penalty to use for chat completions. Unsupported.

max_tokens
integer | null

The maximum number of tokens to generate. Unsupported.

n
integer | null

The number of chat completions to generate. Unsupported.

presence_penalty
number | null

The presence penalty to use for chat completions. Unsupported.

previous_interaction_id
string | null

Interaction ID from a previous chat completion to use as context.

response_format
ResponseFormatText · object

Default response format. Used to generate text responses.

stream
boolean | null

Whether to stream the chat completions.

temperature
number | null

The temperature to use for chat completions. Unsupported.

top_p
number | null

The top p to use for chat completions. Unsupported.

Response

Returns a ChatCompletion object for non-streaming requests (application/json), or a stream of ChatCompletionResponseChunk objects for streaming requests (text/event-stream) when stream=true is set in the request.

Chat completion response.

choices
Choice · object[]
required
created
integer
required
id
string
required

The id of the chat completion.

model
string
required
object
string
required
Allowed value: "chat.completion"
basis
FieldBasis · object[]

Basis for the chat completion, including citations and reasoning supporting the output.

interaction_id
string | null

Identifier for this interaction. Pass as previous_interaction_id for follow-ups.

moderation
Moderation · object | null

Moderation results for the request input and generated output, if moderated completions were requested.

service_tier
enum<string> | null
Available options:
auto,
default,
flex,
scale,
priority
system_fingerprint
string | null
usage
CompletionUsage · object | null

Usage statistics for the completion request.