This tutorial walks through using Codex CLI with CodeGateway as the proxy for the GPT-5.3 Codex model. Codex CLI is OpenAI's command-line coding assistant; it speaks the OpenAI Responses API, which CodeGateway forwards via /v1/responses.
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/"