TL;DR: 5 minutes to point Codex CLI at CodeGateway, call GPT-5.3 Codex through the OpenAI Responses API, pay as you go without an overseas credit card.
We tested this flow on our own machines and recommend running through all 5 steps before customizing — every step ships with a copy-paste command.
This tutorial walks through using Codex CLI with CodeGateway as the access layer for the GPT-5.3 Codex model. Codex CLI is OpenAI's command-line coding assistant; it speaks the OpenAI Responses API protocol. CodeGateway exposes a /v1/responses endpoint that implements the same protocol contract, so Codex CLI works with CodeGateway by setting the base URL accordingly.
Reference: OpenAI Codex CLI repo | Responses API docs for protocol parameters and endpoint definitions.
1. Prerequisites
Sign up for CodeGateway (get $2 of free credit) and generate an API key in the Dashboard. Codex CLI needs Node.js 18+.
2. Install Codex CLI
npm install -g @openai/codex3. Configure Environment
Codex CLI reads OPENAI_BASE_URL and OPENAI_API_KEY. Point base_url at CodeGateway:
export OPENAI_BASE_URL="https://api.codegateway.dev/v1"
export OPENAI_API_KEY="<your CodeGateway API key>"4. Verify the connection
This should return the model catalog (including gpt-5.3-codex):
curl https://api.codegateway.dev/v1/models \
-H "Authorization: Bearer $OPENAI_API_KEY"5. Get Coding
Run codex from any project directory. Every request flows through CodeGateway's edge nodes and is billed per-token with our tiered markup (see /pricing).
codex "Add a TypeScript function that returns Hello World under src/"