Authentication - cloro
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Assistant
Responses are generated using AI and may contain mistakes.
The cloro API uses Bearer token authentication. Create and manage your keys in the dashboard.
Navigate to header: Using your API key Using your API key
The Bearer token in the Authorization header is your API key — there’s no separate token exchange or OAuth flow. Copy the key from the dashboard and pass it directly with the Bearer prefix on every request:
Authorization: Bearer YOUR_API_KEY
For complete requests, see request examples.
Never expose your API key in client-side code or public repositories, and never share it with unauthorized users. Keep it in a secrets manager or an environment variable, not your source tree.
Navigate to header: Authentication errors Authentication errors
A failed authentication returns 401 Unauthorized with one of three error codes. Common causes:
- Missing or malformed header: send exactly
Authorization: Bearer <key>; a lowercasebearercounts as no key - Invalid API key: check that you’re using the correct key
- Invalidated key: the key was invalidated in the dashboard
Navigate to header: Environment variables Environment variables
.env
Python
Node.js
Go
CLORO_API_KEY=your_api_key_here
import os
api_key = os.getenv('CLORO_API_KEY')
const apiKey = process.env.CLORO_API_KEY;
apiKey := os.Getenv("CLORO_API_KEY")
Navigate to header: API key management API key management
Create a separate key for each environment or purpose (production, local development, CI, a teammate) so you can invalidate one without disrupting the others. There are no separate test keys or sandbox: every key calls the production API and draws from your organization’s single credit balance.
Navigate to header: Naming a key Naming a key
When you create a key, the Create API key dialog accepts an optional human-readable name (up to 64 characters). Use it to tell keys apart in the API keys table, for example production, staging, or ricardo-laptop. Leave the field empty to create an unnamed key. The name is a label only and does not affect how the key authenticates.
Navigate to header: The key is shown once The key is shown once
The full key appears only in the dialog that opens when you create it, so copy it there. Afterwards the API keys table shows the prefix (and the name, if you set one) only, and support cannot recover the key because cloro does not store it in readable form.
If Copy to clipboard reports “Unable to copy API key”, your browser refused clipboard access. Select the key in the field and copy it manually before closing the dialog.
Navigate to header: Compromised keys Compromised keys
If you lose a key or suspect it has been compromised, create a new one and invalidate the old one in the dashboard. There is no rotate action. An invalidated key can keep working for up to a minute; after that, any integration still using it gets 401 Unauthorized.
Was this page helpful?
YesNo
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"cloro","colors":{"primary":"#60A5FA","light":"#93C5FD","dark":"#3B82F6"},"logo":{"light":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9","dark":"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/dark.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=8b254a805d19d5a08a152025628fc518","href":"https://cloro.dev/"},"favicon":"https://mintcdn.com/cloro/JJLSAXWoRDaE6XhQ/favicon.ico?fit=max\\u0026auto=format\\u0026n=JJLSAXWoRDaE6XhQ\\u0026q=85\\u0026s=fb070a58a43d3a399505f112fcb2cf5b","api":{"playground":{"proxy":false}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.cloro.dev/"}},"footer":{"socials":{"github":"https://github.com/cloro-dev","website":"https://cloro.dev/"}},"seo":{"metatags":{"canonical":"https://cloro.dev/docs"}},"integrations":{"posthog":{"apiKey":"phc\_O2d3bu6YrOXrcUYH9E1Dx6zc4kkW8eez5qXOFbBWii3","apiHost":"https://reverseproxy.cloro.dev"}},"banner":{"content":"The AI Assistant is here to help — ask it anything instead of browsing through the pages.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cloro","hasAudioNarration":false,"actualSubdomain":"cloro","customDomains":["cloro.dev"],"gitSource":{"type":"github","owner":"cloro-dev","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"}},"buildId":"6afee69d0b27e3d5820b1225","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"API Reference","count":76},{"language":"default","tag":"Google","count":37},{"language":"default","tag":"Documentation","count":23},{"language":"default","tag":"Guides","count":12},{"language":"default","tag":"Google AI Mode","count":10},{"language":"default","tag":"ChatGPT","count":10},{"language":"default","tag":"Integrations","count":9},{"language":"default","tag":"AI Overview","count":7},{"language":"default","tag":"Async tasks","count":5},{"language":"default","tag":"Gemini","count":5}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@cloro.dev"}},"basePath":"/docs","hasChatPermissions":true,"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":"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}],"googleFontsInlined":false},"customCss":[]} {"page":{"pagePath":"guides/authentication","slug":"/guides/authentication","pageMetadata":{"title":"Authentication","description":"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.","icon":"key","href":"/guides/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: \"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\"\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`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The cloro API uses Bearer token authentication. Create and manage your keys in the `,_jsx(_components.a,{href:`https://dashboard.cloro.dev\`,children:\`dashboard\`}),\`.\`\]}),\`\\n\`,\_jsx(Heading,{level:`2`,id:`using-your-api-key`,children:`Using your API key`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Bearer`}),` token in the `,_jsx(_components.code,{children:`Authorization`}),` header `,_jsx(_components.strong,{children:`is your API key`}),` — there’s no separate token exchange or OAuth flow. Copy the key from the dashboard and pass it directly with the `,_jsx(_components.code,{children:`Bearer`}),` prefix on every request:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,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:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer YOUR_API_KEY`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For complete requests, see `,_jsx(_components.a,{href:`/guides/making-requests/sync#request-examples`,children:`request examples`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never expose your API key in client-side code or public repositories, and\nnever share it with unauthorized users. Keep it in a secrets manager or an\nenvironment variable, not your source tree.`})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-errors`,children:`Authentication errors`}),`\n`,_jsxs(_components.p,{children:[`A failed authentication returns `,_jsx(_components.code,{children:`401 Unauthorized`}),` with one of `,_jsx(_components.a,{href:`/guides/error-handling#authentication-401`,children:`three error codes`}),`. Common causes:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Missing or malformed header`}),`: send exactly `,_jsx(_components.code,{children:`Authorization: Bearer \u003ckey>`}),`; a lowercase `,_jsx(_components.code,{children:`bearer`}),` counts as no key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Invalid API key`}),`: check that you’re using the correct key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Invalidated key`}),`: the key was invalidated in the dashboard`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`environment-variables`,children:`Environment variables`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`.env`,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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`CLORO_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_here`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`2`,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:`2`,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\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'CLORO_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`1`,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:`1`,children:[_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:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`CLORO_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`1`,language:`go`,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:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` os`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"CLORO_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`api-key-management`,children:`API key management`}),`\n`,_jsx(_components.p,{children:`Create a separate key for each environment or purpose (production, local development, CI, a teammate) so you can invalidate one without disrupting the others. There are no separate test keys or sandbox: every key calls the production API and draws from your organization’s single credit balance.`}),`\n`,_jsx(Heading,{level:`3`,id:`naming-a-key`,children:`Naming a key`}),`\n`,_jsxs(_components.p,{children:[`When you create a key, the `,_jsx(_components.strong,{children:`Create API key`}),` dialog accepts an optional human-readable name (up to 64 characters). Use it to tell keys apart in the `,_jsx(_components.strong,{children:`API keys`}),` table, for example `,_jsx(_components.code,{children:`production`}),`, `,_jsx(_components.code,{children:`staging`}),`, or `,_jsx(_components.code,{children:`ricardo-laptop`}),`. Leave the field empty to create an unnamed key. The name is a label only and does not affect how the key authenticates.`]}),`\n`,_jsx(Heading,{level:`3`,id:`the-key-is-shown-once`,children:`The key is shown once`}),`\n`,_jsxs(_components.p,{children:[`The full key appears only in the dialog that opens when you create it, so copy it there. Afterwards the `,_jsx(_components.strong,{children:`API keys`}),` table shows the prefix (and the name, if you set one) only, and support cannot recover the key because cloro does not store it in readable form.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`If `,_jsx(_components.strong,{children:`Copy to clipboard`}),` reports “Unable to copy API key”, your browser refused clipboard access. Select the key in the field and copy it manually before closing the dialog.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`compromised-keys`,children:`Compromised keys`}),`\n`,_jsxs(_components.p,{children:[`If you lose a key or suspect it has been compromised, create a new one and invalidate the old one in the `,_jsx(_components.a,{href:`https://dashboard.cloro.dev\`,children:\`dashboard\`}),\`. There is no rotate action. An invalidated key can keep working for up to a minute; after that, any integration still using it gets `,_jsx(_components.code,{children:`401 Unauthorized`}),`.`]})]})}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":"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.","icon":"key","href":"/guides/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Using your API key","slug":"using-your-api-key","depth":2,"children":[]},{"title":"Authentication errors","slug":"authentication-errors","depth":2,"children":[]},{"title":"Environment variables","slug":"environment-variables","depth":2,"children":[]},{"title":"API key management","slug":"api-key-management","depth":2,"children":[{"title":"Naming a key","slug":"naming-a-key","depth":3,"children":[]},{"title":"The key is shown once","slug":"the-key-is-shown-once","depth":3,"children":[]},{"title":"Compromised keys","slug":"compromised-keys","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cloro","siteName":"cloro","title":"Authentication - cloro","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-07T17:58:38.409Z","originalFileLocation":"guides/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=\"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\">\u003cmeta data-mint-head name=\"application-name\" content=\"cloro\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_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=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - cloro\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"cloro\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://cloro.dev/docs/guides/authentication\\">\\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Guides\\u0026amp;title=Authentication\\u0026amp;description=Learn+how+to+authenticate+with+the+cloro+API+using+Bearer+tokens%2C+manage+API+keys+securely%2C+and+handle+authentication+errors+in+your+requests.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=91964c9998d01cd3899db5d8d88a980de2b9ade98f70dc883c1a937a8b0172a5\\">\\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 - cloro\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cloro.mintlify.site/docs/\_mintlify/api/og/v2?division=Guides\\u0026amp;title=Authentication\\u0026amp;description=Learn+how+to+authenticate+with+the+cloro+API+using+Bearer+tokens%2C+manage+API+keys+securely%2C+and+handle+authentication+errors+in+your+requests.\\u0026amp;theme=3dd67aad49c38e49a018244e\\u0026amp;signature=91964c9998d01cd3899db5d8d88a980de2b9ade98f70dc883c1a937a8b0172a5\\">\\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=\"/docs/mintlify-assets/_mintlify/favicons/cloro/4KOv8pRhaY1jvVpr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"cloro\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#60A5FA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://cloro.dev/docs/guides/authentication\\">\\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/guides/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@graph\\":\[{\\"@type\\":\\"Organization\\",\\"@id\\":\\"https://cloro.dev/#organization\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev\\",\\"logo\\":{\\"@type\\":\\"ImageObject\\",\\"url\\":\\"https://mintcdn.com/cloro/31REGvIJOWq8\_kV2/logo/light.svg?fit=max\\u0026auto=format\\u0026n=31REGvIJOWq8\_kV2\\u0026q=85\\u0026s=9649c139f2768786bbd491a86c1a9dd9\\"}},{\\"@type\\":\\"WebSite\\",\\"@id\\":\\"https://cloro.dev/docs#website\\",\\"name\\":\\"cloro\\",\\"url\\":\\"https://cloro.dev/docs\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"}},{\\"@type\\":\\"WebPage\\",\\"@id\\":\\"https://cloro.dev/docs/guides/authentication#webpage\\",\\"url\\":\\"https://cloro.dev/docs/guides/authentication\\",\\"name\\":\\"Authentication\\",\\"description\\":\\"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\",\"dateModified\":\"2026-10-07T17:58:38.409Z\",\"isPartOf\":{\"@id\":\"https://cloro.dev/docs#website\\"},\\"breadcrumb\\":{\\"@id\\":\\"https://cloro.dev/docs/guides/authentication#breadcrumb\\"}},{\\"@type\\":\\"BreadcrumbList\\",\\"@id\\":\\"https://cloro.dev/docs/guides/authentication#breadcrumb\\",\\"itemListElement\\":\[{\\"@type\\":\\"ListItem\\",\\"position\\":1,\\"name\\":\\"cloro\\",\\"item\\":\\"https://cloro.dev/docs\\"},{\\"@type\\":\\"ListItem\\",\\"position\\":2,\\"name\\":\\"Authentication\\",\\"item\\":\\"https://cloro.dev/docs/guides/authentication\\"}\]},{\\"@type\\":\[\\"Article\\",\\"TechArticle\\"\],\\"@id\\":\\"https://cloro.dev/docs/guides/authentication#article\\",\\"headline\\":\\"Authentication\\",\\"name\\":\\"Authentication\\",\\"description\\":\\"Learn how to authenticate with the cloro API using Bearer tokens, manage API keys securely, and handle authentication errors in your requests.\",\"url\":\"https://cloro.dev/docs/guides/authentication\\",\\"mainEntityOfPage\\":{\\"@id\\":\\"https://cloro.dev/docs/guides/authentication#webpage\\"},\\"dateModified\\":\\"2026-10-07T17:58:38.409Z\\",\\"publisher\\":{\\"@id\\":\\"https://cloro.dev/#organization\\"},\\"isPartOf\\":{\\"@id\\":\\"https://cloro.dev/docs#website\\"}}\]}\\u003c/script>\\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\\",\\"@type\\":\\"WebSite\\",\\"name\\":\\"cloro\\",\\"publisher\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"cloro\\"},\\"provider\\":{\\"@type\\":\\"Organization\\",\\"name\\":\\"Mintlify\\",\\"url\\":\\"https://mintlify.com\\"}}\\u003c/script>","agentPointerHref":"/docs/guides/authentication.md","siteName":"cloro","nav":{"global":null,"tabs":\[{"tab":"Documentation","icon":"book-open","groups":\[{"group":"Introduction","icon":"book-open","pages":\[{"title":"Welcome to cloro","href":""},{"title":"Quickstart: make your first cloro API request","sidebarTitle":"Quickstart","description":"Get started with the cloro API in minutes. Learn how to get your API key, make your first monitoring request, and understand the response structure.","href":"/introduction/quickstart"}]},{"group":"Guides","icon":"file-text","pages":[{"title":"Authentication","icon":"key","href":"/guides/authentication"},{"title":"Making requests","description":"Compare the two cloro request modes — synchronous and asynchronous — including latency, concurrency limits, and guidance on which mode to use.","icon":"send","href":"/guides/making-requests"},{"group":"Types of requests","expanded":true,"pages":[{"title":"Synchronous requests","icon":"bolt","href":"/guides/making-requests/sync"},{"title":"Asynchronous requests","icon":"clock","href":"/guides/making-requests/async"}]},{"title":"Webhooks","icon":"webhook","href":"/guides/webhooks"},{"title":"Error handling","icon":"shield","href":"/guides/error-handling"},{"title":"Versioning and deprecation","icon":"tag","href":"/guides/versioning"},{"title":"Rate \u0026 concurrency limits","icon":"zap","href":"/guides/concurrency"},{"title":"Supported AI providers, features, and credit pricing","sidebarTitle":"Providers","icon":"network-wired","href":"/guides/providers"},{"title":"Billing \u0026 credits","icon":"credit-card","href":"/guides/billing"},{"title":"Account \u0026 organizations","icon":"user","href":"/guides/account"},{"title":"Output formats","icon":"code","href":"/guides/output-formats"}]},{"group":"Integrations","icon":"plug","pages":[{"title":"MCP server: give any agent cloro's monitoring tools","sidebarTitle":"MCP server","icon":"plug-circle-bolt","href":"/integrations/mcp"},{"title":"Agent skills","icon":"book-open","href":"/integrations/skills"},{"title":"Python SDK","icon":"python","href":"/integrations/python"},{"title":"TypeScript SDK","icon":"node-js","href":"/integrations/typescript"},{"title":"Vercel AI SDK","icon":"triangle","href":"/integrations/vercel-ai-sdk"},{"title":"n8n integration — query AI engines from workflows","sidebarTitle":"n8n","icon":"diagram-project","href":"/integrations/n8n"},{"title":"Zapier integration — connect cloro to 8,000+ apps","sidebarTitle":"Zapier","icon":"bolt","href":"/integrations/zapier"},{"title":"LangChain","icon":"python","href":"/integrations/langchain"},{"title":"OpenClaw","icon":"claw-marks","href":"/integrations/openclaw"}]}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Changelog","icon":"newspaper","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Authentication - cloro","deploymentId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","buildId":"dpl_2MqcLy8smQrrovUehgcZEsoo1tJX","dynamics":[],"chunks":[]}