Skip to main content
POST
Stream a Codex subscription response

Authorizations

X-Gateway-Key
string
header
required

The caller's personal, project-scoped Aixy key. Aixy validates and removes this header before forwarding. It does not replace the ChatGPT token.

Authorization
string
header
required

The user's ChatGPT access token supplied by the official Codex client. Forwarded only to the fixed Codex backend; never stored as a connection.

Headers

X-Request-ID
string

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

Maximum string length: 255
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"

ChatGPT-Account-ID
string

Account/workspace selected by Codex; preserved for OpenAI validation. It does not select or authorize an Aixy tenant.

Body

application/json
model
string
required

Native Codex model slug, without an Aixy provider prefix.

input
object[]
required

Native conversation history, tool items and opaque reasoning state.

stream
boolean
required
store
boolean
required

Response

Incremental native SSE. A successful stream ends with response.completed; errors can occur after headers or text arrive.

The response is of type string.