Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.
The API uses API keys to authenticate requests. Every request must include your key in the Authorization header:
Authorization: Bearer $UNCENSOREDGPT_API_KEY
Keep your API keys private. Do not share them in browser code, public repositories, or chat messages. If a key is compromised, delete it in the Console and create a new one.
In the Console you can create multiple keys, rename or delete them, and set per-key limits:
Token limits — tokens per minute (TPM) and requests per minute (RPM).
Allowed models — restrict a key to a subset of the catalog.
Allowed routes — restrict a key to specific endpoints.
All keys on your account draw from the same credit balance. See Usage & Billing for details.
{"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/authentication","slug":"/api-reference/authentication","pageMetadata":{"title":"Authentication","description":"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.","href":"/api-reference/authentication"},"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: \"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._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:[`The API uses API keys to authenticate requests. Every request must include your key in the `,_jsx(_components.code,{children:`Authorization`}),` header:`]}),`\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:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $UNCENSOREDGPT_API_KEY`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep your API keys private. Do not share them in browser code, public repositories, or chat messages. If a key is compromised, delete it in the Console and create a new one.`})}),`\n`,_jsx(Heading,{level:`2`,id:`create-an-api-key`,children:`Create an API key`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Sign in to the `,_jsx(_components.a,{href:`https://console.uncensoredgpt.ai`,children:`UncensoredGPT Console`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`Keys`}),` and click `,_jsx(_components.strong,{children:`Create key`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Give the key a name (for example, `,_jsx(_components.code,{children:`my-app`}),`) and set any limits you need.`]}),`\n`,_jsx(_components.li,{children:`Copy the key. It is shown only once — store it somewhere safe.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Keys start with `,_jsx(_components.code,{children:`sk-`}),` and are tied to your account’s credit balance and rate limits.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-the-key-in-code`,children:`Use the key in code`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`12`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` 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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` 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/v1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` 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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello!\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`12`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"openai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_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:` apiKey:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.uncensoredgpt.ai/v1\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_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:` model:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Hello!\"`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`the-messages-endpoints`,children:`The Messages endpoints`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`/api-reference/endpoints/messages/create-message`,children:`Anthropic-format Messages endpoints`}),` also accept the `,_jsx(_components.code,{children:`x-api-key`}),` header, so clients that send keys that way work unchanged:`]}),`\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:`x-api-key:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $UNCENSOREDGPT_API_KEY`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`managing-keys`,children:`Managing keys`}),`\n`,_jsx(_components.p,{children:`In the Console you can create multiple keys, rename or delete them, and set per-key limits:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Token limits`}),` — tokens per minute (TPM) and requests per minute (RPM).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Allowed models`}),` — restrict a key to a subset of the catalog.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Allowed routes`}),` — restrict a key to specific endpoints.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`All keys on your account draw from the same credit balance. See `,_jsx(_components.a,{href:`/api-reference/usage-and-billing`,children:`Usage \u0026 Billing`}),` for details.`]})]})}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":"Authentication","description":"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.","href":"/api-reference/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create an API key","slug":"create-an-api-key","depth":2,"children":[]},{"title":"Use the key in code","slug":"use-the-key-in-code","depth":2,"children":[]},{"title":"The Messages endpoints","slug":"the-messages-endpoints","depth":2,"children":[]},{"title":"Managing keys","slug":"managing-keys","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"neural-net-solutions","siteName":"UncensoredGPT","title":"Authentication - UncensoredGPT","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T15:02:42.726Z","originalFileLocation":"api-reference/authentication.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=\"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\">\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=\"Authentication - UncensoredGPT\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"UncensoredGPT\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.uncensoredgpt.ai/api-reference/authentication\">\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=Introduction\u0026amp;title=Authentication\u0026amp;description=Create+API+keys+in+the+UncensoredGPT+Console+and+authenticate+requests+with+a+Bearer+token.\u0026amp;theme=659084c614e93b3b08f2f8c3\u0026amp;signature=28f70b414640335b9ff6f6392186b8685fc505e183bfefef9e7d257e38f2ee88\">\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=\"Authentication - UncensoredGPT\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://neural-net-solutions.mintlify.site/_mintlify/api/og/v2?division=Introduction\u0026amp;title=Authentication\u0026amp;description=Create+API+keys+in+the+UncensoredGPT+Console+and+authenticate+requests+with+a+Bearer+token.\u0026amp;theme=659084c614e93b3b08f2f8c3\u0026amp;signature=28f70b414640335b9ff6f6392186b8685fc505e183bfefef9e7d257e38f2ee88\">\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/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/authentication.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/authentication#webpage\",\"url\":\"https://docs.uncensoredgpt.ai/api-reference/authentication\",\"name\":\"Authentication\",\"description\":\"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\",\"dateModified\":\"2026-10-26T15:02:42.726Z\",\"isPartOf\":{\"@id\":\"https://docs.uncensoredgpt.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Introduction\",\"item\":\"https://docs.uncensoredgpt.ai/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.uncensoredgpt.ai/api-reference/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Create API keys in the UncensoredGPT Console and authenticate requests with a Bearer token.\",\"url\":\"https://docs.uncensoredgpt.ai/api-reference/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.uncensoredgpt.ai/api-reference/authentication#webpage\"},\"dateModified\":\"2026-10-26T15:02:42.726Z\",\"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/authentication.md","siteName":"UncensoredGPT","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Introduction","pages":[{"title":"API Introduction","description":"Every UncensoredGPT model through one OpenAI-compatible API. Pay per token, no filters, no logs.","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Models","description":"Browse the UncensoredGPT model catalog and list the models available to your key.","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","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","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":"Authentication - UncensoredGPT","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}