Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.
Claude Code is the agentic coding tool that runs in your terminal (documentation). It speaks the Anthropic Messages format, and the UncensoredGPT API serves that format natively (/v1/messages), so it connects with two environment variables.
1. Set your API key
Create a key in the Console if you don’t have one, then export it:
ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL control what the sonnet and haiku aliases resolve to — Claude Code uses the haiku alias for background tasks, so pointing it at a fast model like uncensoredgpt/glm-5.3-flash-uncensored keeps those cheap.
You can also switch models mid-session with /model <model-id>:
/model uncensoredgpt/glm-5.3-uncensored
Make it permanent with settings.json
Instead of exporting variables on every shell, put them in ~/.claude/settings.json:
The settings file stores the key in plain text. Prefer the environment-variable setup on shared machines, and never commit ~/.claude/settings.json to a repository.
Good to know
Everything Claude Code sends goes to the Messages endpoint in the Anthropic format — request and response bodies follow that spec exactly.
Tool calling (Claude Code’s bread and butter) is fully supported.
Context windows per model are listed on the coding agents overview — for long sessions, the 1M-context models are a good fit.
Usage and cost of every request appear in the Console’s Usage page.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"UncensoredGPT","description":"An AI that answers anything — without filters, without limits, without censorship. Chat in the browser, or build on the pay-per-token API.","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/neural-net-solutions/FUV2X8I_k4CTFbWx/logo/light.png?fit=max\u0026auto=format\u0026n=FUV2X8I_k4CTFbWx\u0026q=85\u0026s=4bea7ce832612029487823546bec26eb","dark":"https://mintcdn.com/neural-net-solutions/FUV2X8I_k4CTFbWx/logo/dark.png?fit=max\u0026auto=format\u0026n=FUV2X8I_k4CTFbWx\u0026q=85\u0026s=1317c1fdb47ebdc4c25e975a94052563"},"favicon":"https://mintcdn.com/neural-net-solutions/FUV2X8I_k4CTFbWx/favicon.png?fit=max\u0026auto=format\u0026n=FUV2X8I_k4CTFbWx\u0026q=85\u0026s=867e8ea11dbefdf6dff9f5e0cb2ecdbd","navbar":{"links":[{"href":"https://chat.uncensoredgpt.ai","label":"Chat"},{"href":"mailto:info@uncensoredgpt.ai","label":"Support"}],"primary":{"type":"button","label":"Console","href":"https://console.uncensoredgpt.ai"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"neural-net-solutions","hasAudioNarration":false,"actualSubdomain":"neural-net-solutions","customDomains":["docs.uncensoredgpt.ai"],"gitSource":{"type":"github","owner":"neuralnet-hub","repo":"uncensoredgpt-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6adf3f12362b83303f2064b8"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae33d454c2492fe62cb7a8c","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"API Reference","count":34},{"language":"default","tag":"Documentation","count":32},{"language":"default","tag":"Introduction","count":11},{"language":"default","tag":"Chat","count":9},{"language":"default","tag":"Console","count":7},{"language":"default","tag":"Files","count":5},{"language":"default","tag":"Coding agents","count":4},{"language":"default","tag":"Batches","count":4},{"language":"default","tag":"Responses","count":4},{"language":"default","tag":"Account \u0026 Support","count":3}]},"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":"workos-onboarding","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":"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":"assistant-v5","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":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"img.nav-logo{height:1.25rem!important}"}],"page":{"pagePath":"api-reference/agents/claude-code","slug":"/api-reference/agents/claude-code","pageMetadata":{"title":"Connect Claude Code","description":"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.","href":"/api-reference/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: \"Point Claude Code at UncensoredGPT through the Anthropic-compatible 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`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://claude.com/claude-code`,children:`Claude Code`}),` is the agentic coding tool that runs in your terminal (`,_jsx(_components.a,{href:`https://code.claude.com/docs`,children:`documentation`}),`). It speaks the Anthropic Messages format, and the UncensoredGPT API serves that format natively (`,_jsx(_components.code,{children:`/v1/messages`}),`), so it connects with two environment variables.`]}),`\n`,_jsx(Heading,{level:`2`,id:`1-set-your-api-key`,children:`1. Set your API key`}),`\n`,_jsxs(_components.p,{children:[`Create a key in the `,_jsx(_components.a,{href:`https://console.uncensoredgpt.ai`,children:`Console`}),` if you don’t have one, then export it:`]}),`\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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UNCENSOREDGPT_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk-...\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`2-point-claude-code-at-uncensoredgpt`,children:`2. Point Claude Code at UncensoredGPT`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,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.uncensoredgpt.ai\"`})]}),`\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:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$UNCENSOREDGPT_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`claude`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`That’s it — `,_jsx(_components.code,{children:`ANTHROPIC_BASE_URL`}),` routes every request to UncensoredGPT, and `,_jsx(_components.code,{children:`ANTHROPIC_AUTH_TOKEN`}),` authenticates them.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ANTHROPIC_BASE_URL`}),` has no `,_jsx(_components.code,{children:`/v1`}),` suffix. Claude Code appends the endpoint paths itself.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`3-pick-your-models`,children:`3. Pick your models`}),`\n`,_jsxs(_components.p,{children:[`Claude Code’s model aliases (`,_jsx(_components.code,{children:`sonnet`}),`, `,_jsx(_components.code,{children:`haiku`}),`, …) don’t exist on UncensoredGPT, so map them to real model IDs:`]}),`\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:[_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:`\"uncensoredgpt/qwen3.8-27b-uncensored\"`})]}),`\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_DEFAULT_SONNET_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uncensoredgpt/qwen3.8-27b-uncensored\"`})]}),`\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_DEFAULT_HAIKU_MODEL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uncensoredgpt/glm-5.3-flash-uncensored\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`claude`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ANTHROPIC_MODEL`}),` sets the model for the session.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ANTHROPIC_DEFAULT_SONNET_MODEL`}),` and `,_jsx(_components.code,{children:`ANTHROPIC_DEFAULT_HAIKU_MODEL`}),` control what the `,_jsx(_components.code,{children:`sonnet`}),` and `,_jsx(_components.code,{children:`haiku`}),` aliases resolve to — Claude Code uses the haiku alias for background tasks, so pointing it at a fast model like `,_jsx(_components.code,{children:`uncensoredgpt/glm-5.3-flash-uncensored`}),` keeps those cheap.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You can also switch models mid-session with `,_jsx(_components.code,{children:`/model \u003cmodel-id>`}),`:`]}),`\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:`/model uncensoredgpt/glm-5.3-uncensored`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`make-it-permanent-with-settings-json`,children:`Make it permanent with settings.json`}),`\n`,_jsxs(_components.p,{children:[`Instead of exporting variables on every shell, put them in `,_jsx(_components.code,{children:`~/.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.uncensoredgpt.ai\"`}),_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:`\"sk-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:`\"uncensoredgpt/qwen3.8-27b-uncensored\"`}),_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_DEFAULT_HAIKU_MODEL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"uncensoredgpt/glm-5.3-flash-uncensored\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The settings file stores the key in plain text. Prefer the environment-variable setup on shared machines, and never commit `,_jsx(_components.code,{children:`~/.claude/settings.json`}),` to a repository.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`good-to-know`,children:`Good to know`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Everything Claude Code sends goes to the `,_jsx(_components.a,{href:`/api-reference/endpoints/messages/create-message`,children:`Messages endpoint`}),` in the Anthropic format — request and response bodies follow that spec exactly.`]}),`\n`,_jsx(_components.li,{children:`Tool calling (Claude Code’s bread and butter) is fully supported.`}),`\n`,_jsxs(_components.li,{children:[`Context windows per model are listed on the `,_jsx(_components.a,{href:`/api-reference/agents`,children:`coding agents overview`}),` — for long sessions, the 1M-context models are a good fit.`]}),`\n`,_jsxs(_components.li,{children:[`Usage and cost of every request appear in the Console’s `,_jsx(_components.a,{href:`/console/usage`,children:`Usage`}),` page.`]}),`\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":"Connect Claude Code","description":"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.","href":"/api-reference/agents/claude-code"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"1. Set your API key","slug":"1-set-your-api-key","depth":2,"children":[]},{"title":"2. Point Claude Code at UncensoredGPT","slug":"2-point-claude-code-at-uncensoredgpt","depth":2,"children":[]},{"title":"3. Pick your models","slug":"3-pick-your-models","depth":2,"children":[]},{"title":"Make it permanent with settings.json","slug":"make-it-permanent-with-settings-json","depth":2,"children":[]},{"title":"Good to know","slug":"good-to-know","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"neural-net-solutions","siteName":"UncensoredGPT","title":"Connect Claude Code - UncensoredGPT","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T13:42:50.880Z","originalFileLocation":"api-reference/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=\"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"UncensoredGPT\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_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/neural-net-solutions/MMPVhqwsyNdRnLtv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Connect Claude Code - UncensoredGPT\">\u003cmeta data-mint-head property=\"og:description\" content=\"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"UncensoredGPT\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://neural-net-solutions.mintlify.site/_mintlify/api/og/v2?division=Coding+agents\u0026amp;title=Connect+Claude+Code\u0026amp;description=Point+Claude+Code+at+UncensoredGPT+through+the+Anthropic-compatible+Messages+API.\u0026amp;theme=659084c614e93b3b08f2f8c3\u0026amp;signature=76fd494ab8f537f43d2d67bfdf38f1e6198fda35ff14c5fa65763ae8b7fe1211\">\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=\"Connect Claude Code - UncensoredGPT\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://neural-net-solutions.mintlify.site/_mintlify/api/og/v2?division=Coding+agents\u0026amp;title=Connect+Claude+Code\u0026amp;description=Point+Claude+Code+at+UncensoredGPT+through+the+Anthropic-compatible+Messages+API.\u0026amp;theme=659084c614e93b3b08f2f8c3\u0026amp;signature=76fd494ab8f537f43d2d67bfdf38f1e6198fda35ff14c5fa65763ae8b7fe1211\">\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/neural-net-solutions/MMPVhqwsyNdRnLtv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"UncensoredGPT\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.uncensoredgpt.ai/api-reference/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=\"/api-reference/agents/claude-code.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.uncensoredgpt.ai/#organization\",\"name\":\"UncensoredGPT\",\"url\":\"https://docs.uncensoredgpt.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/neural-net-solutions/FUV2X8I_k4CTFbWx/logo/light.png?fit=max\u0026auto=format\u0026n=FUV2X8I_k4CTFbWx\u0026q=85\u0026s=4bea7ce832612029487823546bec26eb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.uncensoredgpt.ai#website\",\"name\":\"UncensoredGPT\",\"url\":\"https://docs.uncensoredgpt.ai\",\"publisher\":{\"@id\":\"https://docs.uncensoredgpt.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code#webpage\",\"url\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code\",\"name\":\"Connect Claude Code\",\"description\":\"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.\",\"dateModified\":\"2026-10-27T13:42:50.880Z\",\"isPartOf\":{\"@id\":\"https://docs.uncensoredgpt.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Coding agents\",\"item\":\"https://docs.uncensoredgpt.ai/api-reference/agents\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Connect Claude Code\",\"item\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code#article\",\"headline\":\"Connect Claude Code\",\"name\":\"Connect Claude Code\",\"description\":\"Point Claude Code at UncensoredGPT through the Anthropic-compatible Messages API.\",\"url\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code\",\"mainEntityOfPage\":{\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/agents/claude-code#webpage\"},\"dateModified\":\"2026-10-27T13:42:50.880Z\",\"publisher\":{\"@id\":\"https://docs.uncensoredgpt.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.uncensoredgpt.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"UncensoredGPT\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"UncensoredGPT\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/agents/claude-code.md","siteName":"UncensoredGPT","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Introduction","pages":[{"title":"API Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Models","href":"/api-reference/models"},{"title":"Model catalog","href":"/api-reference/model-catalog"},{"title":"Rate Limits","href":"/api-reference/rate-limits"},{"title":"Error Codes","href":"/api-reference/error-codes"},{"title":"Usage \u0026 Billing","href":"/api-reference/usage-and-billing"}]},{"group":"Coding agents","pages":[{"title":"Use with coding agents","href":"/api-reference/agents/index"},{"title":"Connect OpenCode","href":"/api-reference/agents/opencode"},{"title":"Connect Pi","description":"Configure the Pi coding agent to use UncensoredGPT models through a custom OpenAI-compatible provider.","href":"/api-reference/agents/pi"},{"title":"Connect Claude Code","href":"/api-reference/agents/claude-code"}]},{"group":"Chat","pages":[{"title":"Create chat completion","openapi":"api-reference/openapi.json post /v1/chat/completions","description":"Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`\n\n```bash\ncurl -X POST https://api.uncensoredgpt.ai/v1/chat/completions \n-H \"Content-Type: application/json\" \n-H \"Authorization: Bearer $UNCENSOREDGPT_API_KEY\" \n-d '{\n \"model\": \"uncensoredgpt/qwen3.8-27b-uncensored\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n}'\n```","href":"/api-reference/endpoints/chat/create-chat-completion"}]},{"group":"Completions","pages":[{"title":"Create completion","openapi":"api-reference/openapi.json post /v1/completions","href":"/api-reference/endpoints/completions/create-completion"}]},{"group":"Embeddings","pages":[{"title":"Create embeddings","openapi":"api-reference/openapi.json post /v1/embeddings","href":"/api-reference/endpoints/embeddings/create-embeddings"}]},{"group":"Responses","pages":[{"title":"Create response","openapi":"api-reference/openapi.json post /v1/responses","href":"/api-reference/endpoints/responses/create-response"},{"title":"Retrieve response","openapi":"api-reference/openapi.json get /v1/responses/{response_id}","href":"/api-reference/endpoints/responses/retrieve-response"},{"title":"Delete response","openapi":"api-reference/openapi.json delete /v1/responses/{response_id}","href":"/api-reference/endpoints/responses/delete-response"},{"title":"List response input items","openapi":"api-reference/openapi.json get /v1/responses/{response_id}/input_items","href":"/api-reference/endpoints/responses/list-response-input-items"}]},{"group":"Models","pages":[{"title":"List models","openapi":"api-reference/openapi.json get /v1/models","href":"/api-reference/endpoints/models/list-models"},{"title":"Retrieve model","openapi":"api-reference/openapi.json get /v1/models/{model_id}","href":"/api-reference/endpoints/models/retrieve-model"}]},{"group":"Moderations","pages":[{"title":"Create moderation","openapi":"api-reference/openapi.json post /v1/moderations","href":"/api-reference/endpoints/moderations/create-moderation"}]},{"group":"Batches","pages":[{"title":"Create batch","openapi":"api-reference/openapi.json post /v1/batches","href":"/api-reference/endpoints/batches/create-batch"},{"title":"List batches","openapi":"api-reference/openapi.json get /v1/batches","href":"/api-reference/endpoints/batches/list-batches"},{"title":"Retrieve batch","openapi":"api-reference/openapi.json get /v1/batches/{batch_id}","href":"/api-reference/endpoints/batches/retrieve-batch"},{"title":"Cancel batch","openapi":"api-reference/openapi.json post /v1/batches/{batch_id}/cancel","href":"/api-reference/endpoints/batches/cancel-batch"}]},{"group":"Files","pages":[{"title":"Upload file","openapi":"api-reference/openapi.json post /v1/files","href":"/api-reference/endpoints/files/upload-file"},{"title":"List files","openapi":"api-reference/openapi.json get /v1/files","href":"/api-reference/endpoints/files/list-files"},{"title":"Retrieve file","openapi":"api-reference/openapi.json get /v1/files/{file_id}","href":"/api-reference/endpoints/files/retrieve-file"},{"title":"Delete file","openapi":"api-reference/openapi.json delete /v1/files/{file_id}","href":"/api-reference/endpoints/files/delete-file"},{"title":"Download file content","openapi":"api-reference/openapi.json get /v1/files/{file_id}/content","href":"/api-reference/endpoints/files/download-file-content"}]},{"group":"Images","pages":[{"title":"Create image","openapi":"api-reference/openapi.json post /v1/images/generations","href":"/api-reference/endpoints/images/create-image"},{"title":"Edit image","openapi":"api-reference/openapi.json post /v1/images/edits","href":"/api-reference/endpoints/images/edit-image"}]},{"group":"Messages","pages":[{"title":"Create message","openapi":"api-reference/openapi.json post /v1/messages","href":"/api-reference/endpoints/messages/create-message"},{"title":"Count message tokens","openapi":"api-reference/openapi.json post /v1/messages/count_tokens","href":"/api-reference/endpoints/messages/count-message-tokens"}]}]}]},"basePath":"","title":"Connect Claude Code - UncensoredGPT","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}