AI Gateway

post/projects/{project_id}/ai/structured-output/stream

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/projects/{project_id}/ai/structured-output/stream
  • Auth: HTTP bearer

Path parameters

project_idinteger required

Project ID

Request body

cache_keystring nullable

Optional screen-owned cache identity. Prompt and schema hashes are also included automatically, preventing stale output when input data changes.

cache_ttl_secondsinteger nullable

Backend cache lifetime in seconds (default 60, clamped to 1-300).

modelstring nullable

Optional enabled model id for the selected key.

promptstring required

The complete, already-authorized context and instructions for the model.

provider_key_idinteger nullable

Optional configured gateway key. Omit to use the active gateway key. Host subscription CLIs are intentionally not accepted here.

purposestring required

Stable product use-case identifier, for example api_traffic.summary.

refreshboolean

Bypass any matching backend cache entry and replace it with this result.

schemaunknown required
thinking_levelstring nullable

Optional normalized reasoning depth advertised for the selected model.

Response

SSE events: started, partial, complete, or error

Changes

No recorded changes to this operation across all 53 revisions of this API.