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/claude-code","slug":"/agents/claude-code","pageMetadata":{"title":"Claude Code","description":"Install Claude Code and connect it to Floodgate with your API key and the Messages API.","icon":"/images/logos/claude-code.png","href":"/agents/claude-code"},"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 Claude Code and connect it to Floodgate with your API key and the Messages 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`,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 Claude Code to Floodgate with the Messages API. The example below uses `,_jsx(_components.code,{children:`claude-opus-5-5`}),`.`]}),`\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-claude-code`,children:`1. Install Claude Code`}),`\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://claude.ai/install.sh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` bash`})]}),`\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\":`#D4D4D4`},children:`irm https:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`//`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`claude.ai`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`install.ps1 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` iex`})]}),`\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:` @anthropic-ai/claude-code`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`2-set-the-endpoint-key-and-model`,children:`2. Set the endpoint, key, and model`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS, Linux, or WSL`,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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ANTHROPIC_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.floodgate.dev\"`})]}),`\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:` ANTHROPIC_AUTH_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`})]}),`\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:` ANTHROPIC_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"claude-opus-5-5\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Windows PowerShell`,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:`$`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`env:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ANTHROPIC_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.floodgate.dev\"`})]}),`\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:`ANTHROPIC_AUTH_TOKEN`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_API_KEY\"`})]}),`\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:`ANTHROPIC_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"claude-opus-5-5\"`})]}),`\n`]})})})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Claude Code appends `,_jsx(_components.code,{children:`/v1/messages`}),` itself. Use `,_jsx(_components.code,{children:`https://api.floodgate.dev`}),` without a trailing `,_jsx(_components.code,{children:`/v1`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`3-run-claude-code`,children:`3. Run Claude Code`}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`claude`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --model`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` claude-opus-5-5`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Run `,_jsx(_components.code,{children:`/status`}),` inside Claude Code to verify that the Anthropic base URL points to Floodgate and the model is `,_jsx(_components.code,{children:`claude-opus-5-5`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`other-models`,children:`Other models`}),`\n`,_jsx(_components.p,{children:`You can switch models depending on your task:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Claude Opus 5`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`claude`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --model`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` claude-opus-5`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Claude Sonnet 5`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`claude`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --model`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` claude-sonnet-5`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`save-your-settings`,children:`Save your settings`}),`\n`,_jsxs(_components.p,{children:[`Save this as `,_jsx(_components.code,{children:`~/.claude/settings.json`}),`. On Windows, use `,_jsx(_components.code,{children:`%USERPROFILE%\\\\.claude\\\\settings.json`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,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:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"env\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ANTHROPIC_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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ANTHROPIC_AUTH_TOKEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ANTHROPIC_MODEL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"claude-opus-5-5\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--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:`\"claude-opus-5-5\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\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":"Claude Code","description":"Install Claude Code and connect it to Floodgate with your API key and the Messages API.","icon":"/images/logos/claude-code.png","href":"/agents/claude-code"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you connect","slug":"before-you-connect","depth":2,"children":[]},{"title":"1. Install Claude Code","slug":"1-install-claude-code","depth":2,"children":[]},{"title":"2. Set the endpoint, key, and model","slug":"2-set-the-endpoint-key-and-model","depth":2,"children":[]},{"title":"3. Run Claude Code","slug":"3-run-claude-code","depth":2,"children":[{"title":"Other models","slug":"other-models","depth":3,"children":[]}]},{"title":"Save your settings","slug":"save-your-settings","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":"Claude Code - Floodgate Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T09:11:31.227Z","originalFileLocation":"agents/claude-code.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 Claude Code and connect it to Floodgate with your API key and the Messages API.\">\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=\"Claude Code - Floodgate Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install Claude Code and connect it to Floodgate with your API key and the Messages API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Floodgate Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.floodgate.dev/agents/claude-code\">\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=Claude+Code\u0026amp;description=Install+Claude+Code+and+connect+it+to+Floodgate+with+your+API+key+and+the+Messages+API.\u0026amp;theme=61b94853f425777028a39234\u0026amp;signature=26e1d7268e60fca982defd83945164411b42a36e2ba58d2f056bdfccbbe13b55\">\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=\"Claude Code - Floodgate Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install Claude Code and connect it to Floodgate with your API key and the Messages API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://floodgate.mintlify.site/_mintlify/api/og/v2?division=Coding+tools\u0026amp;title=Claude+Code\u0026amp;description=Install+Claude+Code+and+connect+it+to+Floodgate+with+your+API+key+and+the+Messages+API.\u0026amp;theme=61b94853f425777028a39234\u0026amp;signature=26e1d7268e60fca982defd83945164411b42a36e2ba58d2f056bdfccbbe13b55\">\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/claude-code\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agents/claude-code.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/claude-code#webpage\",\"url\":\"https://docs.floodgate.dev/agents/claude-code\",\"name\":\"Claude Code\",\"description\":\"Install Claude Code and connect it to Floodgate with your API key and the Messages API.\",\"dateModified\":\"2026-10-29T09:11:31.227Z\",\"isPartOf\":{\"@id\":\"https://docs.floodgate.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.floodgate.dev/agents/claude-code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.floodgate.dev/agents/claude-code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Coding tools\",\"item\":\"https://docs.floodgate.dev/agents/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Claude Code\",\"item\":\"https://docs.floodgate.dev/agents/claude-code\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.floodgate.dev/agents/claude-code#article\",\"headline\":\"Claude Code\",\"name\":\"Claude Code\",\"description\":\"Install Claude Code and connect it to Floodgate with your API key and the Messages API.\",\"url\":\"https://docs.floodgate.dev/agents/claude-code\",\"mainEntityOfPage\":{\"@id\":\"https://docs.floodgate.dev/agents/claude-code#webpage\"},\"dateModified\":\"2026-10-29T09:11:31.227Z\",\"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/claude-code.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","icon":"terminal","href":"/agents/overview"},{"title":"Codex","description":"Install Codex CLI and connect it to Floodgate.","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/codex.png","href":"/agents/codex"},{"title":"Claude Code","icon":"https://mintlify.s3.us-west-1.amazonaws.com/floodgate/images/logos/claude-code.png","href":"/agents/claude-code"},{"title":"OpenCode","description":"Install OpenCode and add Floodgate as a custom provider.","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":"Claude Code - Floodgate Documentation","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}