Add a script, function, or MCP tool that calls Floodgate’s image, speech, or video API and saves the result. Your coding client can call this tool while you work.See Function tools for tool setup and Coding tools for the media workflow.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Floodgate Documentation","description":"Simple guides for using Floodgate models with APIs and coding agents.","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/floodgate/Elz3RYUKgx3tfz9c/logo/new-logo.png?fit=max\u0026auto=format\u0026n=Elz3RYUKgx3tfz9c\u0026q=85\u0026s=5853455005acaaf6ed4fabd38434c2d1","dark":"https://mintcdn.com/floodgate/Elz3RYUKgx3tfz9c/logo/new-logo.png?fit=max\u0026auto=format\u0026n=Elz3RYUKgx3tfz9c\u0026q=85\u0026s=5853455005acaaf6ed4fabd38434c2d1","href":"https://floodgate.dev"},"favicon":"https://mintcdn.com/floodgate/E2nSug2XSK7Fr_Kk/favicon.svg?fit=max\u0026auto=format\u0026n=E2nSug2XSK7Fr_Kk\u0026q=85\u0026s=f07cddbfa685580cf3f789c1e9ae023b","navbar":{"links":[],"primary":{"type":"button","label":"Dashboard","href":"https://floodgate.dev"}},"footer":{"socials":{"telegram":"https://t.me/floodgatedev"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","hidden":true,"href":"https://mintlify.com/docs"},{"anchor":"Blog","icon":"newspaper","hidden":true,"href":"https://mintlify.com/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"floodgate","hasAudioNarration":false,"actualSubdomain":"floodgate","customDomains":["docs.floodgate.dev"],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-floodgate-e69b4983","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aedf8faf99c6f493ac9ea6b","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"API reference","count":15},{"language":"default","tag":"Coding tools","count":7},{"language":"default","tag":"Video","count":7},{"language":"default","tag":"Getting started","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"site-roles","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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"agents/codex","slug":"/agents/codex","pageMetadata":{"title":"Codex","description":"Install Codex CLI and connect it to Floodgate.","icon":"/images/logos/codex.png","href":"/agents/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: \"Install Codex CLI and connect it to Floodgate.\"\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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Connect Codex to Floodgate with the Responses API. The example below uses `,_jsx(_components.code,{children:`gpt-6-sol`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-connect`,children:`Before you connect`}),`\n`,_jsxs(_components.p,{children:[`Add funds to your `,_jsx(_components.a,{href:`/billing`,children:`balance`}),`, then `,_jsx(_components.a,{href:`/routing-groups`,children:`configure your API key`}),` with routing groups and a spending limit.`]}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`https://floodgate.dev/models`,children:`Model Square`}),` to find models, prices, and supported APIs.`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-install-codex`,children:`1. Install Codex`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS, Linux, or WSL`,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:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -fsSL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://chatgpt.com/codex/install.sh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` sh`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`npm`,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:`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`})]}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`Check the installation:`}),`\n`,_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:`codex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --version`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`2-set-your-api-key`,children:`2. Set your API key`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS, Linux, or WSL`,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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FLOODGATE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Windows PowerShell`,numberOfLines:`1`,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:`1`,children:[_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:`FLOODGATE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`3-configure-floodgate`,children:`3. Configure Floodgate`}),`\n`,_jsxs(_components.p,{children:[`Open `,_jsx(_components.code,{children:`~/.codex/config.toml`}),`. On Windows, use `,_jsx(_components.code,{children:`%USERPROFILE%\\\\.codex\\\\config.toml`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,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:`\"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:`\"floodgate\"`})]}),`\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:`floodgate`}),_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:`\"Floodgate\"`})]}),`\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.floodgate.dev/v1\"`})]}),`\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:`\"FLOODGATE_API_KEY\"`})]}),`\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`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Put the provider configuration in your user configuration file at `,_jsx(_components.code,{children:`~/.codex/config.toml`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`4-run-codex`,children:`4. Run Codex`}),`\n`,_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /path/to/your/project`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`codex`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`To use another model that supports Responses:`}),`\n`,_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:`codex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` gpt-6.1-terra`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use model IDs from your key’s `,_jsx(_components.a,{href:`/models#list-models-for-your-key`,children:`model list`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`The provider fields follow the `,_jsx(_components.a,{href:`https://learn.chatgpt.com/docs/config-file/config-reference`,children:`official Codex configuration reference`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Inside Codex, run `,_jsx(_components.code,{children:`/status`}),` to confirm the selected model and provider.`]}),`\n`,_jsx(Heading,{level:`2`,id:`generate-images-speech-and-video`,children:`Generate images, speech, and video`}),`\n`,_jsxs(_components.p,{children:[`Add a script, function, or MCP tool that calls Floodgate’s `,_jsx(_components.a,{href:`/images`,children:`image`}),`, `,_jsx(_components.a,{href:`/audio`,children:`speech`}),`, or `,_jsx(_components.a,{href:`/videos`,children:`video`}),` API and saves the result. Your coding client can call this tool while you work.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/tools`,children:`Function tools`}),` for tool setup and `,_jsx(_components.a,{href:`/agents/overview`,children:`Coding tools`}),` for the media workflow.`]})]})}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":"Codex","description":"Install Codex CLI and connect it to Floodgate.","icon":"/images/logos/codex.png","href":"/agents/codex"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you connect","slug":"before-you-connect","depth":2,"children":[]},{"title":"1. Install Codex","slug":"1-install-codex","depth":2,"children":[]},{"title":"2. Set your API key","slug":"2-set-your-api-key","depth":2,"children":[]},{"title":"3. Configure Floodgate","slug":"3-configure-floodgate","depth":2,"children":[]},{"title":"4. Run Codex","slug":"4-run-codex","depth":2,"children":[]},{"title":"Generate images, speech, and video","slug":"generate-images-speech-and-video","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"floodgate","siteName":"Floodgate Documentation","title":"Codex - Floodgate Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T09:11:31.229Z","originalFileLocation":"agents/codex.mdx"},"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=\"Install Codex CLI and connect it to Floodgate.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Floodgate Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_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/floodgate/NUpstkAE3mhxqp8G/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Codex - Floodgate Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install Codex CLI and connect it to Floodgate.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Floodgate Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.floodgate.dev/agents/codex\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://floodgate.mintlify.site/_mintlify/api/og/v2?division=Coding+tools\u0026amp;title=Codex\u0026amp;description=Install+Codex+CLI+and+connect+it+to+Floodgate.\u0026amp;theme=61b94853f425777028a39234\u0026amp;signature=f2f1306a3857ff3de8e25b269f8a34887a3b505289a63712f61db8aaeb471724\">\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=\"Codex - Floodgate Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install Codex CLI and connect it to Floodgate.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://floodgate.mintlify.site/_mintlify/api/og/v2?division=Coding+tools\u0026amp;title=Codex\u0026amp;description=Install+Codex+CLI+and+connect+it+to+Floodgate.\u0026amp;theme=61b94853f425777028a39234\u0026amp;signature=f2f1306a3857ff3de8e25b269f8a34887a3b505289a63712f61db8aaeb471724\">\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/floodgate/NUpstkAE3mhxqp8G/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Floodgate Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.floodgate.dev/agents/codex\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agents/codex.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.floodgate.dev/#organization\",\"name\":\"Floodgate Documentation\",\"url\":\"https://docs.floodgate.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/floodgate/Elz3RYUKgx3tfz9c/logo/new-logo.png?fit=max\u0026auto=format\u0026n=Elz3RYUKgx3tfz9c\u0026q=85\u0026s=5853455005acaaf6ed4fabd38434c2d1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.floodgate.dev#website\",\"name\":\"Floodgate Documentation\",\"url\":\"https://docs.floodgate.dev\",\"publisher\":{\"@id\":\"https://docs.floodgate.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.floodgate.dev/agents/codex#webpage\",\"url\":\"https://docs.floodgate.dev/agents/codex\",\"name\":\"Codex\",\"description\":\"Install Codex CLI and connect it to Floodgate.\",\"dateModified\":\"2026-10-29T09:11:31.229Z\",\"isPartOf\":{\"@id\":\"https://docs.floodgate.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.floodgate.dev/agents/codex#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.floodgate.dev/agents/codex#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Coding tools\",\"item\":\"https://docs.floodgate.dev/agents/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Codex\",\"item\":\"https://docs.floodgate.dev/agents/codex\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.floodgate.dev/agents/codex#article\",\"headline\":\"Codex\",\"name\":\"Codex\",\"description\":\"Install Codex CLI and connect it to Floodgate.\",\"url\":\"https://docs.floodgate.dev/agents/codex\",\"mainEntityOfPage\":{\"@id\":\"https://docs.floodgate.dev/agents/codex#webpage\"},\"dateModified\":\"2026-10-29T09:11:31.229Z\",\"publisher\":{\"@id\":\"https://docs.floodgate.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.floodgate.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Floodgate Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Floodgate Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/agents/codex.md","siteName":"Floodgate Documentation","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","hidden":true,"href":"https://mintlify.com/docs"},{"anchor":"Blog","icon":"newspaper","hidden":true,"href":"https://mintlify.com/blog"}]},"groups":[{"group":"Getting started","pages":[{"title":"Floodgate documentation","sidebarTitle":"Introduction","icon":"book-open","href":"/index"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"Configure API keys and routing groups","sidebarTitle":"Keys and routing","icon":"key","href":"/routing-groups"},{"title":"Balance and account tiers","sidebarTitle":"Billing and tiers","icon":"credit-card","href":"/billing"},{"title":"Models","icon":"cubes","href":"/models"},{"title":"Referral rewards","sidebarTitle":"Referrals","href":"/referrals"},{"title":"Reseller program","sidebarTitle":"Reseller program","icon":"users","href":"/reseller-program"}]},{"group":"Coding tools","icon":"terminal","pages":[{"title":"Connect coding tools","sidebarTitle":"Coding tools","description":"Connect Codex, Claude Code, OpenCode, Pi, Grok Build, or Aider to Floodgate, and add tools for image, speech, and video generation.","icon":"terminal","href":"/agents/overview"},{"title":"Codex","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/codex.png","href":"/agents/codex"},{"title":"Claude Code","description":"Install Claude Code and connect it to Floodgate with your API key and the Messages API.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/claude-code.png","href":"/agents/claude-code"},{"title":"OpenCode","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/opencode.png","href":"/agents/opencode"},{"title":"Pi","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/pi.png","href":"/agents/pi"},{"title":"Grok Build","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/grok-build.png","href":"/agents/grok-build"},{"title":"Aider","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/aider.png","href":"/agents/aider"}]},{"group":"API reference","icon":"code","pages":[{"title":"Text generation APIs","icon":"code","sidebarTitle":"Text generation","href":"/openai-compatible"},{"title":"Image generation","icon":"image","sidebarTitle":"Images","href":"/images"},{"group":"Video","icon":"video","pages":[{"title":"Video generation","sidebarTitle":"Overview","icon":"video","href":"/videos"},{"title":"Kling video API","sidebarTitle":"Kling","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/kling.png","href":"/kling"},{"title":"Seedance video API","sidebarTitle":"Seedance","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/bytedance.png","href":"/seedance"},{"title":"Veo video API","sidebarTitle":"Veo","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/google.png","href":"/veo"},{"title":"MiniMax H3 video API","sidebarTitle":"MiniMax H3","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/minimax.png","href":"/h3"},{"title":"Wan and Happyhorse video APIs","sidebarTitle":"Wan / Happyhorse","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/alibabacloud.png","href":"/alibaba"},{"title":"Grok video API","sidebarTitle":"Grok","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/providers/grok.png","href":"/grok"}]},{"title":"Embeddings","sidebarTitle":"Embeddings","icon":"list","href":"/embeddings"},{"title":"Audio and speech","sidebarTitle":"Audio","icon":"volume-high","href":"/audio"},{"title":"Account and usage","icon":"user","sidebarTitle":"Account and usage","href":"/api-reference/account-usage"},{"title":"Reseller account API","sidebarTitle":"Reseller API","icon":"users","href":"/api-reference/reseller"},{"title":"Function tools and MCP","sidebarTitle":"Function tools","icon":"puzzle-piece","href":"/tools"},{"title":"Troubleshooting","icon":"wrench","href":"/troubleshooting"}]}]},"basePath":"","title":"Codex - Floodgate Documentation","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}