AI Gateway

Discover models, control access, run inference and measure model usage.

Use provider-compatible endpoints for inference. Configure project inference policies to control where and how requests are served.

Configure domains, environment variables, and servers. Manage release asset manifests and inspect deployment records.

Models · Provider credentials · Inference · Model usage

Models

Find available models and inspect their metadata. Provider-compatible model lists are grouped with inference models.

List provider-compatible inference models.

Read, update, or reset project model access: the allowed models, the denied models and the default model. Requires project.settings.manage.

Read and update the models an account allows and denies and its default model, which every project of the account inherits. These endpoints require a signed-in account owner or admin.

EndpointMethodsDescription
/ai/modelsGETList models
/catalog/modelsGETBrowse public models
/catalog/model-providers/{id}/iconGETGet model provider icon
/ai/v1beta/modelsGETList models in Gemini format
/ai/v1/modelsGETList models in OpenAI format
/projects/{project_reference}/inference-policyGET, PATCH, DELETEGet inference policy; Update inference policy models; Delete inference policy
/accounts/{account_id}/inference-policyGET, PATCH, DELETEGet account inference policy; Update account inference policy; Delete account inference policy

Provider credentials

Configure account-level Anthropic and OpenAI keys, preview routing restrictions, or revoke credentials. Requires a signed-in account owner or admin.

EndpointMethodsDescription
/accounts/{account_id}/inference-providers/{provider}/policy-previewGETPreview account provider policy restrictions
/accounts/{account_id}/inference-providersGETList account inference providers
/accounts/{account_id}/inference-providers/{provider}PUTUpdate account inference provider
/accounts/{account_id}/inference-providers/{provider}/revokePOSTRevoke account inference provider credential

Inference

Create Anthropic-compatible messages. Count input tokens without generating content or charging credits when the selected Anthropic deployment supports token counting.

Create OpenAI-compatible chat completions.

Create OpenAI-compatible responses.

Evaluate typed decision questions.

Create embeddings.

Call Gemini-compatible generateContent methods.

Generate images from a prompt. Manage generated images through project upload endpoints.

Use billing finalization when your integration manages gateway billing groups. Inspect spending limits through budgets.

Read routing or access metadata for proxy requests. These endpoints have separate freshness and authorization requirements.

EndpointMethodsDescription
/ai/v1/decisionsPOSTCreate decision
/ai/v1/chat/completionsPOSTCreate chat completion
/ai/v1/embeddingsPOSTCreate embeddings
/ai/v1/responsesPOSTCreate response
/projects/-/proxy-access/{lookup_key}GETGet proxy access metadata
/projects/-/proxy-routing/{lookup_key}GETGet proxy routing metadata
/ai/v1/messages/count_tokensPOSTCount input tokens
/ai/v1/messagesPOSTCreate message
/ai/gateway/billing/finalizePOSTFinalize gateway billing group
/ai/v1beta/models/{model_method}POSTCall Gemini model method
/ai/v1beta/models/{vendor}/{model_method}POSTCall prefixed Gemini model method
/projects/{project_reference}/image-generationsPOSTCreate image generation

Model usage

Read recorded model calls and token consumption by account or project, optionally for one member. Both reports return model totals and daily model breakdowns; the account report also breaks usage down by project.

EndpointMethodsDescription
/accounts/{account_id}/usage/modelsGETGet account model usage
/projects/{project_reference}/usage/modelsGETGet project model usage

Back to REST API reference