The public gateway validates the key, applies your rate limits,
and forwards the request to Mithril’s core over a private network. Your key
never leaves Mithril, and your exchange credentials are never sent by you at
all — they’re attached once in the dashboard and stay encrypted.
Key types
mk_live_
Live keys place real orders with real money against your attached venue
credentials.
mk_test_
Test keys scope to a test environment for wiring up your integration
without touching live venues.
Keys are created and revoked on the API keys
page. The full secret is shown once at creation — Mithril stores only a
SHA-256 hash and can never display it again. Rotate or revoke a key any time; a
revoked key returns 401 immediately.
Treat an mk_live_ key like a trading credential. Anyone with it can place
orders within your risk limits. Store it in a secret manager or environment
variable — never commit it to source control. If a key leaks, revoke it in
the dashboard right away.
What a missing or bad key returns
{ "error": { "code": "unauthorized", "message": "missing or invalid API key", "request_id": "req_..." }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Mithril","colors":{"primary":"#8b5cf6","light":"#e879f9","dark":"#8b5cf6"},"logo":{"light":"https://mintcdn.com/mithril/KaBYrcsvkcb9-lBo/logo/light.svg?fit=max\u0026auto=format\u0026n=KaBYrcsvkcb9-lBo\u0026q=85\u0026s=42349b28c8a76e63a6729a981dddce0c","dark":"https://mintcdn.com/mithril/KaBYrcsvkcb9-lBo/logo/dark.svg?fit=max\u0026auto=format\u0026n=KaBYrcsvkcb9-lBo\u0026q=85\u0026s=959bc064abc8d0fdc8b39152b9da961c"},"favicon":"https://mintcdn.com/mithril/DPj1hkL3JQ7gOq7_/favicon.svg?fit=max\u0026auto=format\u0026n=DPj1hkL3JQ7gOq7_\u0026q=85\u0026s=93e0c5dd32432541535af1ba0a874ee7","navbar":{"links":[{"href":"https://cal.com/karl-mithril/demo","label":"Book a call"}],"primary":{"type":"button","label":"Get beta access","href":"https://app.trymithril.com"}},"footer":{"socials":{"website":"https://trymithril.com","github":"https://github.com/mithril"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.trymithril.com"},{"anchor":"Book a call","icon":"phone","href":"https://cal.com/karl-mithril/demo"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mithril","hasAudioNarration":false,"actualSubdomain":"mithril","customDomains":["docs.trymithril.com"],"gitSource":{"type":"github","owner":"trymithril","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95c4cd111843d72c21670:success","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"API reference","count":41},{"language":"default","tag":"Endpoints","count":40},{"language":"default","tag":"Documentation","count":15},{"language":"default","tag":"Complex Orders","count":7},{"language":"default","tag":"Subaccounts","count":7},{"language":"default","tag":"Guides","count":6},{"language":"default","tag":"Markets","count":5},{"language":"default","tag":"Orders","count":5},{"language":"default","tag":"Core concepts","count":4},{"language":"default","tag":"Risk limits","count":4}]},"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":"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":"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":"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":"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":"turbopuffer-dual-write","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":"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"authentication","slug":"/authentication","pageMetadata":{"title":"Authentication","description":"How the gateway authenticates your requests.","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 the gateway authenticates your requests.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Heading,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Every request to `,_jsx(_components.code,{children:`https://api.trymithril.com`}),` is authenticated with a `,_jsx(_components.strong,{children:`bearer\nAPI key`}),` in the `,_jsx(_components.code,{children:`Authorization`}),` header:`]}),`\n`,_jsx(CodeBlock,{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:`Authorization: Bearer mk_live_xxxxxxxxxxxxxxxxxxxxxxxx`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The public gateway validates the key, applies your `,_jsx(_components.a,{href:`/concepts/rate-limits`,children:`rate limits`}),`,\nand forwards the request to Mithril’s core over a private network. Your key\nnever leaves Mithril, and your `,_jsx(_components.strong,{children:`exchange`}),` credentials are never sent by you at\nall — they’re attached once in the dashboard and stay encrypted.`]}),`\n`,_jsx(Heading,{level:`2`,id:`key-types`,children:`Key types`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`mk_live_`,icon:`bolt`,children:_jsx(_components.p,{children:`Live keys place real orders with real money against your attached venue\ncredentials.`})}),_jsx(Card,{title:`mk_test_`,icon:`flask`,children:_jsx(_components.p,{children:`Test keys scope to a test environment for wiring up your integration\nwithout touching live venues.`})})]}),`\n`,_jsxs(_components.p,{children:[`Keys are created and revoked on the `,_jsx(_components.a,{href:`https://app.trymithril.com/keys`,children:`API keys`}),`\npage. The full secret is shown `,_jsx(_components.strong,{children:`once`}),` at creation — Mithril stores only a\nSHA-256 hash and can never display it again. Rotate or revoke a key any time; a\nrevoked key returns `,_jsx(_components.code,{children:`401`}),` immediately.`]}),`\n`,_jsx(Heading,{level:`2`,id:`managing-keys-programmatically`,children:`Managing keys programmatically`}),`\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:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Revoke a key (dashboard-authenticated)`})}),`\n`,_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:` DELETE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.trymithril.com/v1/api_keys/key_123`}),_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:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MITHRIL_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Treat an `,_jsx(_components.code,{children:`mk_live_`}),` key like a trading credential. Anyone with it can place\norders within your risk limits. Store it in a secret manager or environment\nvariable — `,_jsx(_components.strong,{children:`never`}),` commit it to source control. If a key leaks, revoke it in\nthe dashboard right away.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-a-missing-or-bad-key-returns`,children:`What a missing or bad key returns`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,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:` \"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:`\"unauthorized\"`}),_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:`\"missing or 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:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_...\"`})]}),`\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`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/concepts/errors`,children:`Errors`}),` for the full error contract.`]})]})}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 the gateway authenticates your requests.","href":"/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Key types","slug":"key-types","depth":2,"children":[]},{"title":"Managing keys programmatically","slug":"managing-keys-programmatically","depth":2,"children":[]},{"title":"What a missing or bad key returns","slug":"what-a-missing-or-bad-key-returns","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mithril","siteName":"Mithril","title":"Authentication - Mithril","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-16T15:52:04.884Z","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 the gateway authenticates your requests.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mithril\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_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/mithril/r6uQUDgo_BzsXMEe/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Mithril\">\u003cmeta data-mint-head property=\"og:description\" content=\"How the gateway authenticates your requests.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mithril\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trymithril.com/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mithril.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=How+the+gateway+authenticates+your+requests.\u0026amp;theme=b03a8db2c07edac0dfb1994f\u0026amp;signature=7a251f29b7f8cbee28b65c417ff767ea51d5490bdf01dff8175a4468012f5654\">\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 - Mithril\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How the gateway authenticates your requests.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mithril.mintlify.site/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Authentication\u0026amp;description=How+the+gateway+authenticates+your+requests.\u0026amp;theme=b03a8db2c07edac0dfb1994f\u0026amp;signature=7a251f29b7f8cbee28b65c417ff767ea51d5490bdf01dff8175a4468012f5654\">\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/mithril/r6uQUDgo_BzsXMEe/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mithril\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8b5cf6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trymithril.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.trymithril.com/#organization\",\"name\":\"Mithril\",\"url\":\"https://docs.trymithril.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mithril/KaBYrcsvkcb9-lBo/logo/light.svg?fit=max\u0026auto=format\u0026n=KaBYrcsvkcb9-lBo\u0026q=85\u0026s=42349b28c8a76e63a6729a981dddce0c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trymithril.com#website\",\"name\":\"Mithril\",\"url\":\"https://docs.trymithril.com\",\"publisher\":{\"@id\":\"https://docs.trymithril.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trymithril.com/authentication#webpage\",\"url\":\"https://docs.trymithril.com/authentication\",\"name\":\"Authentication\",\"description\":\"How the gateway authenticates your requests.\",\"dateModified\":\"2026-07-16T15:52:04.884Z\",\"isPartOf\":{\"@id\":\"https://docs.trymithril.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trymithril.com/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trymithril.com/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://docs.trymithril.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.trymithril.com/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trymithril.com/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"How the gateway authenticates your requests.\",\"url\":\"https://docs.trymithril.com/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trymithril.com/authentication#webpage\"},\"dateModified\":\"2026-07-16T15:52:04.884Z\",\"publisher\":{\"@id\":\"https://docs.trymithril.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trymithril.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Mithril\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Mithril\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/authentication.md","siteName":"Mithril","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"gauge","href":"https://app.trymithril.com"},{"anchor":"Book a call","icon":"phone","href":"https://cal.com/karl-mithril/demo"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","description":"From an API key to a risk-checked order in a few minutes.","href":"/quickstart"},{"title":"Authentication","href":"/authentication"}]},{"group":"Clients \u0026 SDKs","pages":[{"title":"Python SDK","description":"The official Python client for Mithril — typed, batteries-included.","href":"/sdks/python"},{"title":"MCP server (AI agents)","href":"/sdks/mcp"}]},{"group":"Core concepts","pages":[{"title":"Conventions","href":"/concepts/conventions"},{"title":"Idempotency","href":"/concepts/idempotency"},{"title":"Errors","href":"/concepts/errors"},{"title":"Rate limits","href":"/concepts/rate-limits"}]},{"group":"Guides","pages":[{"title":"Accounts","href":"/guides/accounts"},{"title":"Market data","href":"/guides/market-data"},{"title":"Guardrails","href":"/guides/guardrails"},{"title":"Orders","href":"/guides/orders"},{"title":"Smart execution","href":"/guides/smart-execution"},{"title":"Risk \u0026 P\u0026L","href":"/guides/risk"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Authentication - Mithril","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":[],"chunks":[]}