Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.
Use a DGrid Model API Key for model requests. A Management API Key is an administrative credential and cannot be used for this tutorial. Check that your key has available credits and access to the selected model.
Connect Codex CLI or Codex in the desktop app to DGrid using your API key, the Responses API base URL, and a complete model ID.The current desktop download is the ChatGPT desktop app, which includes Codex. Existing installations may still use the Codex app name. Get the app from the official download page.This guide uses openai/gpt-6-sol. Screenshots and the detailed desktop walkthrough use macOS; Windows installation and CLI instructions are also included.
A DGrid account with available credits and access to a model that supports the Responses API.
A DGrid API key: sign in and create or copy a key from API Keys.
For installation through npm, Node.js with npm. The desktop method can be used independently of the CLI.
Keep your full key out of screenshots and shared files. Preserve the complete model ID, including its openai/ prefix.
If Codex reports a model metadata or catalog error, ask DGrid for catalog settings that match your Codex version. Custom model aliases may need matching catalog metadata; do not guess a catalog URL. See the official gateway setup guide.
The CLI profile selects DGrid for runs started with that profile. Editing the desktop main file changes the default provider for clients that read that file. If you depend on your current desktop setup, use another computer for the desktop walkthrough.Both methods use these connection settings:
If needed, install the current LTS release from the Node.js download page. On macOS, run the macOS installer; on Windows, run the Windows installer. Standard installers include npm.Open Terminal on macOS or PowerShell on Windows and check:
The PATH command applies to this terminal. Run it again in a new terminal, or add the directory to your shell’s PATH configuration.Windows PowerShell:
npm install -g @openai/codexcodex --version
If PowerShell blocks npm.ps1, use npm.cmd instead of npm.The CLI screenshots use codex-cli 0.163.0. The separate profile-file format below applies to Codex 0.134.0 and later; see configuration profiles.
If the profile already exists, edit its matching settings. Save as plain text with straight quotation marks. env_key is the variable’s name: keep DGRID_API_KEY here.
Codex CLI installed and a separate DGrid profile created in Terminal
Use the same terminal where you will launch Codex.macOS Terminal with Zsh:
export DGRID_API_KEYread -rs "DGRID_API_KEY?Paste your DGrid API key (hidden): "
Paste your key at the prompt and press Enter. No characters appear as you enter it. Wait for the terminal prompt to return before running the next command.Windows PowerShell: run the first line, enter the key at the masked prompt, then run the remaining lines.
$dgridSecureKey = Read-Host "Paste your DGrid API key (hidden)" -AsSecureString$env:DGRID_API_KEY = [System.Net.NetworkCredential]::new("", $dgridSecureKey).PasswordRemove-Variable dgridSecureKey
This sets the key for the current terminal session. A new terminal requires entering it again.
If Codex asks whether you trust the folder, confirm for this demo folder you created. Check the selected model is openai/gpt-6-sol. You can also use /status to inspect the session.Send:
Reply with exactly: DGrid connection successful
The expected response is:
DGrid connection successful
Codex CLI displaying the response with the DGrid model selected
If startup shows Running without the shared background server: --profile requires embedded mode., it describes how this profile session runs. Use F2 to view the warning and Esc to close it, then continue. Some Mac keyboards use Fn + F2.
macOS: open the downloaded installer, drag the app into Applications, and open it.
Windows: run the downloaded installer and follow the installation prompts.
Choose the current app that includes Codex. The walkthrough below uses macOS and the application path /Applications/ChatGPT.app.For DGrid credentials, configure the provider and launch environment below. The initial OpenAI API key sign-in field does not itself set a DGrid base URL.
For an existing file, update matching top-level keys and place them before the first table header ([section]). Add the DGrid provider table at the end, or update it if present. Keep other settings and avoid duplicate keys or tables. Save as plain text with straight quotation marks.The app reads this main file. A CLI profile file alone does not select DGrid in the desktop app. Windows uses %USERPROFILE%\.codex\config.toml. See the official gateway setup guide.
export DGRID_API_KEYread -rs "DGRID_API_KEY?Paste your DGrid API key (hidden): "
Paste the DGrid key and press Enter. When the terminal prompt returns, run this as a separate command in the same terminal:
open -a "/Applications/ChatGPT.app" --env "DGRID_API_KEY=$DGRID_API_KEY"
If your installation is named Codex.app, substitute its actual application path.If Terminal reports that the application was already running and additional environment variables could not be set, fully quit with Command + Q and repeat the launch command.The key is available to this launched app process. For a future launch from a new terminal, repeat the hidden key entry and launch command. Opening the app from the Dock does not supply a variable set only in this terminal.
Click Choose project and select dgrid-codex-demo in your home folder.
Enter the prompt below.
Click the send arrow.
Reply with exactly: DGrid connection successful
A project selected and the connection prompt ready to send in Codex
The expected response is:
DGrid connection successful
Codex desktop app displaying the model response
Some versions display a label such as Custom Medium. Check the complete model ID in your configuration and the corresponding DGrid request record to confirm the model and route used.
Confirm installation completed. On macOS, run export PATH="$HOME/.local/bin:$PATH" in the current terminal.
Missing API key
Set the key in the terminal that launches the client. env_key names a variable; it does not set its value.
App already running; environment variables could not be set
Fully quit with Command + Q, then repeat the desktop launch command.
Desktop sign-in or request fails after opening from the Dock
Quit the app, enter the key in Terminal, and launch with --env.
Authentication or model access error
Check the DGrid key, credits, Responses support, and complete model ID.
Provider settings ignored
Use the user-level files above. Project-level .codex/config.toml cannot select a custom provider.
Return to an earlier desktop provider
Restore its model, provider, and authentication settings, then fully quit and reopen the app.
The Codex configuration reference lists provider settings. This guide covers connecting and receiving a response; tools, web search, and longer agent tasks depend on the selected model and gateway support.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"DGrid AI Docs","description":"Documentation for DGrid AI: The Decentralized Smart Network of AI","colors":{"primary":"#65A30D","light":"#A3E635","dark":"#4D7C0F"},"logo":{"light":"https://mintcdn.com/dgridai/eFrQx07adP_MQw0i/logo/dgrid-horizontal-black.png?fit=max\u0026auto=format\u0026n=eFrQx07adP_MQw0i\u0026q=85\u0026s=aa7da302786ec058e3c91526a127736d","dark":"https://mintcdn.com/dgridai/eFrQx07adP_MQw0i/logo/dgrid-horizontal-white.png?fit=max\u0026auto=format\u0026n=eFrQx07adP_MQw0i\u0026q=85\u0026s=62aa06e50e86ab2394beada6a4814623"},"favicon":"https://mintcdn.com/dgridai/eFrQx07adP_MQw0i/favicon.png?fit=max\u0026auto=format\u0026n=eFrQx07adP_MQw0i\u0026q=85\u0026s=75fcb6ffc8e30d1e2be00c994cc0372e","api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript","go","java"]}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"Blog"},{"href":"https://telegram.me/dgrid_ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dgrid.ai/overview"}},"footer":{"socials":{"x":"https://x.com/dgrid_ai","telegram":"https://telegram.me/dgrid_ai","github":"https://github.com/dgridai"}},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"zh-Hant","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"部落格"},{"href":"https://telegram.me/dgrid_ai","label":"支援"}],"primary":{"type":"button","label":"儀表板","href":"https://dgrid.ai/overview"}},"href":"zh-Hant"},{"language":"ko","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"블로그"},{"href":"https://telegram.me/dgrid_ai","label":"지원"}],"primary":{"type":"button","label":"대시보드","href":"https://dgrid.ai/overview"}},"href":"ko"},{"language":"fr","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"Blog"},{"href":"https://telegram.me/dgrid_ai","label":"Assistance"}],"primary":{"type":"button","label":"Tableau de bord","href":"https://dgrid.ai/overview"}},"href":"fr"},{"language":"es","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"Blog"},{"href":"https://telegram.me/dgrid_ai","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://dgrid.ai/overview"}},"href":"es"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dgridai","hasAudioNarration":false,"actualSubdomain":"dgridai","customDomains":["docs.dgrid.ai"],"gitSource":{"type":"github","owner":"ethanclarkeio","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"collectionId":"146373a5-1310-4927-bf4d-bc5f1b23b737","liveDeploymentHistoryId":"6adb04f0a28cf93daee93294","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adb04f0a28cf93daee93294"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adb04f0a28cf93daee93294","clientVersion":"0.0.3939","searchFilterCounts":[{"language":"en","tag":"Documentation","count":36},{"language":"es","tag":"Documentación","count":36},{"language":"fr","tag":"Documentation","count":36},{"language":"ko","tag":"문서","count":36},{"language":"zh-Hant","tag":"文件","count":36},{"language":"en","tag":"API Reference","count":28},{"language":"es","tag":"Referencia de la API","count":28},{"language":"fr","tag":"Référence API","count":28},{"language":"ko","tag":"API 참조","count":28},{"language":"zh-Hant","tag":"API 參考","count":28},{"language":"en","tag":"MODEL API","count":22},{"language":"es","tag":"API DE MODELOS","count":22},{"language":"fr","tag":"API DE MODÈLES","count":22},{"language":"ko","tag":"모델 API","count":22},{"language":"zh-Hant","tag":"模型 API","count":22},{"language":"en","tag":"AI GATEWAY","count":13},{"language":"es","tag":"PUERTA DE ENLACE IA","count":13},{"language":"fr","tag":"PASSERELLE IA","count":13},{"language":"ko","tag":"AI 게이트웨이","count":13},{"language":"zh-Hant","tag":"AI 閘道","count":13},{"language":"en","tag":"Integration Tutorials","count":7},{"language":"es","tag":"Tutoriales de integración","count":7},{"language":"fr","tag":"Tutoriels d'intégration","count":7},{"language":"ko","tag":"통합 가이드","count":7},{"language":"zh-Hant","tag":"整合教學","count":7},{"language":"en","tag":"Images","count":6},{"language":"en","tag":"GENESIS PREMIUM","count":6},{"language":"es","tag":"Imágenes","count":6},{"language":"es","tag":"GENESIS PREMIUM","count":6},{"language":"fr","tag":"Images","count":6},{"language":"fr","tag":"GENESIS PREMIUM","count":6},{"language":"ko","tag":"이미지","count":6},{"language":"ko","tag":"GENESIS PREMIUM","count":6},{"language":"zh-Hant","tag":"圖像","count":6},{"language":"zh-Hant","tag":"GENESIS PREMIUM","count":6},{"language":"en","tag":"Chat","count":5},{"language":"es","tag":"Chat","count":5},{"language":"fr","tag":"Chat","count":5},{"language":"ko","tag":"채팅","count":5},{"language":"zh-Hant","tag":"對話","count":5},{"language":"en","tag":"Audio","count":4},{"language":"en","tag":"CORE CONCEPTS","count":4},{"language":"es","tag":"Audio","count":4},{"language":"es","tag":"CONCEPTOS CLAVE","count":4},{"language":"fr","tag":"Audio","count":4},{"language":"fr","tag":"CONCEPTS CLÉS","count":4},{"language":"ko","tag":"오디오","count":4},{"language":"ko","tag":"핵심 개념","count":4},{"language":"zh-Hant","tag":"音訊","count":4},{"language":"zh-Hant","tag":"核心概念","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"ai-gateway/integrations/codex","slug":"/ai-gateway/integrations/codex","pageMetadata":{"title":"Use Codex with DGrid","sidebarTitle":"Codex","description":"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.","href":"/ai-gateway/integrations/codex"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Info,Note,OptimizedImage,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(Info,{children:_jsx(_components.p,{children:`Use a DGrid Model API Key for model requests. A Management API Key is an administrative credential and cannot be used for this tutorial. Check that your key has available credits and access to the selected model.`})}),`\n`,_jsxs(_components.p,{children:[`Connect `,_jsx(_components.strong,{children:`Codex CLI`}),` or `,_jsx(_components.strong,{children:`Codex in the desktop app`}),` to DGrid using your API key, the Responses API base URL, and a complete model ID.`]}),`\n`,_jsxs(_components.p,{children:[`The current desktop download is the `,_jsx(_components.strong,{children:`ChatGPT desktop app, which includes Codex`}),`. Existing installations may still use the Codex app name. Get the app from the `,_jsx(_components.a,{href:`https://chatgpt.com/download/`,children:`official download page`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This guide uses `,_jsx(_components.code,{children:`openai/gpt-6-sol`}),`. Screenshots and the detailed desktop walkthrough use macOS; Windows installation and CLI instructions are also included.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.a,{href:`https://dgrid.ai/`,children:`DGrid account`}),` with available credits and access to a model that supports the Responses API.`]}),`\n`,_jsxs(_components.li,{children:[`A DGrid API key: sign in and create or copy a key from `,_jsx(_components.a,{href:`https://dgrid.ai/api-keys`,children:`API Keys`}),`.`]}),`\n`,_jsx(_components.li,{children:`For installation through npm, Node.js with npm. The desktop method can be used independently of the CLI.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Keep your full key out of screenshots and shared files. Preserve the complete model ID, including its `,_jsx(_components.code,{children:`openai/`}),` prefix.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`If Codex reports a model metadata or catalog error, ask DGrid for catalog settings that match your Codex version. Custom model aliases may need matching catalog metadata; do not guess a catalog URL. See the `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/enterprise/connect-to-a-gateway`,children:`official gateway setup guide`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`choose-your-setup`,children:`Choose your setup`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Configuration`}),_jsx(_components.th,{children:`Selection`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`CLI`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`~/.codex/dgrid.config.toml`})}),_jsxs(_components.td,{children:[`Run `,_jsx(_components.code,{children:`codex --profile dgrid`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Desktop on macOS`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`~/.codex/config.toml`})}),_jsx(_components.td,{children:`The app reads its main configuration at startup.`})]})]})]}),`\n`,_jsx(_components.p,{children:`The CLI profile selects DGrid for runs started with that profile. Editing the desktop main file changes the default provider for clients that read that file. If you depend on your current desktop setup, use another computer for the desktop walkthrough.`}),`\n`,_jsx(_components.p,{children:`Both methods use these connection settings:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Setting`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Model`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`openai/gpt-6-sol`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Base URL`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://api.dgrid.ai/v1`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Wire API`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`responses`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Credential environment variable`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`DGRID_API_KEY`})})]})]})]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`CLI`,id:`cli`,\"data-child-heading-ids\":`[\"1-install-node-js-and-codex-cli\",\"2-create-a-dgrid-profile\",\"3-enter-the-api-key\",\"4-launch-codex-and-send-a-message\"]`,children:[_jsx(Heading,{level:`3`,id:`1-install-node-js-and-codex-cli`,children:`1. Install Node.js and Codex CLI`}),_jsxs(_components.p,{children:[`If needed, install the current LTS release from the `,_jsx(_components.a,{href:`https://nodejs.org/en/download`,children:`Node.js download page`}),`. On macOS, run the macOS installer; on Windows, run the Windows installer. Standard installers include npm.`]}),_jsx(_components.p,{children:`Open Terminal on macOS or PowerShell on Windows and check:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Install using the `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/codex/cli`,children:`official Codex npm method`}),`.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`macOS:`}),` install into your user directory.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -g`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @openai/codex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --prefix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.local\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PATH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.local/bin:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$PATH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --version`})]}),`\n`]})})}),_jsx(_components.p,{children:`The PATH command applies to this terminal. Run it again in a new terminal, or add the directory to your shell’s PATH configuration.`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Windows PowerShell:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`npm install `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`g `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`@openai`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`codex`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`codex `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`--`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`version`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`If PowerShell blocks `,_jsx(_components.code,{children:`npm.ps1`}),`, use `,_jsx(_components.code,{children:`npm.cmd`}),` instead of `,_jsx(_components.code,{children:`npm`}),`.`]}),_jsxs(_components.p,{children:[`The CLI screenshots use `,_jsx(_components.code,{children:`codex-cli 0.163.0`}),`. The separate profile-file format below applies to Codex `,_jsx(_components.code,{children:`0.134.0`}),` and later; see `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/config-file/config-advanced#profiles`,children:`configuration profiles`}),`.`]}),_jsx(Heading,{level:`3`,id:`2-create-a-dgrid-profile`,children:`2. Create a DGrid profile`}),_jsxs(_components.p,{children:[`Create `,_jsx(_components.code,{children:`~/.codex/dgrid.config.toml`}),` on macOS, or `,_jsx(_components.code,{children:`%USERPROFILE%\\\\.codex\\\\dgrid.config.toml`}),` on Windows. Paste this content into that file:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-6-sol\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model_provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dgrid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model_reasoning_effort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`web_search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"disabled\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`model_providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`dgrid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DGrid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`base_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.dgrid.ai/v1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`wire_api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"responses\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DGRID_API_KEY\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`On macOS, you can create and open the file using:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`touch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex/dgrid.config.toml\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -t`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex/dgrid.config.toml\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`If the profile already exists, edit its matching settings. Save as plain text with straight quotation marks. `,_jsx(_components.code,{children:`env_key`}),` is the variable’s name: keep `,_jsx(_components.code,{children:`DGRID_API_KEY`}),` here.`]}),_jsx(Frame,{caption:`Codex CLI installed and a separate DGrid profile created in Terminal`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=9ffe2a1a6ab6330e03095b19ebc221a4`,alt:`Codex CLI installed and a separate DGrid profile created in Terminal`,\"data-og-width\":`1756`,width:`1756`,\"data-og-height\":`1106`,height:`1106`,\"data-path\":`images/integrations/codex/cli-config.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=280\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=dc35a27ee677c5ac026e737cfd54ef10 280w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=560\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=40f83bb18b4657ffad1b9793440864c9 560w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=840\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=7113aec029f4f1a7b839486319de8761 840w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=1100\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=314da3f41cbc5ae0e45309dfc80aed73 1100w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=1650\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=ad69c1e57ff43b6139348a26e82f1042 1650w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-config.png?w=2500\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=3bec4157fb4fa7878f323c8485b0d17e 2500w`})}),_jsx(Heading,{level:`3`,id:`3-enter-the-api-key`,children:`3. Enter the API key`}),_jsx(_components.p,{children:`Use the same terminal where you will launch Codex.`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`macOS Terminal with Zsh:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` DGRID_API_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`read`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rs`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"DGRID_API_KEY?Paste your DGrid API key (hidden): \"`})]}),`\n`]})})}),_jsx(_components.p,{children:`Paste your key at the prompt and press Enter. No characters appear as you enter it. Wait for the terminal prompt to return before running the next command.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Windows PowerShell:`}),` run the first line, enter the key at the masked prompt, then run the remaining lines.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$dgridSecureKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` Read-Host`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Paste your DGrid API key (hidden)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AsSecureString`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`env:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DGRID_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`System.Net.NetworkCredential`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]::new(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $dgridSecureKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).Password`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`Remove-Variable`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dgridSecureKey`})]}),`\n`]})})}),_jsx(_components.p,{children:`This sets the key for the current terminal session. A new terminal requires entering it again.`}),_jsx(Heading,{level:`3`,id:`4-launch-codex-and-send-a-message`,children:`4. Launch Codex and send a message`}),_jsx(_components.p,{children:`On macOS:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dgrid-codex-demo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dgrid-codex-demo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --profile`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dgrid`})]}),`\n`]})})}),_jsx(_components.p,{children:`On Windows PowerShell:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`New-Item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`ItemType Directory `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`Force `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dgrid-codex-demo\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` Out-Null`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`Set-Location`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#CE9178`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dgrid-codex-demo\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`codex `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`--`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`profile dgrid`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`If Codex asks whether you trust the folder, confirm for this demo folder you created. Check the selected model is `,_jsx(_components.code,{children:`openai/gpt-6-sol`}),`. You can also use `,_jsx(_components.code,{children:`/status`}),` to inspect the session.`]}),_jsx(_components.p,{children:`Send:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Reply with exactly: DGrid connection successful`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`The expected response is:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DGrid connection successful`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(Frame,{caption:`Codex CLI displaying the response with the DGrid model selected`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=cf39b9052373d3d4a67a6b789ad33e6b`,alt:`Codex CLI displaying the response with the DGrid model selected`,\"data-og-width\":`1756`,width:`1756`,\"data-og-height\":`1106`,height:`1106`,\"data-path\":`images/integrations/codex/cli-success.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=280\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=6b9207d025c93ba82c579329028be0be 280w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=560\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=c89eeb2f4c4a05a00b1ee3a4243d0e53 560w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=840\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=337604b2a672411ed1ea8d983ce74444 840w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=1100\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=dd5aab44f3b3107535a39611934d5adb 1100w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=1650\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=fbd881e60f3545b0cebe632209ad3cbd 1650w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/cli-success.png?w=2500\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=2229164fb4687168736857f74b7de2cc 2500w`})}),_jsxs(_components.p,{children:[`If startup shows `,_jsx(_components.code,{children:`Running without the shared background server: --profile requires embedded mode.`}),`, it describes how this profile session runs. Use F2 to view the warning and Esc to close it, then continue. Some Mac keyboards use Fn + F2.`]})]}),_jsxs(Tab,{title:`Desktop (macOS)`,id:`desktop-macos`,\"data-child-heading-ids\":`[\"1-install-the-desktop-app\",\"2-configure-dgrid-in-the-main-file\",\"3-enter-the-key-and-launch-the-app\",\"4-choose-a-project-and-send-a-message\"]`,children:[_jsx(Heading,{level:`3`,id:`1-install-the-desktop-app`,children:`1. Install the desktop app`}),_jsxs(_components.p,{children:[`Open the `,_jsx(_components.a,{href:`https://chatgpt.com/download/`,children:`official download page`}),` and choose your operating system.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`macOS:`}),` open the downloaded installer, drag the app into Applications, and open it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Windows:`}),` run the downloaded installer and follow the installation prompts.`]}),`\n`]}),_jsxs(_components.p,{children:[`Choose the current app that includes Codex. The walkthrough below uses macOS and the application path `,_jsx(_components.code,{children:`/Applications/ChatGPT.app`}),`.`]}),_jsxs(_components.p,{children:[`For DGrid credentials, configure the provider and launch environment below. The initial `,_jsx(_components.code,{children:`OpenAI API key`}),` sign-in field does not itself set a DGrid base URL.`]}),_jsx(Heading,{level:`3`,id:`2-configure-dgrid-in-the-main-file`,children:`2. Configure DGrid in the main file`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Fully quit the desktop app with Command + Q.`}),` Closing its window may leave it running.`]}),_jsx(_components.p,{children:`In macOS Terminal, run:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`touch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex/config.toml\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -t`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/.codex/config.toml\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Use these settings in `,_jsx(_components.code,{children:`config.toml`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-6-sol\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model_provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dgrid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`model_reasoning_effort`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"medium\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`web_search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"disabled\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`model_providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`dgrid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DGrid\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`base_url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.dgrid.ai/v1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`wire_api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"responses\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env_key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"DGRID_API_KEY\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`For an existing file, update matching top-level keys and place them `,_jsx(_components.strong,{children:`before the first table header`}),` (`,_jsx(_components.code,{children:`[section]`}),`). Add the DGrid provider table at the end, or update it if present. Keep other settings and avoid duplicate keys or tables. Save as plain text with straight quotation marks.`]}),_jsxs(_components.p,{children:[`The app reads this main file. A CLI profile file alone does not select DGrid in the desktop app. Windows uses `,_jsx(_components.code,{children:`%USERPROFILE%\\\\.codex\\\\config.toml`}),`. See the `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/enterprise/connect-to-a-gateway`,children:`official gateway setup guide`}),`.`]}),_jsx(Heading,{level:`3`,id:`3-enter-the-key-and-launch-the-app`,children:`3. Enter the key and launch the app`}),_jsx(_components.p,{children:`In macOS Terminal with Zsh:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` DGRID_API_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`read`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rs`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"DGRID_API_KEY?Paste your DGrid API key (hidden): \"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Paste the DGrid key and press Enter. When the terminal prompt returns, run this `,_jsx(_components.strong,{children:`as a separate command in the same terminal`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`open`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -a`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/Applications/ChatGPT.app\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"DGRID_API_KEY=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$DGRID_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`If your installation is named `,_jsx(_components.code,{children:`Codex.app`}),`, substitute its actual application path.`]}),_jsx(_components.p,{children:`If Terminal reports that the application was already running and additional environment variables could not be set, fully quit with Command + Q and repeat the launch command.`}),_jsx(_components.p,{children:`The key is available to this launched app process. For a future launch from a new terminal, repeat the hidden key entry and launch command. Opening the app from the Dock does not supply a variable set only in this terminal.`}),_jsx(Heading,{level:`3`,id:`4-choose-a-project-and-send-a-message`,children:`4. Choose a project and send a message`}),_jsx(_components.p,{children:`Create a demo folder:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$HOME`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/dgrid-codex-demo\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`In the desktop app:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Choose project`}),` and select `,_jsx(_components.code,{children:`dgrid-codex-demo`}),` in your home folder.`]}),`\n`,_jsx(_components.li,{children:`Enter the prompt below.`}),`\n`,_jsx(_components.li,{children:`Click the send arrow.`}),`\n`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Reply with exactly: DGrid connection successful`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(Frame,{caption:`A project selected and the connection prompt ready to send in Codex`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=7d33a94934394af2f6bc5d8261376af6`,alt:`A project selected and the connection prompt ready to send in Codex`,\"data-og-width\":`2180`,width:`2180`,\"data-og-height\":`1520`,height:`1520`,\"data-path\":`images/integrations/codex/desktop-project.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=6f58624899ad937f6aac08ae6a35d540 280w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=25f8f8a0502eafdfef6ff6f383fb8958 560w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=1b7ba96fb89fc40afd5b9223b1a00da2 840w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=fc85307d8de0f695161ff9277792a096 1100w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=369c1d0f6305263348990f06e85578df 1650w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-project.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=8c3bd94068dd622f9856eb6510afd268 2500w`})}),_jsx(_components.p,{children:`The expected response is:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DGrid connection successful`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(Frame,{caption:`Codex desktop app displaying the model response`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=45a924ee655be767e92e4d697f414a74`,alt:`Codex desktop app displaying the model response`,\"data-og-width\":`2180`,width:`2180`,\"data-og-height\":`1520`,height:`1520`,\"data-path\":`images/integrations/codex/desktop-success.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=9312ce9b0bdb3b5de542a4b92c1e14e2 280w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=2124dc9be0e0459f173df635e98a6465 560w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=7e0370be5438f6f1961a5593f90b5472 840w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=aee86d96f03ebc74bfc17df726e60588 1100w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=c051972da7548843eaa8f0d3000c0be7 1650w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/desktop-success.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=9bc6c2ff8097c9709a3629ccb1714213 2500w`})}),_jsxs(_components.p,{children:[`Some versions display a label such as `,_jsx(_components.strong,{children:`Custom Medium`}),`. Check the complete model ID in your configuration and the corresponding DGrid request record to confirm the model and route used.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`confirm-the-request-in-dgrid`,children:`Confirm the request in DGrid`}),`\n`,_jsxs(_components.p,{children:[`Open DGrid’s request history and find the matching request time and complete model ID. A completed request appears with `,_jsx(_components.strong,{children:`Success`}),` status.`]}),`\n`,_jsx(Frame,{caption:`DGrid request history showing openai/gpt-6-sol and Success, with Key Name blurred`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=d6561588795a3cb621f9c96eb8bf9bd1`,alt:`DGrid request history showing openai/gpt-6-sol and Success, with Key Name blurred`,\"data-og-width\":`2170`,width:`2170`,\"data-og-height\":`725`,height:`725`,\"data-path\":`images/integrations/codex/dgrid-request-success-redacted.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=280\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=fece08bf19d314898524a2a706ae5241 280w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=560\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=55a2fa31422f381342c5fdfe75c6d331 560w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=840\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=542e5e1f79e8bb5a5ae63c6b16927b05 840w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=1100\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=b3418764832ec366aaa81c4e59dec10e 1100w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=1650\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=598c5d4edc1f4b518b7491d74a704d74 1650w, https://mintcdn.com/dgridai/QQLVyRrVjCz0-l8E/images/integrations/codex/dgrid-request-success-redacted.png?w=2500\u0026fit=max\u0026auto=format\u0026n=QQLVyRrVjCz0-l8E\u0026q=85\u0026s=819d7c6a6b6dff6d4fb2eb9d3aacbea4 2500w`})}),`\n`,_jsx(_components.p,{children:`The Key Name is blurred for privacy. Token counts and costs vary with the model and the context sent by Codex.`}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Symptom`}),_jsx(_components.th,{children:`What to check`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`codex: command not found`})}),_jsxs(_components.td,{children:[`Confirm installation completed. On macOS, run `,_jsx(_components.code,{children:`export PATH=\"$HOME/.local/bin:$PATH\"`}),` in the current terminal.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Missing API key`}),_jsxs(_components.td,{children:[`Set the key in the terminal that launches the client. `,_jsx(_components.code,{children:`env_key`}),` names a variable; it does not set its value.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`App already running; environment variables could not be set`}),_jsx(_components.td,{children:`Fully quit with Command + Q, then repeat the desktop launch command.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Desktop sign-in or request fails after opening from the Dock`}),_jsxs(_components.td,{children:[`Quit the app, enter the key in Terminal, and launch with `,_jsx(_components.code,{children:`--env`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Authentication or model access error`}),_jsx(_components.td,{children:`Check the DGrid key, credits, Responses support, and complete model ID.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Provider settings ignored`}),_jsxs(_components.td,{children:[`Use the user-level files above. Project-level `,_jsx(_components.code,{children:`.codex/config.toml`}),` cannot select a custom provider.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Return to an earlier desktop provider`}),_jsx(_components.td,{children:`Restore its model, provider, and authentication settings, then fully quit and reopen the app.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/config-file/config-reference`,children:`Codex configuration reference`}),` lists provider settings. This guide covers connecting and receiving a response; tools, web search, and longer agent tasks depend on the selected model and gateway support.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-resources`,children:`Related resources`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ai-gateway/integrations`,children:`Integration tutorials overview`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/ai-gateway/overview#quickstart`,children:`AI Gateway quickstart`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://blog.dgrid.ai/posts/2026-03-23/`,children:`Using Codex CLI with DGrid`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Use Codex with DGrid","sidebarTitle":"Codex","description":"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.","href":"/ai-gateway/integrations/codex"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Choose your setup","slug":"choose-your-setup","depth":2,"children":[{"title":"1. Install Node.js and Codex CLI","slug":"1-install-node-js-and-codex-cli","depth":3,"children":[],"tabId":"cli"},{"title":"2. Create a DGrid profile","slug":"2-create-a-dgrid-profile","depth":3,"children":[],"tabId":"cli"},{"title":"3. Enter the API key","slug":"3-enter-the-api-key","depth":3,"children":[],"tabId":"cli"},{"title":"4. Launch Codex and send a message","slug":"4-launch-codex-and-send-a-message","depth":3,"children":[],"tabId":"cli"},{"title":"1. Install the desktop app","slug":"1-install-the-desktop-app","depth":3,"children":[],"tabId":"desktop-macos"},{"title":"2. Configure DGrid in the main file","slug":"2-configure-dgrid-in-the-main-file","depth":3,"children":[],"tabId":"desktop-macos"},{"title":"3. Enter the key and launch the app","slug":"3-enter-the-key-and-launch-the-app","depth":3,"children":[],"tabId":"desktop-macos"},{"title":"4. Choose a project and send a message","slug":"4-choose-a-project-and-send-a-message","depth":3,"children":[],"tabId":"desktop-macos"}]},{"title":"Confirm the request in DGrid","slug":"confirm-the-request-in-dgrid","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Related resources","slug":"related-resources","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"dgridai","siteName":"DGrid AI Docs","title":"Use Codex with DGrid - DGrid AI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/ai-gateway/integrations/codex","matchLevel":0},"zh-Hant":{"href":"/zh-Hant/ai-gateway/integrations/codex","matchLevel":1},"ko":{"href":"/ko/ai-gateway/integrations/codex","matchLevel":1},"fr":{"href":"/fr/ai-gateway/integrations/codex","matchLevel":1},"es":{"href":"/es/ai-gateway/integrations/codex","matchLevel":1}}},"lastModified":"2026-10-23T06:55:58.243Z","originalFileLocation":"ai-gateway/integrations/codex.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"DGrid AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Use Codex with DGrid - DGrid AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DGrid AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.dgrid.ai/ai-gateway/integrations/codex\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dgridai.mintlify.app/_mintlify/api/og/v2?division=Integration+Tutorials\u0026amp;title=Use+Codex+with+DGrid\u0026amp;description=Configure+Codex+CLI+or+the+desktop+app+to+use+DGrid+AI+Gateway+through+the+Responses+API.\u0026amp;theme=a529b9f9a5638a188e68c5e8\u0026amp;signature=7099527117572f5a2b8f949e2dff6ecd84f3fd99a0fb6cf5bc8d9730f131f160\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Use Codex with DGrid - DGrid AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dgridai.mintlify.app/_mintlify/api/og/v2?division=Integration+Tutorials\u0026amp;title=Use+Codex+with+DGrid\u0026amp;description=Configure+Codex+CLI+or+the+desktop+app+to+use+DGrid+AI+Gateway+through+the+Responses+API.\u0026amp;theme=a529b9f9a5638a188e68c5e8\u0026amp;signature=7099527117572f5a2b8f949e2dff6ecd84f3fd99a0fb6cf5bc8d9730f131f160\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dgridai/TU6mO6G1dAMh6LGG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DGrid AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#65A30D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.dgrid.ai/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ai-gateway/integrations/codex.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.dgrid.ai/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://docs.dgrid.ai/zh-Hant/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.dgrid.ai/ko/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.dgrid.ai/fr/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.dgrid.ai/es/ai-gateway/integrations/codex\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.dgrid.ai/ai-gateway/integrations/codex\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.dgrid.ai/#organization\",\"name\":\"DGrid AI Docs\",\"url\":\"https://docs.dgrid.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dgridai/eFrQx07adP_MQw0i/logo/dgrid-horizontal-black.png?fit=max\u0026auto=format\u0026n=eFrQx07adP_MQw0i\u0026q=85\u0026s=aa7da302786ec058e3c91526a127736d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.dgrid.ai#website\",\"name\":\"DGrid AI Docs\",\"url\":\"https://docs.dgrid.ai\",\"publisher\":{\"@id\":\"https://docs.dgrid.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex#webpage\",\"url\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex\",\"name\":\"Use Codex with DGrid\",\"description\":\"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\",\"dateModified\":\"2026-10-23T06:55:58.243Z\",\"isPartOf\":{\"@id\":\"https://docs.dgrid.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI GATEWAY\",\"item\":\"https://docs.dgrid.ai/ai-gateway/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integration Tutorials\",\"item\":\"https://docs.dgrid.ai/ai-gateway/integrations\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Use Codex with DGrid\",\"item\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex#article\",\"headline\":\"Use Codex with DGrid\",\"name\":\"Use Codex with DGrid\",\"description\":\"Configure Codex CLI or the desktop app to use DGrid AI Gateway through the Responses API.\",\"url\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex\",\"mainEntityOfPage\":{\"@id\":\"https://docs.dgrid.ai/ai-gateway/integrations/codex#webpage\"},\"dateModified\":\"2026-10-23T06:55:58.243Z\",\"publisher\":{\"@id\":\"https://docs.dgrid.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.dgrid.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DGrid AI Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DGrid AI Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"GET STARTED","pages":[{"title":"DGrid AI Documentation","sidebarTitle":"Home","mode":"wide","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"CORE CONCEPTS","pages":[{"title":"What We Do","href":"/what-we-do"},{"title":"Background","href":"/background"},{"title":"DGrid's Solution","href":"/dgrid-solution"},{"title":"Node Operators","href":"/node-operators"}]},{"group":"AI GATEWAY","pages":[{"title":"AI Gateway","sidebarTitle":"Overview","href":"/ai-gateway/overview"},{"title":"Redeem a DGrid Credit Code","sidebarTitle":"Redeem a Credit Code","href":"/ai-gateway/redeem-credit-code"},{"title":"Auto Deposit","sidebarTitle":"Auto Deposit","href":"/ai-gateway/auto-deposit"},{"title":"Notifications","sidebarTitle":"Notifications","href":"/ai-gateway/notifications"},{"title":"Free Models Router","href":"/ai-gateway/free-models-router"},{"group":"Integration Tutorials","pages":[{"title":"Integration Tutorials","sidebarTitle":"Overview","href":"/ai-gateway/integrations"},{"title":"Use Cursor with DGrid","sidebarTitle":"Cursor","href":"/ai-gateway/integrations/cursor"},{"title":"Use Claude Code with DGrid","sidebarTitle":"Claude Code","description":"Connect Claude Code CLI or the desktop Code tab to DGrid AI Gateway and verify your first response.","href":"/ai-gateway/integrations/claude-code"},{"title":"Use Codex with DGrid","sidebarTitle":"Codex","href":"/ai-gateway/integrations/codex"},{"title":"Use OpenClaw with DGrid","sidebarTitle":"OpenClaw","description":"Install OpenClaw, configure DGrid as a custom provider, and send your first message in the dashboard.","href":"/ai-gateway/integrations/openclaw"},{"title":"Use Hermes Agent with DGrid","sidebarTitle":"Hermes Agent","href":"/ai-gateway/integrations/hermes-agent"},{"title":"Use Vercel AI SDK with DGrid","sidebarTitle":"Vercel AI SDK","href":"/ai-gateway/integrations/vercel-ai-sdk"}]},{"title":"Supported Countries and Regions","href":"/ai-gateway/supported-regions"}]},{"group":"AI ARENA","pages":[{"title":"AI Arena","sidebarTitle":"Overview","href":"/ai-arena/overview"},{"title":"Arena for Agent","href":"/ai-arena/arena-for-agent"}]},{"group":"ECOSYSTEM","pages":[{"title":"Dori Find Models","href":"/dori"},{"title":"DClaw","href":"/dclaw"}]},{"group":"$DGAI TOKEN","pages":[{"title":"What is $DGAI?","href":"/what-is-dgai"},{"title":"Core Functions","href":"/core-functions"},{"title":"Circulation Mechanism","href":"/circulation-mechanism"},{"title":"Token Distribution","href":"/token-distribution"}]},{"group":"GENESIS PREMIUM","pages":[{"title":"Program Overview","href":"/premium/program-overview"},{"title":"Exclusive Benefits","href":"/premium/exclusive-benefits"},{"title":"Purchase \u0026 Activation","href":"/premium/purchase-and-activation"},{"title":"Incentive Mechanism \u0026 Rewards","sidebarTitle":"Incentives \u0026 Rewards","href":"/premium/incentive-mechanism-and-rewards"},{"title":"Compliance and Regulatory","sidebarTitle":"Compliance","href":"/premium/compliance-and-regulatory"},{"title":"Legal Disclaimer","href":"/premium/legal-disclaimer"}]},{"group":"RESOURCES","pages":[{"title":"Roadmap","href":"/roadmap"},{"title":"Academic Research","href":"/academic-research"},{"title":"Terms of Service","href":"/ai-gateway/terms-of-service"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},{"language":"zh-Hant","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"部落格"},{"href":"https://telegram.me/dgrid_ai","label":"支援"}],"primary":{"type":"button","label":"儀表板","href":"https://dgrid.ai/overview"}},"pages":[{"title":"zh-Hant","href":"/zh-Hant/ai-gateway/integrations/codex"}]},{"language":"ko","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"블로그"},{"href":"https://telegram.me/dgrid_ai","label":"지원"}],"primary":{"type":"button","label":"대시보드","href":"https://dgrid.ai/overview"}},"pages":[{"title":"ko","href":"/ko/ai-gateway/integrations/codex"}]},{"language":"fr","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"Blog"},{"href":"https://telegram.me/dgrid_ai","label":"Assistance"}],"primary":{"type":"button","label":"Tableau de bord","href":"https://dgrid.ai/overview"}},"pages":[{"title":"fr","href":"/fr/ai-gateway/integrations/codex"}]},{"language":"es","navbar":{"links":[{"href":"https://blog.dgrid.ai/","label":"Blog"},{"href":"https://telegram.me/dgrid_ai","label":"Soporte"}],"primary":{"type":"button","label":"Panel","href":"https://dgrid.ai/overview"}},"pages":[{"title":"es","href":"/es/ai-gateway/integrations/codex"}]}]},"title":"Use Codex with DGrid - DGrid AI Docs","buildId":"dpl_5UDDZ9hnigTkoV7QtvQ39eUp84nu","deploymentId":"dpl_5UDDZ9hnigTkoV7QtvQ39eUp84nu","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CUTvSGqu.js","DynamicMarkdown-BGu84FgU.js","zoom-image-lightbox-ChyC7Hte.js","PlusIcon-DXkY3IBj.js","lightbox-handle-r17bVUz3.js"]}