Create a chat completion
Create an OpenAI-compatible chat completion. Use a provider-qualified model such as openai/gpt-4.1-mini to select a provider explicitly, or an aixy/<routing-model> reference to use a project routing policy. Set stream to true to receive incremental server-sent events. Aixy preserves matching native protocols and translates supported stateless conversations otherwise. Advanced fields without a supported translation are rejected explicitly. Aixy selects a compatible provider API for reviewed model contracts while preserving the requested reasoning effort. Plaintext assistant history in reasoning or reasoning_content is accepted during translation but is omitted when the destination has no compatible plaintext history carrier; it does not recreate signed or encrypted provider continuation.
Authorizations
A project-scoped Aixy API key. Create keys in the dashboard and send the secret as a Bearer token.
Headers
Optional caller-generated request identifier for end-to-end tracing.
255Optional 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.
97"Acme Support/1.2.3"
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.
1 - 128^[A-Za-z0-9._:-]+$"conversation-82"
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.
1 - 128^[A-Za-z0-9._:-]+$"conversation-82"
Select a configured provider without changing an unqualified model identifier. A provider-qualified model is preferred for new integrations.
Body
Provider-qualified or Aixy routing model identifier.
"openai/gpt-4.1-mini"
1Legacy output-token bound; use the field supported by your selected model.
x >= 1Output-token bound, including reasoning where the provider counts it.
x >= 1none, auto, required Structured output support depends on the model and provider API.
Requested reasoning effort. Supported values depend on the destination model.
auto, none, minimal, low, medium, high, xhigh, max, null Translated requests support one completion. Native model limits apply.
x >= 1Provider service tier when supported; also affects pricing attribution.