The new REST API at api.cloudflare.com/client/v4/accounts/{ACCT}/ai/v1/* has no /models endpoint, so there is no way to programmatically enumerate the third-party models available to an account through Unified Billing.
Current behaviour
curl -X GET "https://api.cloudflare.com/client/v4/accounts/${ACCT}/ai/v1/models" \
-H "Authorization: Bearer ${CF_API_TOKEN}"
HTTP 405
{"result":null,"success":false,"errors":[{"code":7001,"message":"GET not supported for requested URI."}],"messages":[]}
The existing Workers AI catalogue at /ai/models/search?task=Text%20Generation returns 37 entries, all @cf/*. It does not include third-party Unified Billing models (openai/*, google/*, anthropic/*, openrouter/*, etc.).
Why this matters
- Admin UIs that let operators pick a model cannot populate the dropdown without hardcoding or trial-and-error inference calls.
- Capability and pricing discovery requires falling back to external sources like models.dev or each provider's own API.
- There is no way to detect which third-party providers have Unified Billing enabled on an account without making a probe request per candidate model.
- OpenAI, OpenRouter, Anthropic, and Google all expose a
/models GET on their native APIs. AI Gateway is the unification layer but the catalogue is the missing piece.
Suggested shape
Add GET /ai/v1/models returning the union of:
- Workers AI models (the existing
/ai/models/search set)
- Third-party models whose providers have Unified Billing enabled on the account
Each entry should carry:
id (e.g. openai/gpt-5.4-mini, google/gemini-3-flash, @cf/meta/llama-3.3-70b-instruct-fp8-fast)
provider
context_window
- Pricing per million input/output tokens (and cached input where applicable)
- Capability flags (
function_calling, reasoning, vision, audio, streaming)
Mirroring the shape of /ai/models/search would let existing clients reuse parsing logic.
The new REST API at
api.cloudflare.com/client/v4/accounts/{ACCT}/ai/v1/*has no/modelsendpoint, so there is no way to programmatically enumerate the third-party models available to an account through Unified Billing.Current behaviour
The existing Workers AI catalogue at
/ai/models/search?task=Text%20Generationreturns 37 entries, all@cf/*. It does not include third-party Unified Billing models (openai/*,google/*,anthropic/*,openrouter/*, etc.).Why this matters
/modelsGET on their native APIs. AI Gateway is the unification layer but the catalogue is the missing piece.Suggested shape
Add
GET /ai/v1/modelsreturning the union of:/ai/models/searchset)Each entry should carry:
id(e.g.openai/gpt-5.4-mini,google/gemini-3-flash,@cf/meta/llama-3.3-70b-instruct-fp8-fast)providercontext_windowfunction_calling,reasoning,vision,audio,streaming)Mirroring the shape of
/ai/models/searchwould let existing clients reuse parsing logic.