The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.
Using the API Key
To authenticate your API calls, you must include an x-api-key header with your secret API key.Example using cURL:
Replace YOUR_SUPER_SECRET_API_KEY with the actual API key you’ve configured for your backend instance, and https://your-agenttest-backend.example.com with the URL of your deployed AgentTest backend.
Setting up the API Key
The API key is defined in the .env file in the root of your AgentTest backend project. You need to set the API_KEY variable:
# .env fileDATABASE_URL="your_supabase_connection_string"API_KEY="your_super_secret_api_key_here"# Other variables like PORT can also be here# PORT=3001
Choose a strong, unique string for your API key.
This API_KEY value is what the backend server will expect in the x-api-key header.
Keep your API key secure!
Your API key grants access to your AgentTest backend, including assigning variants and logging results.
Do not expose it in client-side browser code or commit it to your version control system if the .env file is not gitignored (by default, .env files should be in .gitignore).
Treat it like a password.
Unauthenticated Requests
If an API request is made without an x-api-key header, or if the provided key is invalid, the server will respond with a 401 Unauthorized HTTP status code.
{ "error": "Unauthorized"}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AgentTest","colors":{"primary":"#cba6f7","light":"#cdd6f4","dark":"#181825"},"logo":{"light":"https://mintcdn.com/agenttest/adIg5SIwL2FMrfXU/logo/AgentTestLogo.png?fit=max\u0026auto=format\u0026n=adIg5SIwL2FMrfXU\u0026q=85\u0026s=fb1f43cc85440bbd033bdc8ac5e06905","dark":"https://mintcdn.com/agenttest/adIg5SIwL2FMrfXU/logo/AgentTestLogo.png?fit=max\u0026auto=format\u0026n=adIg5SIwL2FMrfXU\u0026q=85\u0026s=fb1f43cc85440bbd033bdc8ac5e06905"},"favicon":"/logo/favicon.png","navbar":{"links":[{"label":"Support","href":"mailto:lakshyashishir1@gmail.com"}],"primary":{"type":"button","label":"Dashboard","href":"https://www.agenttest.live/"}},"footer":{"socials":{"x":"https://x.com/mintlify","github":"https://github.com/mintlify","linkedin":"https://linkedin.com/company/mintlify"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"agenttest","hasAudioNarration":false,"actualSubdomain":"agenttest","customDomains":[],"gitSource":{"type":"github","owner":"lakshyashishir","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae92917204c106d987d19af:success","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"default","tag":"Documentation","count":9},{"language":"default","tag":"Concepts","count":3},{"language":"default","tag":"API Reference","count":2},{"language":"default","tag":"Getting Started","count":2},{"language":"default","tag":"Developer Guide","count":1},{"language":"default","tag":"Roadmap","count":1}]},"assistantConfig":{},"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":"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":"site-roles","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":"control","enabled":true,"payload":{"type":"string","value":"control"},"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}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"concepts/authentication","slug":"/concepts/authentication","pageMetadata":{"title":"Authentication","description":"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.","href":"/concepts/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: \"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in 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={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,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:[_jsx(Heading,{level:`2`,id:`using-the-api-key`,children:`Using the API Key`}),`\n`,_jsxs(_components.p,{children:[`To authenticate your API calls, you must include an `,_jsx(_components.code,{children:`x-api-key`}),` header with your secret API key.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example using cURL:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:`#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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_SUPER_SECRET_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:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{ \"userId\": \"user-test-123\" }'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://your-agenttest-backend.example.com/experiment/my-prompt-test/assign`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`YOUR_SUPER_SECRET_API_KEY`}),` with the actual API key you’ve configured for your backend instance, and `,_jsx(_components.code,{children:`https://your-agenttest-backend.example.com`}),` with the URL of your deployed AgentTest backend.`]}),`\n`,_jsx(Heading,{level:`2`,id:`setting-up-the-api-key`,children:`Setting up the API Key`}),`\n`,_jsxs(_components.p,{children:[`The API key is defined in the `,_jsx(_components.code,{children:`.env`}),` file in the root of your AgentTest backend project. You need to set the `,_jsx(_components.code,{children:`API_KEY`}),` variable:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,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:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# .env file`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`DATABASE_URL=\"your_supabase_connection_string\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`API_KEY=\"your_super_secret_api_key_here\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Other variables like PORT can also be here`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# PORT=3001`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Choose a strong, unique string for your API key.`}),`\n`,_jsxs(_components.li,{children:[`This `,_jsx(_components.code,{children:`API_KEY`}),` value is what the backend server will expect in the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Keep your API key secure!`}),`\nYour API key grants access to your AgentTest backend, including assigning variants and logging results.\nDo not expose it in client-side browser code or commit it to your version control system if the `,_jsx(_components.code,{children:`.env`}),` file is not gitignored (by default, `,_jsx(_components.code,{children:`.env`}),` files should be in `,_jsx(_components.code,{children:`.gitignore`}),`).\nTreat it like a password.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`unauthenticated-requests`,children:`Unauthenticated Requests`}),`\n`,_jsxs(_components.p,{children:[`If an API request is made without an `,_jsx(_components.code,{children:`x-api-key`}),` header, or if the provided key is invalid, the server will respond with a `,_jsx(_components.code,{children:`401 Unauthorized`}),` HTTP status code.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,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:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unauthorized\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}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":"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.","href":"/concepts/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Using the API Key","slug":"using-the-api-key","depth":2,"children":[]},{"title":"Setting up the API Key","slug":"setting-up-the-api-key","depth":2,"children":[]},{"title":"Unauthenticated Requests","slug":"unauthenticated-requests","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"agenttest","siteName":"AgentTest","title":"Authentication - AgentTest","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T08:54:46.573Z","originalFileLocation":"concepts/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=\"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AgentTest\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_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/agenttest/yuqOfq2ImX1-39vV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - AgentTest\">\u003cmeta data-mint-head property=\"og:description\" content=\"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AgentTest\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://agenttest.mintlify.app/concepts/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://agenttest.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Authentication\u0026amp;description=The+AgentTest+backend+uses+API+keys+to+authenticate+requests.+All+API+endpoints+are+protected+and+require+a+valid+API+key+to+be+included+in+your+requests.\u0026amp;theme=707c4b0f22b09925f0697cf4\u0026amp;signature=5252a18a67d21e18dfa0fbeabb229550d5081f8fc2de5aa6a4897fefc98afa23\">\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 - AgentTest\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://agenttest.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Authentication\u0026amp;description=The+AgentTest+backend+uses+API+keys+to+authenticate+requests.+All+API+endpoints+are+protected+and+require+a+valid+API+key+to+be+included+in+your+requests.\u0026amp;theme=707c4b0f22b09925f0697cf4\u0026amp;signature=5252a18a67d21e18dfa0fbeabb229550d5081f8fc2de5aa6a4897fefc98afa23\">\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/agenttest/yuqOfq2ImX1-39vV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AgentTest\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#cba6f7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://agenttest.mintlify.app/concepts/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://agenttest.mintlify.app/#organization\",\"name\":\"AgentTest\",\"url\":\"https://agenttest.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/agenttest/adIg5SIwL2FMrfXU/logo/AgentTestLogo.png?fit=max\u0026auto=format\u0026n=adIg5SIwL2FMrfXU\u0026q=85\u0026s=fb1f43cc85440bbd033bdc8ac5e06905\"}},{\"@type\":\"WebSite\",\"@id\":\"https://agenttest.mintlify.app#website\",\"name\":\"AgentTest\",\"url\":\"https://agenttest.mintlify.app\",\"publisher\":{\"@id\":\"https://agenttest.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://agenttest.mintlify.app/concepts/authentication#webpage\",\"url\":\"https://agenttest.mintlify.app/concepts/authentication\",\"name\":\"Authentication\",\"description\":\"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.\",\"dateModified\":\"2026-01-07T08:54:46.573Z\",\"isPartOf\":{\"@id\":\"https://agenttest.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://agenttest.mintlify.app/concepts/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://agenttest.mintlify.app/concepts/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Concepts\",\"item\":\"https://agenttest.mintlify.app/concepts/experiments-variants\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://agenttest.mintlify.app/concepts/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://agenttest.mintlify.app/concepts/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"The AgentTest backend uses API keys to authenticate requests. All API endpoints are protected and require a valid API key to be included in your requests.\",\"url\":\"https://agenttest.mintlify.app/concepts/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://agenttest.mintlify.app/concepts/authentication#webpage\"},\"dateModified\":\"2026-01-07T08:54:46.573Z\",\"publisher\":{\"@id\":\"https://agenttest.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://agenttest.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AgentTest\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AgentTest\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/concepts/authentication.md","siteName":"AgentTest","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Overview","href":""},{"title":"Installation \u0026 Setup","href":"/getting-started/installation-setup"}]},{"group":"API Reference","pages":[{"title":"Assign Variant","href":"/api-reference/assign-endpoint"},{"title":"Log Result","href":"/api-reference/log-endpoint"}]},{"group":"Concepts","pages":[{"title":"Experiments \u0026 Variants","href":"/concepts/experiments-variants"},{"title":"Assignment \u0026 Logging","description":"Two fundamental processes in AgentTest are Variant Assignment (determining which version a user sees) and Result Logging (recording what happened).","href":"/concepts/assignment-logging"},{"title":"Authentication","href":"/concepts/authentication"}]},{"group":"Developer Guide","pages":[{"title":"Local development","href":"/developer-guide/local-development"},{"title":"Schema db","href":"/developer-guide/schema-db"},{"title":"SDK Integration","href":"/developer-guide/sdk-integration"}]},{"group":"Roadmap","pages":[{"title":"Roadmap","href":"/roadmap"}]}]}]},"basePath":"","title":"Authentication - AgentTest","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":[],"chunks":[]}