AI Model Input and Output Schemas, Gateway Routing and Verification
What Input and Output mean on hosted AI model APIs, how catalog pages relate to Workers AI, and how gateway routes declare flow.
This page summarises how Cloudflare documents Input and Output across its AI model catalog and Workers AI model listings, and how those names differ from Inputs and Outputs on AI Gateway dynamic routing graphs. If you are choosing a model or wiring a Worker, you usually need the per-model schema pages—not a single global field list.
Input and Output on AI model API schemas: what the catalog shows
Section titled “Input and Output on AI model API schemas: what the catalog shows”On Cloudflare’s per-model documentation, the API Schemas (Raw) section is organised as two blocks named Input and Output. That structure appears whether the model is a text LLM, an image generator, speech, or embedding model. The catalog does not merge all models into one schema; each model URL is its own contract.
Input
Output— Cloudflare, GPT-5
The same Input / Output pair is repeated on companion pages under the Workers AI path for models that run on Workers AI—for example whisper and GPT-5’s catalog entry both follow that pattern. Treat Input as everything the inference call must supply (prompt, media, options) and Output as everything the service returns (text, tensors, files, metadata), with exact fields defined on that model’s page rather than inferred from another model’s name or vendor.
Catalog URL vs Workers AI model URL: which page to open
Section titled “Catalog URL vs Workers AI model URL: which page to open”Many models exist twice in the cluster documentation: once under developers.cloudflare.com/ai/models/… and once under developers.cloudflare.com/workers-ai/models/… (for example @cf/deepgram/aura-1 and aura-1 on Workers AI). Both list the same Input / Output schema headings in the excerpts available here. In practice, open the page that matches how you call the model (Gateway or unified catalog vs Workers AI binding) and read the raw schema on that URL—do not assume the two paths always diverge, but do not assume they are byte-identical without checking.
| Concern | AI models catalog | Workers AI models |
|---|---|---|
| Typical use | Model discovery, provider grouping, Gateway-oriented integration | Worker runtime model IDs and edge inference |
| Schema section label | API Schemas (Raw): Input, Output | API Schemas (Raw): Input, Output |
| When to prefer it | Routing through AI Gateway or comparing vendors | env.AI.run() and Workers AI-specific docs |
AI Gateway routing: Inputs and Outputs on route elements
Section titled “AI Gateway routing: Inputs and Outputs on route elements”AI Gateway dynamic routing does not reuse the model-page Input / Output blocks. Instead, each element in a JSON route declares Inputs and Outputs that describe how control and data move between steps—not the tensor or JSON body of a single inference.
The Start element marks the beginning of a route. Every route must include one.
Marks the beginning of a route. Every route must start with a Start element.
Inputs: None
Outputs:next: Forwards the unchanged request to the next element
— Cloudflare, JSON Configuration
So for gateway graphs, Outputs are named edges (here next) pointing at another element’s id, while model pages use Output as a schema description of the HTTP or RPC response shape. A pipeline might chain several models; each hop still has its own model Input / Output, while the gateway JSON only wires next (or other output channels defined on other element types on the same configuration page).
Example shape from the same document (placeholders as in the source):
{ "id": "<id>", "type": "start", "outputs": { "next": { "elementId": "<id>" } }}How to read Input and Output when only the headings are visible
Section titled “How to read Input and Output when only the headings are visible”Some documentation extracts show only the words Input and Output without field lists. That still tells you:
- The model is documented as a typed request/response pair, not as an undocumented passthrough.
- The authoritative field names, types, and required flags live in the full API Schemas (Raw) view on that model’s page (open in the browser or export from the docs UI).
- Third-party-hosted models in the catalog (OpenAI, Anthropic, Google, and others) use the same Input / Output section names even when the underlying vendor API uses different terminology elsewhere.
When comparing vendors—e.g. Claude Opus 5.5, Gemini 3.8 Flash, or Grok 4.7—use each model’s Input block to map your application payload, not a competitor’s block from memory.
Common mistakes with Input and Output
Section titled “Common mistakes with Input and Output”- Reusing another model’s Input fields — Image models (FLUX.2 [max]), speech (aura-2-en), and LLMs (GPT-5.4 mini) all label sections Input / Output but with different contents.
- Validating against the Gateway Start element —
Inputs: Noneon Start applies to the route graph, not to your prompt body. - Ignoring the URL path — Calling via Workers AI while reading only the
ai/modelspage (or the reverse) can miss deployment-specific notes even when schemas match. - Expecting a single global Output type — Embeddings (embeddinggemma-300m), rerankers (bge-reranker-base), and chat models share section titles only.
How to check this on your site
Section titled “How to check this on your site”-
Open the model you plan to call (for example whisper on Workers AI) and expand API Schemas (Raw); confirm Input lists every field you send and Output lists every field you parse.
-
If you use AI Gateway dynamic routing, open JSON Configuration and verify each route’s Start element has
Inputs: Noneand anoutputs.nexttarget that matches a real element id in your JSON. -
Send a minimal request that satisfies Input only; compare the live response structure to Output and adjust client parsing before adding optional fields.
-
When you change model version (for example GPT-5 to GPT-5.4), re-read Output on the new page even if Input looks unchanged.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match the linked Cloudflare documentation, email yimasynthetic@gmail.com with the page URL and the exact sentence you believe is wrong, and we will correct or clarify it.