{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SomyaLabs","colors":{"primary":"#144e9f","light":"#71bbf4","dark":"#02163b"},"logo":{"light":"https://mintcdn.com/somyalabs/acUA4OX89wMHG4wk/logo/light.svg?fit=max\u0026auto=format\u0026n=acUA4OX89wMHG4wk\u0026q=85\u0026s=c9ae151b9732bed2cef23e999d45e213","dark":"https://mintcdn.com/somyalabs/acUA4OX89wMHG4wk/logo/dark.svg?fit=max\u0026auto=format\u0026n=acUA4OX89wMHG4wk\u0026q=85\u0026s=29512a98bf06767e233cb0c09d6c0ef8"},"favicon":"https://mintcdn.com/somyalabs/acUA4OX89wMHG4wk/favicon.svg?fit=max\u0026auto=format\u0026n=acUA4OX89wMHG4wk\u0026q=85\u0026s=4c16f9736a5992b1f38a1500fa736b3f","navbar":{"links":[{"href":"https://playground.somya.ai","label":"Playground"}],"primary":{"type":"button","label":"Get Started","href":"https://playground.somya.ai"}},"footer":{"socials":{"github":"https://github.com/somyalabs","linkedin":"https://www.linkedin.com/company/somyalabs"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"somyalabs","hasAudioNarration":false,"actualSubdomain":"somyalabs","customDomains":["docs.somya.ai"],"gitSource":{"type":"github","owner":"somyalab","repo":"web-page","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af82079f47e66462e34233b","clientVersion":"0.0.4205","searchFilterCounts":[{"language":"default","tag":"API Reference","count":29},{"language":"default","tag":"Endpoints","count":27},{"language":"default","tag":"Documentation","count":10},{"language":"default","tag":"voices","count":5},{"language":"default","tag":"api-keys","count":4},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Integrations","count":2},{"language":"default","tag":"Models","count":2},{"language":"default","tag":"contact-submissions","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"How to authenticate requests to the SomyaLabs API.","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: \"How to authenticate requests to the SomyaLabs API.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._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:[`Authenticate every request with your `,_jsx(_components.strong,{children:`API key`}),`, in `,_jsx(_components.strong,{children:`either`}),` header (they’re\nequivalent):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`X-API-Key:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_API_KEY`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# or`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Bearer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` YOUR_API_KEY`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`X-API-Key`}),` for server-to-server calls with a SomyaLabs API key. The\n`,_jsx(_components.code,{children:`Authorization: Bearer`}),` form is also accepted if it fits your HTTP client better.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-your-first-key-bootstrap`,children:`Create your first key (bootstrap)`}),`\n`,_jsxs(_components.p,{children:[`Your `,_jsx(_components.strong,{children:`first`}),` key is created from the dashboard — no key needed:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Sign in to the `,_jsx(_components.a,{href:`https://playground.somya.ai`,children:`Playground`}),` (your account\nsession authenticates you).`]}),`\n`,_jsxs(_components.li,{children:[`Open `,_jsx(_components.strong,{children:`API keys`}),` → `,_jsx(_components.strong,{children:`Create key`}),`, give it a `,_jsx(_components.code,{children:`name`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Copy the returned `,_jsx(_components.code,{children:`key`}),` — it’s shown `,_jsx(_components.strong,{children:`only once`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never commit API keys or expose them in client-side code. Call the API from\nyour backend and store keys in environment variables.`})}),`\n`,_jsx(Heading,{level:`2`,id:`create-additional-keys-via-the-api`,children:`Create additional keys via the API`}),`\n`,_jsxs(_components.p,{children:[`Once you have a key (or an authenticated session), you can create more\nprogrammatically with `,_jsx(_components.code,{children:`POST /v1/api-keys`}),`:`]}),`\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://api.somya.ai/v1/api-keys`}),_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:` \"X-API-Key: YOUR_EXISTING_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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_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:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"name\": \"production\", \"description\": \"server-side key\" }'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The new key is returned under `,_jsx(_components.code,{children:`data.key`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,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:`10`,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:`true`}),_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:` \"data\"`}),_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:` \"api_key_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},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:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production\"`}),_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:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"server-side 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:` \"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk_…\"`}),_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:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-06-30T00:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`rotating-keys`,children:`Rotating keys`}),`\n`,_jsxs(_components.p,{children:[`Rotate without downtime — `,_jsx(_components.strong,{children:`add the new key before removing the old one`}),`:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create`}),` a new key (`,_jsx(_components.code,{children:`POST /v1/api-keys`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Deploy`}),` it to your services (update the env var, roll out).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify`}),` the new key is serving live traffic (make a real request, check\nlogs/usage).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Drain`}),` — give in-flight requests using the old key time to finish.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Revoke`}),` the old key: `,_jsx(_components.code,{children:`DELETE /v1/api-keys/{api_key_id}`}),`.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Revocation takes effect immediately — any service still using the old key will\nstart getting `,_jsx(_components.code,{children:`401`}),`s. Always verify the new key first (step 3).`]})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/guides/errors`,children:`Errors`}),` for the `,_jsx(_components.code,{children:`401`}),`/auth error shape.`]})]})}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":"How to authenticate requests to the SomyaLabs API.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create your first key (bootstrap)","slug":"create-your-first-key-bootstrap","depth":2,"children":[]},{"title":"Create additional keys via the API","slug":"create-additional-keys-via-the-api","depth":2,"children":[]},{"title":"Rotating keys","slug":"rotating-keys","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"somyalabs","siteName":"SomyaLabs","title":"Authentication - SomyaLabs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-29T20:36:10.213Z","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=\"description\" content=\"How to authenticate requests to the SomyaLabs API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SomyaLabs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_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/somyalabs/WY0lUfDuxHiZqOJ4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - SomyaLabs\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to authenticate requests to the SomyaLabs API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SomyaLabs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.somya.ai/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://somyalabs.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+requests+to+the+SomyaLabs+API.\u0026amp;theme=fd59a9e147986d58913ec8cb\u0026amp;signature=1d125e1fec8c7a69cf2d4fa17a6a776160dc3db71eae4f007431ea9ce0f412d9\">\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 - SomyaLabs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to authenticate requests to the SomyaLabs API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://somyalabs.mintlify.site/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Authentication\u0026amp;description=How+to+authenticate+requests+to+the+SomyaLabs+API.\u0026amp;theme=fd59a9e147986d58913ec8cb\u0026amp;signature=1d125e1fec8c7a69cf2d4fa17a6a776160dc3db71eae4f007431ea9ce0f412d9\">\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/somyalabs/WY0lUfDuxHiZqOJ4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SomyaLabs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#144e9f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.somya.ai/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.somya.ai/#organization\",\"name\":\"SomyaLabs\",\"url\":\"https://docs.somya.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/somyalabs/acUA4OX89wMHG4wk/logo/light.svg?fit=max\u0026auto=format\u0026n=acUA4OX89wMHG4wk\u0026q=85\u0026s=c9ae151b9732bed2cef23e999d45e213\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.somya.ai#website\",\"name\":\"SomyaLabs\",\"url\":\"https://docs.somya.ai\",\"publisher\":{\"@id\":\"https://docs.somya.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.somya.ai/authentication#webpage\",\"url\":\"https://docs.somya.ai/authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate requests to the SomyaLabs API.\",\"dateModified\":\"2026-06-29T20:36:10.213Z\",\"isPartOf\":{\"@id\":\"https://docs.somya.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.somya.ai/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.somya.ai/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get Started\",\"item\":\"https://docs.somya.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.somya.ai/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.somya.ai/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"How to authenticate requests to the SomyaLabs API.\",\"url\":\"https://docs.somya.ai/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.somya.ai/authentication#webpage\"},\"dateModified\":\"2026-06-29T20:36:10.213Z\",\"publisher\":{\"@id\":\"https://docs.somya.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.somya.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SomyaLabs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SomyaLabs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"SomyaLabs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"SomyaLabs Docs","href":""},{"title":"Quickstart","description":"Make your first request to the SomyaLabs API.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Models","pages":[{"title":"Text to Speech (Panini)","description":"Streaming speech synthesis across India's languages.","href":"/models/tts"},{"title":"Speech to Text (Vyasa)","href":"/models/asr"}]},{"group":"Guides","pages":[{"title":"Errors","href":"/guides/errors"},{"title":"Rate limits \u0026 quota","href":"/guides/rate-limits"},{"title":"Pricing","href":"/guides/pricing"}]},{"group":"Integrations","pages":[{"title":"LiveKit Agents","href":"/integrations/livekit"},{"title":"LiveKit adapter reference","href":"/integrations/livekit-adapter"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Authentication - SomyaLabs","deploymentId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","buildId":"dpl_FZMKUpaaKiVETbfqhoUe4sPFDTmY","dynamics":[],"chunks":[]}