Answer: In the interactive CLI, run `/config` and open **Sessions** > **Model providers**, then choose **Create a custom provider or gateway** and enter the name, base URL, and, if needed, the name of the environment variable holding the API key. For manual setup, open `config.toml` at `~/.codex/config.toml` on macOS or Linux, or `%USERPROFILE%\.codex\config.toml` on Windows and merge the example configuration. Status: Confirmed Entry: tool/codex/admin-and-enterprise/configure-gateway-provider Revision: 2 Digest: sha256:1041045159918950 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:49:39Z Last changed: 2026-11-17T14:01:36Z (Sign-in wizard flag: — → codex --enable gateway_setup_wizard) Last verified: 2026-11-20T13:37:38Z Next check: 2026-11-21T13:37:38Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of CLI config command | /config | [1] | 2026-11-20 Provider creation option | Create a custom provider or gateway | [1] | 2026-11-20 macOS/Linux config path | ~/.codex/config.toml | [1] | 2026-11-20 Windows config path | %USERPROFILE%\.codex\config.toml | [1] | 2026-11-20 Example model | gpt-6-sol | [1] | 2026-11-20 Example provider ID | enterprise-gateway | [1] | 2026-11-20 Example base URL | https://gateway.example.com/v1 | [1] | 2026-11-20 Sign-in wizard flag | codex --enable gateway_setup_wizard | [1] | 2026-11-20 Sources: [1] OpenAI. "Connect to a gateway". https://learn.chatgpt.com/docs/enterprise/connect-to-a-gateway.md Role: primary. Accessed: 2026-11-20T13:37:38Z Quote: "In the interactive CLI, run `/config` and open **Sessions** > **Model providers**." (Supports: CLI config command) Quote: "Choose **Create a custom provider or gateway** and enter the name, base URL," (Supports: Provider creation option) Quote: "`config.toml` at `~/.codex/config.toml` on macOS or Linux, or" (Supports: macOS/Linux config path) Quote: "`%USERPROFILE%\.codex\config.toml` on Windows." (Supports: Windows config path) Quote: "This example uses `gpt-6-sol`; use it without a custom" (Supports: Example model) Quote: "`enterprise-gateway` is an illustrative provider ID." (Supports: Example provider ID) Quote: "base_url = "https://gateway.example.com/v1"" (Supports: Example base URL) Quote: "start `codex --enable gateway_setup_wizard`" (Supports: Sign-in wizard flag) Snapshot SHA-256: 15eaf69816d5b67ce28e980ae9e19729e556aa4089e16c7c110d50ee7736d17b (captured 2026-11-17T14:01:37Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T14:01:36Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:37:38Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:37:38Z Last attempt: 2026-11-20T13:37:38Z Notes and limitations: Extracted automatically from a single official source (section "Configure the provider"). Related: https://latestn.com/tool/codex/admin-and-enterprise/configure-managed-requirements-defaults How do I configure managed requirements and defaults for Codex and ChatGPT Work in the Admin Console? https://latestn.com/tool/codex/admin-and-enterprise/connect-prisma-airs How do I connect Prisma AIRS to my Codex workspace? https://latestn.com/tool/codex/admin-and-enterprise/create-service-account How do I create a service account for Codex automation in ChatGPT? https://latestn.com/tool/codex/admin-and-enterprise/compliance-api-vs-analytics-api When should I use the Compliance API instead of the Analytics API for Codex records? https://latestn.com/tool/codex/admin-and-enterprise/configure-codex-cloud-rollout How do I configure Codex cloud during a ChatGPT Enterprise rollout? https://latestn.com/tool/codex/admin-and-enterprise/configure-codex-config-server How do I configure Codex to use a self-hosted configuration server? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T14:01:36Z | changed | Sign-in wizard flag: — → codex --enable gateway_setup_wizard | [1] 2026-11-17T14:01:36Z | changed | Windows config path: — → %USERPROFILE%\.codex\config.toml | [1] 2026-11-17T14:01:36Z | changed | macOS/Linux config path: — → ~/.codex/config.toml | [1] 2026-11-17T14:01:36Z | changed | Provider creation option: — → Create a custom provider or gateway | [1] 2026-11-17T14:01:36Z | changed | CLI config command: — → /config | [1] 2026-11-17T14:01:36Z | changed | Wire API: responses → — | [1] 2026-11-17T14:01:36Z | changed | Config file path (Windows): %USERPROFILE%\.codex\config.toml → — | [1] 2026-11-17T14:01:36Z | changed | Config file path (macOS/Linux): ~/.codex/config.toml → — | [1] 2026-11-13T03:49:39Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/codex/admin-and-enterprise/configure-gateway-provider/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/codex/admin-and-enterprise/configure-gateway-provider POST: https://latestn.com/dispute/tool/codex/admin-and-enterprise/configure-gateway-provider with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/codex/admin-and-enterprise/configure-gateway-provider?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure Codex to connect to my organization's model gateway? Revision 2, last verified 2026-11-20T13:37:38Z. https://latestn.com/tool/codex/admin-and-enterprise/configure-gateway-provider (accessed 2026-11-21T10:03:39Z). @misc{LatestN_tool_codex_admin_and_enterprise_configure_gateway_provider_r2, title = {How do I configure Codex to connect to my organization's model gateway?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/codex/admin-and-enterprise/configure-gateway-provider}}, note = {Revision 2; digest sha256:1041045159918950; last verified 2026-11-20T13:37:38Z; accessed 2026-11-21T10:03:39Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/codex/admin-and-enterprise/configure-gateway-provider