Skip to content
AI GatewayAI Gateway Manual

Connect model Providers

The flow every model Provider follows to be added, have its models reviewed, and become available to projects, and which request types each Provider type supports.

This guide covers the flow that every Provider type follows. When you save a Provider, AI Gateway reads its model list. Once a project policy allows a model, users call it as <Provider name>/<model ID>.

Settings that differ by type are in each type’s guide:

Provider typeUse it forGuide
OpenAIConnecting with an OpenAI API keyOpenAI
AnthropicConnecting with an Anthropic API key, or letting users send requests on their own Claude subscriptionAnthropic
GeminiConnecting with a Google API keyGemini
AWS Bedrock, AWS Bedrock MantleModels in your AWS account’s BedrockAWS Bedrock
CustomServers that follow the OpenAI, Anthropic, or Gemini API format, such as vLLM, Ollama, or LiteLLMCustom Providers

The OpenAI Codex type is hidden in a default installation. It appears only when the installation engineer turns on CODEX_ENABLED.

Every type accepts chat requests. Embeddings (POST /v1/embeddings) and image generation (POST /v1/images/generations) are supported by some types only.

Provider typeEmbeddingsImage generation
OpenAISupportedSupported
AnthropicNot supportedNot supported
GeminiNot supportedTwo models only
AWS BedrockSome modelsSome models
AWS Bedrock MantleNot supportedNot supported
Custom (OpenAI format)Supported when an administrator turns it onSupported when an administrator turns it on
Custom (Anthropic or Gemini format)Not supportedNot supported
OpenAI CodexNot supportedNot supported

The supported models and settings are in each type’s guide. A request for a model on a Provider that does not support the request type fails without being sent to the Provider. If you use routing rules, the final target Provider must support the request type.

  • Permission: only organization administrators (org-admin) can add Providers.
  • Credentials: have the API key or credentials for the Provider you are connecting. Each type’s guide lists what it needs.
  • Network: the AI Gateway server must reach the Provider’s address over HTTPS. If you use a private address, a private CA, or a proxy, read Provider network settings first.

Open the admin console from the Organization settings tab at the top of the screen. Paths such as AI resources → Model Providers below are groups and items in the admin console’s left menu.

  1. In AI resources → Model Providers, click Add provider.
  2. Enter a Name. It becomes the prefix of every model ID users call, and may contain only lowercase letters, digits, dots, underscores, and hyphens. For example, a Provider saved as openai-prod is called as openai-prod/gpt-5.6. You can add several Providers of the same type under different names, for example one per account or purpose.
  3. Description is optional. Noting the account owner or purpose makes Providers easier to tell apart later.
  4. Choose the Provider type. Base URL is filled with the type’s official address.
  5. Enter the credentials as described in the type’s guide. Secret values are stored write-only and never shown again.
  6. If needed, set the Network section and Project visibility. By default a Provider connects to public internet addresses and is visible to every project. See Provider network settings and Provider project visibility.
  7. Click Test connection. On success, it shows how many models will be brought in. The test is optional, but it checks the key and address before you save.
  8. Click Save provider.

When you save, AI Gateway reads the Provider’s model list to check the credentials. If they are rejected or the address cannot be reached, the form shows why and the Provider is not created.

Open the new Provider from the Provider list and go to its Models page. Every model ID that the Provider’s model-list API returned is registered there.

  • The list can include models that are not used for chat, such as embedding or speech models. Being registered does not mean a model can be called with every request type. Check Supported request types.
  • When the Provider releases new models, click Check for model updates. It shows new models and models that the Provider no longer lists, and applies only the changes you select. Checking alone changes nothing.

AI Gateway calculates the cost of each request from the model’s price. On the Models page, click View pricing on a model to see the price that applies. Where the price comes from, and whether administrators can set or change it, depend on the Provider type. See Model pricing and costs.

Saving a Provider does not let anyone call its models yet. A project policy must allow them. Follow Allow models in projects and select this Provider’s models.

Then tell users which model IDs to call (<Provider name>/<model ID>). The user-side setup is in Set up AI agents, and embedding and image generation examples are in OpenAI SDK.

Embedding and image generation requests have AI Gateway size limits on top of any Provider limits. Compressed requests are checked both as received and after decompression.

RequestRequest bodyResponse body
Embeddings (OpenAI, Custom)Up to 100 MiB. Above 10 MiB, only model, permission, Budget, and size checks run and the request is forwarded to the Provider as isUp to 8 MiB
Embeddings (AWS Bedrock)Up to 10 MiB. The body converted to AWS format has the same limitUp to 8 MiB
Image generationUp to 10 MiBUp to 64 MiB after decompression

A request body over the limit fails with 413. An image generation response over the limit, or one that cannot be processed as valid JSON, fails with 502. An embedding response over 8 MiB cannot be returned. Provider token, batch, and image count limits and quotas apply separately.

  • On 413, shorten the input or prompt, or split the batch.
  • For a large embedding response, reduce dimensions within what the model supports, or use base64 output.
  • For a large image generation response, reduce the image count, size, or quality, or use URL output when the model supports it.

Image generation takes a JSON request and returns one response. stream:true, partial_images, multipart requests, and the image edit and variation APIs are not supported.

  • Replace a key: enter the new key in Credential on the Provider’s General page and save. Leaving it blank keeps the current key. The new key is not checked when you save, so a wrong key makes requests to this Provider fail from that point on. After saving, click Check for model updates on the Models page to confirm that the new key can read the model list. Changing AWS Bedrock authentication is covered in AWS Bedrock.
  • Disable: Disable in the Provider list rejects new requests to this Provider’s models and removes them from project model lists. Settings and models are kept, so Enable restores them.
  • Delete: deletes the Provider and its registered models. To pause a Provider, disable it instead.
MessageWhat to check
The provider rejected the credentialWhether the key is correct and has not expired or been revoked
A host name could not be resolvedThe spelling of Base URL and the AI Gateway server’s DNS and proxy settings
A server certificate could not be verifiedIf you use a private CA, register the CA certificate in the Network section
The Provider address is on a private network, so the connection was blockedTurn on Allow private network
The model list request returned HTTP 404 or 405For a Custom Provider, remove a version path such as /v1 from Base URL