AI Gateway

Explicit JSON contract for generated clients; the standard OpenAI route remains polymorphic.

Changed on
post/ai/v1/responses/json

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/v1/responses/json
  • Auth: HTTP bearer

Request body

backgroundboolean nullable

Run asynchronously and poll for the result. Requires your own provider key: the result is fetched from the provider account.

conversationobject nullable

Attach the response to a stored conversation. Requires your own provider key, for the same reason as previous_response_id.

modelstring required

Model to run, e.g. gpt-6-luna. Must be served by OpenAI.

previous_response_idstring nullable

Continue from a stored response. Requires your own provider key (X-Provider-Api-Key), because stored responses live in the provider account that created them.

streamboolean

Stream the reply as server-sent events.

Response

Complete response object; forces stream=false

idstring required
modelstring required
objectstring required

Always response

statusstring nullable

completed, incomplete, failed, in_progress, …

Changes