Skip to main content
POST

Authorizations

Authorization
string
header
required

A project-scoped Aixy API key. Create keys in the dashboard and send the secret as a Bearer token.

Headers

X-Request-ID
string

Optional caller-generated request identifier for end-to-end tracing.

Maximum string length: 255
X-Aixy-Client
string

Optional application[/version] for Activity attribution. Overrides User-Agent detection. Use a product name, not personal data or credentials. Names are 1-64 ASCII letters, digits, spaces, dots, underscores or hyphens, starting with a letter or digit. Optional versions start with a digit and use up to 32 letters, digits, dots, underscores, plus signs or hyphens. Invalid values are ignored. This self-declared label grants no permissions and is not forwarded.

Maximum string length: 97
Example:

"Acme Support/1.2.3"

X-Aixy-Session
string

Optional opaque session identifier for virtual routes with session affinity. Scoped to the authenticated caller and alias; never forwarded or recorded. Send full conversation history. Invalid values return 400 when affinity is enabled. Omission retains the route's normal strategy.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9._:-]+$
Example:

"conversation-82"

X-Aixy-Session-ID
string

Optional opaque conversation identifier recorded in Activity metadata. Reuse it for every call in a conversation. Sessions are isolated by organization, project, user and API key. Use no personal data or secrets. Invalid values are ignored. The header is not forwarded, grants no permissions and does not change routing affinity.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9._:-]+$
Example:

"conversation-82"

X-Provider
string

Select a configured provider without changing an unqualified model identifier. A provider-qualified model is preferred for new integrations.

Body

application/json
model
string
required

Provider-qualified or Aixy routing model identifier.

Example:

"openai/gpt-4.1-mini"

messages
object[]
required
Minimum array length: 1
stream
boolean
default:false
stream_options
object
temperature
number
top_p
number
max_tokens
integer

Legacy output-token bound; use the field supported by your selected model.

Required range: x >= 1
max_completion_tokens
integer

Output-token bound, including reasoning where the provider counts it.

Required range: x >= 1
stop
tools
object[]
tool_choice
Available options:
none,
auto,
required
parallel_tool_calls
boolean
response_format
object

Structured output support depends on the model and provider API.

reasoning_effort
enum<string> | null

Requested reasoning effort. Supported values depend on the destination model.

Available options:
auto,
none,
minimal,
low,
medium,
high,
xhigh,
max,
null
seed
integer
frequency_penalty
number
presence_penalty
number
n
integer
default:1

Translated requests support one completion. Native model limits apply.

Required range: x >= 1
service_tier
string | null

Provider service tier when supported; also affects pricing attribution.

Response

Successful response or server-sent event stream.

id
string
object
string
Example:

"chat.completion"

created
integer
model
string
choices
object[]
usage
object | null