The API also accepts the legacy hf-api-key and hf-secret headers. New integrations should use the Authorization header.
Keep credentials server-side
Do not call the API directly from browser or mobile application code. Anyone who can inspect the application can extract its API secret and use your account.
Store credentials in a secrets manager or encrypted environment variables.
Use separate credentials for development and production.
Never include credentials in URLs, logs, screenshots, or support messages.
Rotate a credential immediately if it may have been exposed.
Authentication errors
Missing, malformed, or invalid credentials return 401 Unauthorized:
{ "detail": "Invalid credentials"}
Authentication identifies the account, but individual models may have separate access restrictions. A model unavailable to the authenticated account can return 404, 423, or 503 depending on its operational state.
Was this page helpful?
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"Higgsfield API Docs","description":"Build image and video generation workflows with the Higgsfield API, from authentication and requests to polling, webhooks, and model-specific endpoints.","colors":{"primary":"#000000","light":"#D1FE17","dark":"#000000"},"logo":{"light":"https://mintcdn.com/private-hf/RgB2SXhCxJ6KplRT/logo/icon.png?fit=max\u0026auto=format\u0026n=RgB2SXhCxJ6KplRT\u0026q=85\u0026s=3e0d5d8cefd9c82e2b60a8956457f02d","dark":"https://mintcdn.com/private-hf/RgB2SXhCxJ6KplRT/logo/icon.png?fit=max\u0026auto=format\u0026n=RgB2SXhCxJ6KplRT\u0026q=85\u0026s=3e0d5d8cefd9c82e2b60a8956457f02d"},"favicon":"https://mintcdn.com/private-hf/RgB2SXhCxJ6KplRT/favicon.png?fit=max\u0026auto=format\u0026n=RgB2SXhCxJ6KplRT\u0026q=85\u0026s=32b77970f11d7c2958b1968186ad3ffd","appearance":{"default":"light","strict":true},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://status.higgsfield.ai","label":"Status"},{"href":"https://discord.gg/BEea92KeR9","label":"Support"}],"primary":{"type":"button","label":"Get API key","href":"https://console.higgsfield.ai"}},"footer":{"socials":{"x":"https://twitter.com/higgsfield_ai","instagram":"https://www.instagram.com/higgsfield.ai","discord":"https://discord.com/invite/higgsfield","youtube":"https://www.youtube.com/@HiggsfieldAI"}},"seo":{"metatags":{"og:image":"/images/open-higgsfield.webp","og:image:width":"1825","og:image:height":"1027","og:image:type":"image/webp","twitter:card":"summary_large_image","twitter:image":"/images/open-higgsfield.webp"}},"fonts":{"family":"Inter"},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"contextual":{"options":["copy","view","claude","mcp","add-mcp","cursor"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"private-hf","hasAudioNarration":false,"actualSubdomain":"private-hf","customDomains":["docs.higgsfield.ai"],"gitSource":{"type":"github","owner":"akhmedyarov","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af61591701afd0a5b2efda1","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"API reference","count":128},{"language":"default","tag":"Models","count":123},{"language":"default","tag":"Video","count":90},{"language":"default","tag":"Image","count":32},{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"Enterprise","count":9},{"language":"default","tag":"Enterprise API","count":9},{"language":"default","tag":"Kling 3.0","count":9},{"language":"default","tag":"Core concepts","count":8},{"language":"default","tag":"Seedance 2.5","count":6}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--hf-background: #ffffff;--hf-surface: #f7f7f7;--hf-surface-raised: #ededed;--hf-border: #dedede;--hf-border-strong: #b7b7b7;--hf-text: #171717;--hf-muted: #646464;--hf-accent: #000000;--hf-accent-foreground: #ffffff;--hf-accent-soft: rgba(0, 0, 0, 0.05);--hf-accent-soft-hover: rgba(0, 0, 0, 0.08);--hf-accent-border: rgba(0, 0, 0, 0.18);--hf-accent-border-hover: rgba(0, 0, 0, 0.45);--hf-accent-border-muted: rgba(0, 0, 0, 0.3);--hf-subtle-surface: rgba(0, 0, 0, 0.025);--hf-subtle-surface-hover: rgba(0, 0, 0, 0.045);--hf-subtle-pill: rgba(0, 0, 0, 0.055);--hf-subtle-border: rgba(0, 0, 0, 0.08);--hf-link-decoration: #a3a3a3}.dark{--hf-background: #000000;--hf-surface: #121212;--hf-surface-raised: #1a1a1a;--hf-border: #2b2b2b;--hf-border-strong: #484848;--hf-text: #f5f5f5;--hf-muted: #929292;--hf-accent: #d1fe17;--hf-accent-foreground: #090909;--hf-accent-soft: rgba(209, 254, 23, 0.08);--hf-accent-soft-hover: rgba(209, 254, 23, 0.13);--hf-accent-border: rgba(209, 254, 23, 0.24);--hf-accent-border-hover: rgba(209, 254, 23, 0.62);--hf-accent-border-muted: rgba(209, 254, 23, 0.48);--hf-subtle-surface: rgba(255, 255, 255, 0.025);--hf-subtle-surface-hover: rgba(255, 255, 255, 0.045);--hf-subtle-pill: rgba(255, 255, 255, 0.055);--hf-subtle-border: rgba(255, 255, 255, 0.08);--hf-link-decoration: #555555;--background-dark: 0 0 0;--gray-950: 0 0 0;--gray-900: 18 18 18;--gray-800: 43 43 43;--gray-700: 58 58 58;--gray-600: 78 78 78;--gray-500: 112 112 112;--gray-400: 146 146 146;--gray-300: 190 190 190;--gray-200: 229 229 229;--gray-100: 245 245 245;--gray-50: 250 250 250}html,body{background:var(--hf-background)!important}body{color:var(--hf-muted);font-family:Inter, ui-sans-serif, system-ui, sans-serif}::selection{background:var(--hf-accent);color:var(--hf-accent-foreground)}#navbar{background:var(--hf-background)!important;border-bottom:1px solid var(--hf-border)}#navbar>div:first-child{background:transparent!important;border-color:var(--hf-border)!important}#search-bar-entry{background:var(--hf-surface-raised)!important;border-color:var(--hf-border)!important;border-radius:8px!important;box-shadow:none!important}#search-bar-entry:hover{border-color:var(--hf-border-strong)!important;filter:none!important}@media (min-width: 1024px){#navbar div:has(>#search-bar-entry){flex:0 0 20rem!important;justify-content:flex-end!important;margin-left:auto}#navbar div:has(>.text-sm):has(.navbar-link){flex:0 0 auto!important}#search-bar-entry{max-width:20rem}}#topbar-cta-button a{background:var(--hf-accent);border-radius:8px;padding:0.45rem 0.85rem!important}#topbar-cta-button a>div{color:var(--hf-accent-foreground)!important;margin:0!important}#topbar-cta-button svg{display:none}#sidebar-content{background:var(--hf-background);border-color:var(--hf-border)!important}#sidebar-content [aria-label=\"Theme preference\"]{margin-left:2.25rem;order:-1}#navigation-items{padding-left:1.25rem;padding-right:1.25rem}.sidebar-group-header{color:var(--hf-text)!important;padding-left:0.75rem!important}#sidebar-group a{border-left:2px solid transparent!important;border-radius:8px;padding-bottom:0.45rem;padding-top:0.45rem;transition:background-color 120ms ease, border-color 120ms ease, color 120ms ease}#sidebar-group a:hover{background:var(--hf-surface);color:var(--hf-text)!important}#sidebar-group a.text-primary{background:var(--hf-surface-raised);border-left-color:var(--hf-accent)!important;color:var(--hf-text)!important}.toc-item a{transition:color 120ms ease}.toc-item a:hover,.toc-item a.text-primary{color:var(--hf-accent)!important}#page-title{color:var(--hf-text)!important;font-weight:500!important;letter-spacing:-0.035em}.eyebrow{color:var(--hf-accent)!important;font-size:0.72rem!important;font-weight:600!important;letter-spacing:0.08em;text-transform:uppercase}.dark .mdx-content h2,.dark .mdx-content h3,.dark .mdx-content h4{color:var(--hf-text);font-weight:500;letter-spacing:-0.02em}.dark .mdx-content p,.dark .mdx-content li{color:var(--hf-muted)}.dark .mdx-content a:not(.card){text-decoration-color:var(--hf-link-decoration);text-underline-offset:3px}.dark .mdx-content a:not(.card):hover{color:var(--hf-accent);text-decoration-color:var(--hf-accent)}.dark .card{background:var(--hf-surface)!important;border-color:var(--hf-border)!important;border-radius:12px!important;box-shadow:none!important}.dark .card:hover{background:var(--hf-surface-raised)!important;border-color:var(--hf-border-strong)!important}.dark .card [data-component-part=\"card-title\"]{color:var(--hf-text)!important;font-weight:500}.dark .card [data-component-part=\"card-content\"]{color:var(--hf-muted)!important}.dark [data-callout-type]{background:var(--hf-surface)!important;border-color:var(--hf-border)!important;border-radius:10px!important}.dark [data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg{color:var(--hf-accent)!important}.dark [data-callout-type] [data-component-part=\"callout-content\"]{color:var(--hf-muted)!important}.dark .code-block,.dark .code-group{background:var(--hf-surface)!important;border-color:var(--hf-border)!important;border-radius:12px!important;box-shadow:none!important}.dark .code-block div[class*=\"dark:bg-codeblock\"],.dark .code-group div[class*=\"dark:bg-codeblock\"]{background:var(--hf-surface-raised)!important}.dark [data-component-part=\"code-group-tab-bar\"]{background:var(--hf-surface)!important;border-color:var(--hf-border)!important}.dark .mdx-content p code,.dark .mdx-content li code,.dark .mdx-content td code{background:var(--hf-surface-raised)!important;border:1px solid var(--hf-border);border-radius:5px;color:var(--hf-accent)!important;padding:0.1rem 0.35rem}.tryit-button{background:var(--hf-accent)!important;border-radius:8px!important;color:var(--hf-accent-foreground)!important}.tryit-button svg{background:var(--hf-accent-foreground)!important}#content-side-layout .code-group{background:var(--hf-surface)!important;border-color:var(--hf-border)!important}.code-block-fade-overlay{display:none!important}.models-color-scope{display:none}.dark body:has(.models-color-scope){--hf-surface: #131416;--hf-surface-raised: #1c1e21;--hf-border: rgba(255, 255, 255, 0.1);--hf-text: #ffffff;--hf-muted: #828282;--gray-900: 19 20 22;--gray-800: 28 30 33;--gray-500: 130 130 130;--gray-400: 130 130 130}body:has(.models-color-scope) main .mx-auto.max-w-5xl.flex.flex-row-reverse{width:98%!important}body:has(.models-color-scope) #sidebar-group a.text-primary{background:var(--hf-subtle-pill)}body:has(.models-color-scope) #sidebar-group a:hover{background:var(--hf-subtle-surface-hover)}.model-category-grid{display:grid;gap:1rem;grid-template-columns:repeat(2, minmax(0, 1fr));margin:1.5rem 0 2.5rem}.model-category-card,.model-playground-card{align-items:center;background:linear-gradient(135deg, var(--hf-accent-soft), var(--hf-subtle-surface) 60%);border:1px solid var(--hf-accent-border);border-radius:14px;color:var(--hf-text)!important;display:flex;gap:1rem;min-height:8.5rem;padding:1.4rem 1.5rem;text-decoration:none!important;transition:border-color 160ms ease, transform 160ms ease, background 160ms ease}.model-category-card:hover,.model-playground-card:hover{background:linear-gradient(135deg, var(--hf-accent-soft-hover), var(--hf-subtle-surface-hover) 65%);border-color:var(--hf-accent-border-hover);transform:translateY(-2px)}.model-category-icon,.model-playground-icon{align-items:center;color:var(--hf-accent);display:inline-flex;flex:0 0 auto;font-size:1.35rem;justify-content:center;width:1.75rem}.model-category-copy,.model-playground-copy{display:flex;flex:1 1 auto;flex-direction:column;gap:0.3rem;min-width:0}.model-category-title,.model-playground-title{color:var(--hf-text);font-size:1.05rem;font-weight:600}.model-category-copy>span,.model-playground-copy>span{color:var(--hf-muted);font-size:0.9rem;line-height:1.55}.model-card-arrow{color:var(--hf-muted);flex:0 0 auto;font-size:1.1rem;transition:color 160ms ease, transform 160ms ease}.model-category-card:hover .model-card-arrow,.model-playground-card:hover .model-card-arrow{color:var(--hf-accent);transform:translate(2px, -2px)}.featured-model-list{display:grid;gap:0.85rem;margin:1.5rem 0 2rem}.featured-model-card{background:var(--hf-subtle-surface);border:1px solid var(--hf-border);border-radius:13px;color:var(--hf-text)!important;display:flex;flex-direction:column;gap:0.7rem;padding:1.3rem 1.45rem;text-decoration:none!important;transition:background 160ms ease, border-color 160ms ease, transform 160ms ease}.featured-model-card:hover{background:var(--hf-subtle-surface-hover);border-color:var(--hf-accent-border-muted);transform:translateX(3px)}.featured-model-meta{display:flex;gap:0.45rem}.featured-model-meta>span{background:var(--hf-subtle-pill);border:1px solid var(--hf-subtle-border);border-radius:999px;color:var(--hf-muted);font-size:0.68rem;font-weight:600;letter-spacing:0.06em;padding:0.22rem 0.55rem;text-transform:uppercase}.featured-model-title{color:var(--hf-text);font-size:1.15rem;font-weight:600}.featured-model-description{color:var(--hf-muted);line-height:1.6}.featured-model-link{color:var(--hf-text);font-size:0.83rem;font-weight:500;margin-top:0.15rem}.featured-model-link>span{color:var(--hf-accent);display:inline-block;margin-left:0.2rem;transition:transform 160ms ease}.featured-model-card:hover .featured-model-link>span{transform:translateX(3px)}.model-playground-card{margin:1.75rem 0 2.5rem;min-height:9rem}.model-workflow-tabs{align-items:flex-end;border-bottom:1px solid var(--hf-border);display:flex;gap:1.7rem;margin:1.75rem 0 1.5rem;overflow-x:auto;scrollbar-width:none}.model-workflow-tabs::-webkit-scrollbar{display:none}.model-workflow-tab{border-bottom:2px solid transparent;color:var(--hf-muted)!important;flex:0 0 auto;font-size:0.87rem;font-weight:600;margin-bottom:-1px;padding:0.8rem 0 0.75rem;text-decoration:none!important;transition:border-color 160ms ease, color 160ms ease}.model-workflow-tab:hover{color:var(--hf-text)!important}.model-workflow-tab.is-active{border-bottom-color:var(--hf-accent);color:var(--hf-text)!important}@media (max-width: 720px){.model-category-grid{grid-template-columns:1fr}.model-category-card,.model-playground-card{min-height:7.5rem;padding:1.15rem}.model-workflow-tabs{gap:1.25rem}}.copy-code-variants{display:grid;gap:1.5rem;margin:1.5rem 0 2.5rem}.copy-code-variant-title{color:var(--hf-text);font-size:0.85rem;font-weight:500;margin-bottom:0.6rem}.copy-code-frame{background:var(--hf-surface);border:1px solid var(--hf-border);border-radius:12px;overflow:hidden}.copy-code-toolbar{align-items:center;background:var(--hf-surface-raised);border-bottom:1px solid var(--hf-border);display:flex;justify-content:flex-start;min-height:3.25rem;padding:0.55rem 0.75rem}.copy-code-button{align-items:center;background:transparent;border:1px solid var(--hf-border-strong);border-radius:7px;color:var(--hf-text);cursor:default;display:inline-flex;font-family:inherit;font-size:0.78rem;font-weight:500;justify-content:center;line-height:1;min-height:2rem}.copy-code-icon{width:2rem}.copy-code-compact{padding:0 0.7rem}.copy-code-explicit{background:var(--hf-accent);border-color:var(--hf-accent);color:var(--hf-accent-foreground);padding:0 0.8rem}.copy-code-body{background:var(--hf-surface)!important;border:0!important;border-radius:0!important;color:#c98d73!important;font-size:0.84rem;line-height:1.75;margin:0!important;min-height:11rem;overflow-x:auto;padding:1.25rem 1.4rem!important}.copy-code-body code{background:transparent!important;border:0!important;color:inherit!important;padding:0!important}@media (min-width: 1024px){main{padding-left:4rem!important}main .mx-auto.max-w-5xl.flex.flex-row-reverse{column-gap:2rem!important;margin-left:0!important;margin-right:0!important;max-width:none!important;width:100%!important}}table,tbody,thead{width:100%}table{width:100%!important}th{color:var(--hf-text)!important;font-weight:500!important}.dark .mdx-content table tr{border-color:var(--hf-border)!important}.dark .mdx-content table td{color:var(--hf-muted)}#pagination a{background:var(--hf-surface)!important;border-color:var(--hf-border)!important;border-radius:10px!important}#pagination a:hover{background:var(--hf-surface-raised)!important;border-color:var(--hf-border-strong)!important}@media (max-width: 1023px){#navbar{border-bottom-color:var(--hf-border)}}"}],"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"Authenticate server-side API requests with your Higgsfield key and secret.","href":"/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: \"Authenticate server-side API requests with your Higgsfield key and secret.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Create and manage API credentials in `,_jsx(_components.a,{href:`https://console.higgsfield.ai`,children:`Higgsfield Console`}),`. Each credential consists of a key ID and a secret.`]}),`\n`,_jsx(Heading,{level:`2`,id:`authorization-header`,children:`Authorization header`}),`\n`,_jsxs(_components.p,{children:[`Send both values in the `,_jsx(_components.code,{children:`Authorization`}),` header:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-dark\":`#85E89D`},children:`Authorization`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` Key YOUR_KEY_ID:YOUR_KEY_SECRET`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`curl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` https://api.higgsfield.ai/requests/REQUEST_ID/status`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` --header`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:' \"Authorization: Key ${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`HF_API_KEY_ID`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}:${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`HF_API_KEY_SECRET`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`}\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The API also accepts the legacy `,_jsx(_components.code,{children:`hf-api-key`}),` and `,_jsx(_components.code,{children:`hf-secret`}),` headers. New integrations should use the `,_jsx(_components.code,{children:`Authorization`}),` header.`]}),`\n`,_jsx(Heading,{level:`2`,id:`keep-credentials-server-side`,children:`Keep credentials server-side`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Do not call the API directly from browser or mobile application code. Anyone who can inspect the application can extract its API secret and use your account.`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Store credentials in a secrets manager or encrypted environment variables.`}),`\n`,_jsx(_components.li,{children:`Use separate credentials for development and production.`}),`\n`,_jsx(_components.li,{children:`Never include credentials in URLs, logs, screenshots, or support messages.`}),`\n`,_jsx(_components.li,{children:`Rotate a credential immediately if it may have been exposed.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`authentication-errors`,children:`Authentication errors`}),`\n`,_jsxs(_components.p,{children:[`Missing, malformed, or invalid credentials return `,_jsx(_components.code,{children:`401 Unauthorized`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`\"Invalid credentials\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Authentication identifies the account, but individual models may have separate access restrictions. A model unavailable to the authenticated account can return `,_jsx(_components.code,{children:`404`}),`, `,_jsx(_components.code,{children:`423`}),`, or `,_jsx(_components.code,{children:`503`}),` depending on its operational state.`]})]})}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":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Authentication","description":"Authenticate server-side API requests with your Higgsfield key and secret.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Authorization header","slug":"authorization-header","depth":2,"children":[]},{"title":"Keep credentials server-side","slug":"keep-credentials-server-side","depth":2,"children":[]},{"title":"Authentication errors","slug":"authentication-errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"private-hf","siteName":"Higgsfield API Docs","title":"Authentication - Higgsfield API Docs","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-18T23:27:51.907Z","originalFileLocation":"authentication.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Authenticate server-side API requests with your Higgsfield key and secret.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Higgsfield API Docs\">\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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_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/private-hf/NqDxvodEnQwFKKRR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Higgsfield API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate server-side API requests with your Higgsfield key and secret.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Higgsfield API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.higgsfield.ai/docs/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://private-hf.mintlify.site/docs/images/open-higgsfield.webp\">\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 - Higgsfield API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate server-side API requests with your Higgsfield key and secret.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://private-hf.mintlify.site/docs/images/open-higgsfield.webp\">\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/private-hf/NqDxvodEnQwFKKRR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Higgsfield API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003cmeta data-mint-head name=\"og:image:type\" content=\"image/webp\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.higgsfield.ai/docs/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/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.higgsfield.ai/#organization\",\"name\":\"Higgsfield API Docs\",\"url\":\"https://docs.higgsfield.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/private-hf/RgB2SXhCxJ6KplRT/logo/icon.png?fit=max\u0026auto=format\u0026n=RgB2SXhCxJ6KplRT\u0026q=85\u0026s=3e0d5d8cefd9c82e2b60a8956457f02d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.higgsfield.ai/docs#website\",\"name\":\"Higgsfield API Docs\",\"url\":\"https://docs.higgsfield.ai/docs\",\"publisher\":{\"@id\":\"https://docs.higgsfield.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.higgsfield.ai/docs/authentication#webpage\",\"url\":\"https://docs.higgsfield.ai/docs/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate server-side API requests with your Higgsfield key and secret.\",\"dateModified\":\"2026-09-18T23:27:51.907Z\",\"isPartOf\":{\"@id\":\"https://docs.higgsfield.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://docs.higgsfield.ai/docs/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.higgsfield.ai/docs/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.higgsfield.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.higgsfield.ai/docs/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.higgsfield.ai/docs/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticate server-side API requests with your Higgsfield key and secret.\",\"url\":\"https://docs.higgsfield.ai/docs/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.higgsfield.ai/docs/authentication#webpage\"},\"image\":\"https://docs.higgsfield.ai/images/open-higgsfield.webp\",\"dateModified\":\"2026-09-18T23:27:51.907Z\",\"publisher\":{\"@id\":\"https://docs.higgsfield.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.higgsfield.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Higgsfield API Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Higgsfield API Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/authentication.md","siteName":"Higgsfield API Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Get started","pages":[{"title":"Higgsfield API","sidebarTitle":"Overview","href":""},{"title":"Quickstart","description":"Submit a generation request and retrieve its result.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"How the API works","description":"Learn the common authentication and asynchronous request lifecycle shared by Higgsfield image and video models.","href":"/how-to/introduction"}]},{"group":"Core concepts","pages":[{"title":"Requests and lifecycle","href":"/concepts/requests"},{"title":"Idempotent requests","href":"/concepts/idempotency"},{"title":"Polling","href":"/concepts/polling"},{"title":"Webhooks","href":"/how-to/webhooks"},{"title":"File uploads","href":"/concepts/file-uploads"},{"title":"Errors and retries","href":"/concepts/errors"},{"title":"Rate limits","href":"/concepts/rate-limits"},{"title":"Billing and retention","href":"/concepts/billing-and-retention"}]},{"group":"SDKs","pages":[{"title":"Client libraries","href":"/how-to/sdk"}]},{"group":"Organizations","icon":"users","expanded":true,"pages":[{"title":"Organizations","sidebarTitle":"Overview","href":"/organizations"},{"title":"Managing members","href":"/organizations/managing-members"}]},{"group":"Resources","pages":[{"title":"FAQ","href":"/help/faq"},{"title":"Support","href":"/help/support"}]}]},{"tab":"API reference","icon":"square-terminal","pages":[{"title":"API reference","href":"/api-reference/overview"}]},{"tab":"Enterprise","icon":"building","pages":[{"title":"Enterprise","href":"/enterprise/overview"}]}]},"basePath":"","title":"Authentication - Higgsfield API Docs","buildId":"dpl_H5KQTnCewfWWvJxA7c3bCm7MFbb6","deploymentId":"dpl_H5KQTnCewfWWvJxA7c3bCm7MFbb6","dynamics":[],"chunks":[]}