ZuploZuplo
LoginStart for Free
  • Documentation
  • API Reference
Introduction
Getting Started
    Develop in the portal
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
    Develop locally with the CLI
      1 - Setup Your Gateway2 - Rate Limiting3 - API Key Auth4 - Deploy5 - Dynamic Rate LimitingDynamic MCP Server - Quickstart
Concepts
Development
Policies
Handlers
API Keys
Rate Limiting
Caching
MCP Server
MCP Gateway
AI Gateway
    IntroductionGetting StartedSource ControlUniversal API
    Providers
    Teams
    Apps
    Policies
    Cookbooks
    Integrations
      AI SDKClaude CodeCodexGooseLangChain SDKOpenAI SDK
Developer Portal
Monetization
GraphQL
Deploying & Source Control
Analytics
Observability
Networking & Infrastructure
Account Management
Programming API
Build with AI
Zuplo CLI
Migration Guides
Platform LimitsVersion Support PolicySecuritySupportTrust & ComplianceChangelog
powered by Zudoku
Integrations

Codex

Codex is a coding agent developed by OpenAI that you can run locally from your terminal and that can read, modify, and run code on your machine, in the chosen directory. It’s open-source, and built in Rust for speed and efficiency.

Prerequisites

In order to use the AI Gateway with Codex you will need to complete these steps first:

  1. Create a new provider in the AI Gateway for the provider you want to use with Codex

  2. Set up a new team

  3. Create a new app to use specifically with Codex and assign it to the team you created

  4. Copy the API URL and API Key shown at the top of the app page

Configure Codex CLI

There are two approaches you can take to using Codex with Zuplo's AI Gateway.

  1. Route OpenAI through AI Gateway - This would configure your OpenAI provider in Codex to route requests through the AI Gateway rather than directly to OpenAI

  2. Create a Zuplo specific provider - Use Zuplo as a provider that be selected in the Codex configuration and work with any OpenAI compatible models

Configuration steps for both options are below:

Route OpenAI through AI Gateway

Open the Codex configuration ~/.codex/config.toml and modify the model_providers.openai-chat-completions entry so that the base_url points to your app's API URL with /v1 appended, and set your env_key to the API Key of the app you created to use with Codex. The app page in the Zuplo Portal shows the API URL, which ends in the app's ID.

TOMLCode
[model_providers.openai-chat-completions] name = "OpenAI using Chat Completions" base_url = "https://my-gateway-main-2e18f50.zuplo.app/config_fe0a04972d2848e0a94ae4b8bcd1497e/v1" env_key = "ZUPLO_AI_GATEWAY_API_KEY"

Save the file and reload Codex. Your OpenAI requests will now be routed through the Zuplo AI Gateway.

Zuplo AI Gateway provider

To add a specific provider for the AI Gateway you can add an additional entry to the Codex config.toml file.

TOMLCode
[model_providers.zuplo] name = "Zuplo AI Gateway" base_url = "https://my-gateway-main-2e18f50.zuplo.app/config_fe0a04972d2848e0a94ae4b8bcd1497e/v1" env_key = "ZUPLO_AI_GATEWAY_API_KEY"

Save the file and reload Codex. Your Zuplo AI Gateway provider will now be available and you can switch Codex over to use it at any time by running:

TerminalCode
codex --config model_provider="zuplo"

Choosing a model

The app's Model Filtering policy controls which models the app may use. Codex names the model as providerName/model, where providerName is the provider name configured in your gateway:

TerminalCode
codex --config model_provider="zuplo" --model "openai/gpt-5"

A request with no model, or a model without that prefix, gets a 400. Adding Model Filtering with an allow list also supplies a default, letting requests omit the model.

Edit this page
Last modified on August 18, 2026
Claude CodeGoose
On this page
  • Prerequisites
  • Configure Codex CLI
    • Route OpenAI through AI Gateway
    • Zuplo AI Gateway provider
    • Choosing a model