This SDK supports the following security scheme globally:
Name
Type
Scheme
apiKey
apiKey
API key
The ChainKit SDK can be used without an API key, but rate limits will be lower. Adding an API key allows for higher rate limits. Whether or not you use an API key, you can still interact with the SDK effectively, but the API key provides performance benefits for higher request volumes.
API key authentication is deprecated, and all API keys will stop working on January 15, 2027. API key creation is disabled. Until then, existing API keys keep working, and you can view or revoke them in AvaCloud or the Builder Console.
import { Avalanche } from "@avalanche-sdk/chainkit";const avalancheSDK = new Avalanche({ apiKey: "<YOUR_API_KEY_HERE>", chainId: "43114", network: "mainnet",});async function run() { const result = await avalancheSDK.metrics.healthCheck(); // Handle the result console.log(result);}run();
Never hardcode your API key directly into your code. Instead, securely store
it and retrieve it from an environment variable, a secrets manager, or a
dedicated configuration storage mechanism. This ensures that sensitive
information remains protected and is not exposed in version control or
publicly accessible code.
Was this page helpful?
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"Avalanche APIs \u0026 SDKs Documentation","colors":{"primary":"#FF394A","light":"#FF6673","dark":"#FF394A"},"logo":{"light":"https://mintcdn.com/avalabs-47ea3976/aMFVWopw05lo-Yr3/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=aMFVWopw05lo-Yr3\u0026q=85\u0026s=58b1edd9671d525af4dad6fa86626763","dark":"https://mintcdn.com/avalabs-47ea3976/aMFVWopw05lo-Yr3/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=aMFVWopw05lo-Yr3\u0026q=85\u0026s=8fbf7146fe796f7ec0457a6f800151e2"},"favicon":"https://mintcdn.com/avalabs-47ea3976/0zR1yC86HIu3y3oi/favicon.png?fit=max\u0026auto=format\u0026n=0zR1yC86HIu3y3oi\u0026q=85\u0026s=d3060b417290f0c55e6c5c128531b072","api":{"playground":{"proxy":false}},"background":{"color":{"light":"#FFFFFF","dark":"#000000"}},"navbar":{"links":[{"href":"https://academy.avax.network/","label":"Academy"},{"href":"https://discord.gg/avax","label":"Support"}],"primary":{"type":"button","label":"Manage API Keys","href":"https://build.avax.network/console/utilities/data-api-keys"}},"footer":{"socials":{"x":"https://x.com/AvaxDevelopers","github":"https://github.com/ava-labs","youtube":"https://www.youtube.com/@Avalancheavax","discord":"https://discord.gg/avax","medium":"https://medium.com/@avaxdevelopers"}},"seo":{"metatags":{"og:image":"https://github.com/javiertc/image/blob/main/og-avalanche-api-documentation.png?raw=True","og:description":"Accelerate your development across 100+ Layer 1 blockchains with powerful SDKs, APIs, guides, and tutorials.","og:site_name":"Avalanche API Documentation","og:site_logo":"https://cdn.prod.website-files.com/632993e1d1acbfa5635afd0b/66e44b097229055c691e7555_AvalancheLogo_Horizontal_4C_White.svg","twitter:site":"@AvaxDevelopers","twitter:card":"summary_large_image","twitter:title":"Avalanche API Documentation","twitter:description":"Accelerate your development across 100+ Layer 1 blockchains with powerful SDKs, APIs, guides, and tutorials.","twitter:image":"https://github.com/javiertc/image/blob/main/og-avalanche-api-documentation.png?raw=True","twitter:image:alt":"Avalanche API Documentation"},"indexing":"navigable"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Builder Hub","icon":"laptop-code","href":"https://build.avax.network/"},{"anchor":"Academy","icon":"book-open-cover","href":"https://academy.avax.network/"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/avax"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"avalabs-47ea3976","hasAudioNarration":false,"actualSubdomain":"avalabs-47ea3976","customDomains":["developers.avacloud.io"],"gitSource":{"type":"github","owner":"ava-labs","repo":"avacloud-dev-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10a88f9ffae5051c3fb593"},"feedback":{"thumbs":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b070ff897c718b6ea4cf577","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Data API","count":81},{"language":"default","tag":"RPC API","count":34},{"language":"default","tag":"EVM","count":33},{"language":"default","tag":"Platform Chain (P-Chain)","count":30},{"language":"default","tag":"Primary Network","count":25},{"language":"default","tag":"Webhooks API","count":24},{"language":"default","tag":"Get Started","count":23},{"language":"default","tag":"Transactions","count":20},{"language":"default","tag":"Metrics API","count":14},{"language":"default","tag":"Avalanche SDK","count":11}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":[{"filePath":"style.css","content":":root{--primary-color: #ff3649;--primary-hover: #ff394a;--text-gray: #333;--text-gray-light: #7979797a;--bg-hover-light: #f5f5f5;--bg-hover-dark: #2a2a2a;--bg-dark: #1a1a1a;--border-dark: #333;--spacing-xs: 4px;--spacing-sm: 8px;--spacing-md: 10px;--spacing-lg: 20px;--spacing-xl: 40px;--font-weight-normal: 500;--font-weight-bold: 600;--transition-fast: 0.2s ease;--transition-normal: 0.3s ease}.text-5xl{font-size:3rem;line-height:1}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-xl{font-size:1.5rem;line-height:2rem}.text-lg p{font-size:1.025rem}.search-buttons{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--spacing-md)}.search-buttons a{text-decoration:none;padding:var(--spacing-md) var(--spacing-lg);border-radius:30px;display:inline-block;font-size:16px;border:1px solid var(--text-gray-light);font-weight:var(--font-weight-normal);transition:background-color var(--transition-normal),\n color var(--transition-normal),\n border var(--transition-normal)}.search-buttons a:hover{background-color:var(--primary-color);color:#ffffff;border-color:var(--primary-color)}.footer{min-height:10rem;overflow:hidden;margin-top:var(--spacing-xl)}.footer-container{width:1376px;max-width:100%;display:flex;justify-content:space-between}.custom-item{flex:1}.custom-item img{pointer-events:none;user-select:none;cursor:default}.logo{margin-bottom:var(--spacing-md);margin-left:var(--spacing-lg)}.item-1{height:50px;display:flex;justify-content:flex-start;align-items:center;margin-left:-20px}.item-2{min-width:211px}.item-3{width:fit-content}.item-justify-end{display:flex;justify-content:flex-end}.navbar-dropdown{position:relative;display:inline-block}.navbar-dropdown::before{content:'';position:absolute;top:100%;left:-10px;right:-10px;height:20px;z-index:999}.navbar-dropdown-content{display:none;position:absolute;background-color:white;min-width:280px;box-shadow:0px 8px 16px 0px rgba(0, 0, 0, 0.2);z-index:1000;border-radius:8px;padding:var(--spacing-sm) 0;margin-top:var(--spacing-xs);left:0;animation:dropdownFadeIn 0.2s ease-out}@keyframes dropdownFadeIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.dark .navbar-dropdown-content{background-color:var(--bg-dark);border:1px solid var(--border-dark)}.navbar-dropdown-content a{color:var(--text-gray);padding:14px var(--spacing-lg);text-decoration:none;display:flex;align-items:center;gap:var(--spacing-md);font-size:14px;transition:background-color var(--transition-fast);width:100%;box-sizing:border-box}.dark .navbar-dropdown-content a{color:#fff}.navbar-dropdown-content a:hover{background-color:var(--bg-hover-light)}.dark .navbar-dropdown-content a:hover{background-color:var(--bg-hover-dark)}.navbar-dropdown-content{pointer-events:auto}.navbar-dropdown-content a i.lucide,.navbar-dropdown-content a svg{width:16px;height:16px;flex-shrink:0}.navbar-dropdown-content a i.lucide{display:inline-flex;align-items:center;justify-content:center}.navbar-dropdown>a{display:flex;align-items:center;gap:var(--spacing-xs);cursor:pointer;user-select:none}.navbar-dropdown>a::after{content:'';display:inline-block;width:0;height:0;margin-left:var(--spacing-xs);vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent;transition:transform 0.2s ease}.navbar-dropdown.open>a::after{transform:rotate(180deg)}@media (max-width: 800px){.footer-container{width:100%;padding:0 20px}.custom-item{min-width:300px}.item-1{order:1;justify-content:center}.item-2{order:3;margin-top:50px;justify-content:center}.item-3{order:2;justify-content:center}.item-justify-end{justify-content:center}}"}]}
{"page":{"pagePath":"avalanche-sdk/chainkit-sdk/authentication","slug":"/avalanche-sdk/chainkit-sdk/authentication","pageMetadata":{"title":"Authentication","icon":"user-tag","description":null,"href":"/avalanche-sdk/chainkit-sdk/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`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`per-client-security-schemes`,children:`Per-Client Security Schemes`}),`\n`,_jsx(_components.p,{children:`This SDK supports the following security scheme globally:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Name`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Scheme`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`apiKey`})}),_jsx(_components.td,{children:`apiKey`}),_jsx(_components.td,{children:`API key`})]})})]}),`\n`,_jsx(_components.p,{children:`The ChainKit SDK can be used without an API key, but rate limits will be lower. Adding an API key allows for higher rate limits. Whether or not you use an API key, you can still interact with the SDK effectively, but the API key provides performance benefits for higher request volumes.`}),`\n`,_jsxs(Warning,{children:[`API key authentication is deprecated, and all API keys will stop working on January 15, 2027. API key creation is disabled. Until then, existing API keys keep working, and you can view or revoke them in `,_jsx(_components.a,{href:`https://app.avacloud.io/`,children:`AvaCloud`}),` or the `,_jsx(_components.a,{href:`https://build.avax.network/console/utilities/data-api-keys`,children:`Builder Console`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Avalanche`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@avalanche-sdk/chainkit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` avalancheSDK`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Avalanche`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cYOUR_API_KEY_HERE>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chainId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"43114\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` network:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mainnet\"`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` avalancheSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`metrics`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`healthCheck`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Handle the result`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Never hardcode your API key directly into your code. Instead, securely store\nit and retrieve it from an environment variable, a secrets manager, or a\ndedicated configuration storage mechanism. This ensures that sensitive\ninformation remains protected and is not exposed in version control or\npublicly accessible code.`})})]})}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","icon":"user-tag","description":null,"href":"/avalanche-sdk/chainkit-sdk/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Per-Client Security Schemes","slug":"per-client-security-schemes","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/avalabs-47ea3976/c3ff25aa46861ed7/replace_lang_label.js","/_mintlify/custom/avalabs-47ea3976/532b775fb039c6cf/custom.js"],"subdomain":"avalabs-47ea3976","siteName":"Avalanche APIs \u0026 SDKs Documentation","title":"Authentication - Avalanche APIs \u0026 SDKs Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-25T16:42:44.275Z","originalFileLocation":"avalanche-sdk/chainkit-sdk/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=\"Avalanche APIs \u0026amp; SDKs Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Avalanche APIs \u0026amp; SDKs Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Accelerate your development across 100+ Layer 1 blockchains with powerful SDKs, APIs, guides, and tutorials.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Avalanche API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://github.com/javiertc/image/blob/main/og-avalanche-api-documentation.png?raw=True\">\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=\"Avalanche API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Accelerate your development across 100+ Layer 1 blockchains with powerful SDKs, APIs, guides, and tutorials.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://github.com/javiertc/image/blob/main/og-avalanche-api-documentation.png?raw=True\">\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/avalabs-47ea3976/G_eb2HoilfFk1IGX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Avalanche APIs \u0026amp; SDKs Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF394A\">\u003cmeta data-mint-head name=\"og:site_logo\" content=\"https://cdn.prod.website-files.com/632993e1d1acbfa5635afd0b/66e44b097229055c691e7555_AvalancheLogo_Horizontal_4C_White.svg\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"Avalanche API Documentation\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/avalanche-sdk/chainkit-sdk/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.avacloud.io/#organization\",\"name\":\"Avalanche APIs \u0026 SDKs Documentation\",\"url\":\"https://developers.avacloud.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/avalabs-47ea3976/aMFVWopw05lo-Yr3/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=aMFVWopw05lo-Yr3\u0026q=85\u0026s=58b1edd9671d525af4dad6fa86626763\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.avacloud.io#website\",\"name\":\"Avalanche APIs \u0026 SDKs Documentation\",\"url\":\"https://developers.avacloud.io\",\"publisher\":{\"@id\":\"https://developers.avacloud.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication#webpage\",\"url\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication\",\"name\":\"Authentication\",\"dateModified\":\"2026-11-25T16:42:44.275Z\",\"isPartOf\":{\"@id\":\"https://developers.avacloud.io#website\"},\"breadcrumb\":{\"@id\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ChainKit SDK\",\"item\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"url\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://developers.avacloud.io/avalanche-sdk/chainkit-sdk/authentication#webpage\"},\"image\":\"https://github.com/javiertc/image/blob/main/og-avalanche-api-documentation.png?raw=True\",\"dateModified\":\"2026-11-25T16:42:44.275Z\",\"publisher\":{\"@id\":\"https://developers.avacloud.io/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.avacloud.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Avalanche APIs \u0026 SDKs Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Avalanche APIs \u0026 SDKs Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/avalanche-sdk/chainkit-sdk/authentication.md","siteName":"Avalanche APIs \u0026 SDKs Documentation","nav":{"global":{"anchors":[{"anchor":"Builder Hub","icon":"laptop-code","href":"https://build.avax.network/"},{"anchor":"Academy","icon":"book-open-cover","href":"https://academy.avax.network/"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/avax"}]},"tabs":[{"tab":"API Reference","pages":[{"title":"API Reference","href":"/introduction"}]},{"tab":"Data API","pages":[{"title":"Data API","href":"/data-api/overview"}]},{"tab":"Webhooks API","pages":[{"title":"Webhooks API","href":"/webhooks-api/overview"}]},{"tab":"Metrics API","pages":[{"title":"Metrics API","href":"/metrics-api/overview"}]},{"tab":"RPC API","pages":[{"title":"RPC API","href":"/rpc-api/overview"}]},{"tab":"Avalanche SDK","groups":[{"group":"Avalanche SDK","pages":[{"title":"Overview","icon":"rocket","href":"/avalanche-sdk/overview"}]},{"group":"ChainKit SDK","pages":[{"title":"Getting Started","icon":"rocket","description":null,"href":"/avalanche-sdk/chainkit-sdk/getting-started"},{"title":"Authentication","icon":"user-tag","href":"/avalanche-sdk/chainkit-sdk/authentication"},{"title":"Global Parameters","icon":"sliders-up","description":null,"href":"/avalanche-sdk/chainkit-sdk/global-parameters"},{"title":"Retries","icon":"arrows-rotate-reverse","href":"/avalanche-sdk/chainkit-sdk/retries"},{"title":"Pagination","icon":"square-caret-right","href":"/avalanche-sdk/chainkit-sdk/pagination"},{"title":"Error Handling","icon":"cloud-exclamation","href":"/avalanche-sdk/chainkit-sdk/error"},{"title":"Custom HTTP Client","icon":"globe-pointer","href":"/avalanche-sdk/chainkit-sdk/custom-http"}]},{"group":"Client SDK","pages":[{"title":"Getting Started","icon":"rocket","href":"/avalanche-sdk/client-sdk/getting-started"}]},{"group":"Interchain SDK","pages":[{"title":"Getting Started","icon":"rocket","href":"/avalanche-sdk/interchain-sdk/getting-started"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"basePath":"","title":"Authentication - Avalanche APIs \u0026 SDKs Documentation","deploymentId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","buildId":"dpl_HZVV42MMRSo9WnNHfTGZvby5jph9","dynamics":[],"chunks":[]}