Keep your API key secure. Never share it publicly or commit it to version control (e.g., GitHub). If you suspect your key has been compromised, regenerate it immediately from the dashboard.
Authentication Rules
The ApiKey header is required for all endpoints, including /v2/account/usage/.
API keys are tied to your account and plan limits.
A missing, wrong, or deactivated API key returns 401 Unauthorized. These rejections don’t count against your quota.
A valid key on an account whose subscription has expired returns 403 with the code subscription_expired. See Errors for all 403 cases.
Error examples:
{ "success": false, "error": { "code": "api_key_required", "message": "Please provide an API key in the ApiKey header" }, "timestamp": "2026-10-27T10:00:00+00:00"}
{ "success": false, "error": { "code": "invalid_api_key", "message": "The provided API key is invalid or inactive", "request_id": "req_12345" }, "timestamp": "2026-10-27T10:00:00+00:00"}
request_id is included whenever the request was logged. Include it when you contact support@fapihub.com.
Best Practices
Store your API key securely using environment variables or a secret manager.
Rotate your API key periodically for better security.
Use different keys for development, staging, and production environments if possible.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AI Background Remover API","description":"Remove backgrounds from images automatically in 5 seconds. Don't waste time manually selecting pixels. Just upload a photo \u0026 get instant cutout with professional quality.","colors":{"primary":"#15803d","light":"#07C983","dark":"#15803D"},"logo":"https://mintcdn.com/fapihub/aJPYEZtxrMVdPwgn/logo.png?fit=max\u0026auto=format\u0026n=aJPYEZtxrMVdPwgn\u0026q=85\u0026s=b7f5129866dc71d68b7a2d08f42c16f0","favicon":"https://mintcdn.com/fapihub/aJPYEZtxrMVdPwgn/logo.png?fit=max\u0026auto=format\u0026n=aJPYEZtxrMVdPwgn\u0026q=85\u0026s=b7f5129866dc71d68b7a2d08f42c16f0","api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:support@fapihub.com","label":"Support"}],"primary":{"type":"button","label":"Get API Key","href":"https://fapihub.com/dashboard/"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/fapihub"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://mintlify.com/docs"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fapihub","hasAudioNarration":false,"actualSubdomain":"fapihub","customDomains":["docs.fapihub.com"],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-fapihub-57626f48","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae0b970b2d56c99c7a5f1a8","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Endpoints","count":7},{"language":"default","tag":"Get Started","count":4},{"language":"default","tag":"Integrations","count":1},{"language":"default","tag":"Comparison","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":[],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":null,"href":"/authentication"},"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`,hr:`hr`,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:[`All API requests to FAPIHub require authentication. You must include your personal API key in every request using the `,_jsx(_components.code,{children:`ApiKey`}),` header.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-to-authenticate`,children:`How to Authenticate`}),`\n`,_jsxs(_components.p,{children:[`Include the `,_jsx(_components.code,{children:`ApiKey`}),` header with your API key in all requests. Keys look like `,_jsx(_components.code,{children:`bg_live_sk_…`}),`.`]}),`\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:`ApiKey: bg_live_sk_your_api_key`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example using cURL:`})}),`\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:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://fapihub.com/v2/rembg/\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ApiKey: bg_live_sk_your_api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"image=@photo.jpg\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -o`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` result.png`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`obtaining-your-api-key`,children:`Obtaining Your API Key`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.a,{href:`https://fapihub.com`,children:`fapihub.com`}),` and sign up / log in to your account.`]}),`\n`,_jsxs(_components.li,{children:[`Navigate to the `,_jsx(_components.a,{href:`https://fapihub.com/dashboard/`,children:`Dashboard`}),`.`]}),`\n`,_jsx(_components.li,{children:`Create an API key in the dashboard and copy it.`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep your API key secure. Never share it publicly or commit it to version control (e.g., GitHub). If you suspect your key has been compromised, regenerate it immediately from the dashboard.`})}),`\n`,_jsx(Heading,{level:`3`,id:`authentication-rules`,children:`Authentication Rules`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`ApiKey`}),` header is `,_jsx(_components.strong,{children:`required`}),` for all endpoints, including `,_jsx(_components.a,{href:`/usage`,children:_jsx(_components.code,{children:`/v2/account/usage/`})}),`.`]}),`\n`,_jsx(_components.li,{children:`API keys are tied to your account and plan limits.`}),`\n`,_jsxs(_components.li,{children:[`A missing, wrong, or deactivated API key returns `,_jsx(_components.code,{children:`401 Unauthorized`}),`. These rejections don’t count against your quota.`]}),`\n`,_jsxs(_components.li,{children:[`A valid key on an account whose subscription has expired returns `,_jsx(_components.code,{children:`403`}),` with the code `,_jsx(_components.code,{children:`subscription_expired`}),`. See `,_jsx(_components.a,{href:`/errors`,children:`Errors`}),` for all `,_jsx(_components.code,{children:`403`}),` cases.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Error examples:`})}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`401 api_key_required`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"api_key_required\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Please provide an API key in the ApiKey header\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-27T10:00:00+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401 invalid_api_key`,numberOfLines:`9`,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:`9`,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:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"error\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The provided API key is invalid or inactive\"`}),_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:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_12345\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-27T10:00:00+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`request_id`}),` is included whenever the request was logged. Include it when you contact `,_jsx(_components.a,{href:`mailto:support@fapihub.com`,children:`support@fapihub.com`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Store your API key securely using environment variables or a secret manager.`}),`\n`,_jsx(_components.li,{children:`Rotate your API key periodically for better security.`}),`\n`,_jsx(_components.li,{children:`Use different keys for development, staging, and production environments if possible.`}),`\n`]}),`\n`,_jsx(_components.hr,{})]})}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":null,"href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How to Authenticate","slug":"how-to-authenticate","depth":3,"children":[]},{"title":"Obtaining Your API Key","slug":"obtaining-your-api-key","depth":3,"children":[]},{"title":"Authentication Rules","slug":"authentication-rules","depth":3,"children":[]},{"title":"Best Practices","slug":"best-practices","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"fapihub","siteName":"AI Background Remover API","title":"Authentication - AI Background Remover API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T14:47:17.187Z","originalFileLocation":"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=\"application-name\" content=\"AI Background Remover API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_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/fapihub/9nvZlyZ_YW3fmIfx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - AI Background Remover API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AI Background Remover API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fapihub.com/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fapihub.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;theme=471b0646d6b6c55fa5f62d43\u0026amp;signature=4d5fd4b887de67045ebce3eb802cc8d3c334a6129bcbdb667fe3d5ecb8e9befb\">\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 - AI Background Remover API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fapihub.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;theme=471b0646d6b6c55fa5f62d43\u0026amp;signature=4d5fd4b887de67045ebce3eb802cc8d3c334a6129bcbdb667fe3d5ecb8e9befb\">\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/fapihub/9nvZlyZ_YW3fmIfx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AI Background Remover API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#15803d\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fapihub.com/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fapihub.com/#organization\",\"name\":\"AI Background Remover API\",\"url\":\"https://docs.fapihub.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fapihub/aJPYEZtxrMVdPwgn/logo.png?fit=max\u0026auto=format\u0026n=aJPYEZtxrMVdPwgn\u0026q=85\u0026s=b7f5129866dc71d68b7a2d08f42c16f0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fapihub.com#website\",\"name\":\"AI Background Remover API\",\"url\":\"https://docs.fapihub.com\",\"publisher\":{\"@id\":\"https://docs.fapihub.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fapihub.com/authentication#webpage\",\"url\":\"https://docs.fapihub.com/authentication\",\"name\":\"Authentication\",\"dateModified\":\"2026-10-27T14:47:17.187Z\",\"isPartOf\":{\"@id\":\"https://docs.fapihub.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fapihub.com/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fapihub.com/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get Started\",\"item\":\"https://docs.fapihub.com/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.fapihub.com/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.fapihub.com/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"url\":\"https://docs.fapihub.com/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fapihub.com/authentication#webpage\"},\"dateModified\":\"2026-10-27T14:47:17.187Z\",\"publisher\":{\"@id\":\"https://docs.fapihub.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fapihub.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AI Background Remover API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AI Background Remover API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"AI Background Remover API","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://mintlify.com/docs"}]},"tabs":[{"tab":"Documentation","pages":[{"group":"Get Started","pages":[{"title":"Introduction","description":null,"href":"/introduction"},{"title":"Authentication","href":"/authentication"},{"title":"Rate Limit","description":null,"href":"/rate-limit"},{"title":"Errors","href":"/errors"}]},{"group":"Endpoints","pages":[{"title":"Remove Background","openapi":"POST /rembg/","href":"/remove-background"},{"title":"Subject Mask","openapi":"POST /rembg/mask/","href":"/subject-mask"},{"title":"Background Blur","openapi":"POST /rembg/blur/","href":"/background-blur"},{"title":"Background Color","openapi":"POST /rembg/color/","href":"/background-color"},{"title":"Background Gradient","openapi":"POST /rembg/gradient/","href":"/background-gradient"},{"title":"Subject Shadow","openapi":"POST /rembg/shadow/","href":"/subject-shadow"},{"title":"Usage \u0026 Limits","openapi":"GET /account/usage/","href":"/usage"}]},{"group":"Integrations","pages":[{"title":"AI Agents (MCP)","href":"/ai-agents"}]},{"group":"Comparison","pages":[{"title":"Comparison with Alternatives","href":"/comparision-with-alternatives"}]}]}]},"basePath":"","title":"Authentication - AI Background Remover API","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}