Retrieve how many AI steps your organisation’s SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows.
Each session’s steps are counted from its step log:
An AI step is a step the AI model had to decide.
A cached step was replayed from the cache instead.
Steps your own code performed are free and count as neither.
The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage.
A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test’s ID. Sessions started without a test ID share one row, with testId set to null.
By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started.
Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old.
These numbers won’t add up to the monthly allowance on the usage dashboard, because the two measure different things:
Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don’t go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan.
This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in.
An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.
Only include sessions started with this API key. Use the key ID: the part of the key's prefix after mb_live_, for example AbCdEfGhIjK for a key starting mb_live_AbCdEfGhIjK. Use legacy for keys MobileBoost issued to you directly, or unattributed for sessions from before MobileBoost recorded which key started a session. Omit it to include every session.
One row per test ID, ordered by aiSteps, highest first.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MobileBoost","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/mobileboost-321ad6a9/OGuA69W71_lGnu9x/logo/light.png?fit=max\u0026auto=format\u0026n=OGuA69W71_lGnu9x\u0026q=85\u0026s=b6a6cc5ef5708fb7e589eb22c4e758e5","dark":"https://mintcdn.com/mobileboost-321ad6a9/BUpecZhwuqipr6rG/logo/dark.png?fit=max\u0026auto=format\u0026n=BUpecZhwuqipr6rG\u0026q=85\u0026s=fa051814a401e3fac77cd87f86f198b5"},"favicon":"https://mintcdn.com/mobileboost-321ad6a9/6v1OHjEJe7b4HZwT/favicon.png?fit=max\u0026auto=format\u0026n=6v1OHjEJe7b4HZwT\u0026q=85\u0026s=f0fa31f2c8ddd8d4e252cd3702d4f0c4","api":{"playground":{"display":"interactive"}},"footer":{"socials":{}},"seo":{},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mobileboost-321ad6a9","hasAudioNarration":false,"actualSubdomain":"mobileboost-321ad6a9","customDomains":["docs.mobileboost.io"],"gitSource":{"type":"github","owner":"mobileboosthq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6aeedda1b69215f743760de0","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Local Tooling","count":21},{"language":"default","tag":"API","count":19},{"language":"default","tag":"SDK","count":18},{"language":"default","tag":"QA Studio","count":14},{"language":"default","tag":"Test Agent","count":13},{"language":"default","tag":"Appium","count":11},{"language":"default","tag":"No-code test editor","count":7},{"language":"default","tag":"Test execution","count":7},{"language":"default","tag":"Tests","count":6},{"language":"default","tag":"Folders","count":5}]},"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"changelog.css","content":".changelog-filters{display:flex;flex-wrap:wrap;gap:0.5rem;margin:1.5rem 0 2rem}.changelog-chip{padding:0.25rem 0.75rem;font-size:0.8125rem;line-height:1.4;border-radius:9999px;border:1px solid rgb(229 231 235);background:transparent;color:rgb(75 85 99);cursor:pointer;transition:background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease}.changelog-chip:hover{background:rgb(243 244 246);color:rgb(17 24 39)}.changelog-chip.is-active{background:#16a34a;background:rgb(var(--primary));border-color:#16a34a;border-color:rgb(var(--primary));color:#fff}.changelog-list{border-top:1px solid rgb(229 231 235)}.changelog-row{display:block;padding:1rem 0.75rem;margin:0 -0.75rem;border-bottom:1px solid rgb(229 231 235);text-decoration:none!important;color:inherit;border-radius:0.375rem;transition:background-color 0.12s ease}.changelog-row:hover{background:rgb(249 250 251)}.changelog-row-head{display:flex;align-items:baseline;justify-content:space-between;gap:1.5rem}.changelog-row-title{font-weight:600;font-size:1rem;line-height:1.5;color:rgb(17 24 39)}.changelog-row:hover .changelog-row-title{color:#16a34a;color:rgb(var(--primary))}.changelog-row-date{flex:none;font-size:0.8125rem;color:rgb(107 114 128);white-space:nowrap}.changelog-row-desc{margin:0.25rem 0 0;font-size:0.875rem;font-weight:400;line-height:1.6;color:rgb(107 114 128);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.changelog-meta{display:flex;flex-wrap:wrap;align-items:center;gap:0.75rem;margin-bottom:2rem;font-size:0.8125rem;color:rgb(107 114 128)}.changelog-meta span{padding:0.125rem 0.5rem;border-radius:9999px;background:rgb(243 244 246);color:rgb(75 85 99)}.changelog-back{margin-top:3rem;padding-top:1.5rem;border-top:1px solid rgb(229 231 235);font-size:0.875rem}.changelog-back p{margin:0}.changelog-back a::before{content:\"\\2190\\00a0\"}.dark .changelog-chip{border-color:rgb(55 65 81);color:rgb(156 163 175)}.dark .changelog-chip:hover{background:rgb(31 41 55);color:rgb(243 244 246)}.dark .changelog-chip.is-active{color:#fff}.dark .changelog-list,.dark .changelog-row,.dark .changelog-back{border-color:rgb(38 45 58)}.dark .changelog-row:hover{background:rgb(24 30 40)}.dark .changelog-row-title{color:rgb(243 244 246)}.dark .changelog-row-date,.dark .changelog-row-desc,.dark .changelog-meta{color:rgb(148 156 168)}.dark .changelog-meta span{background:rgb(31 41 55);color:rgb(203 213 225)}@media (max-width: 640px){.changelog-row-head{display:block}.changelog-row-date{display:block;margin-top:0.25rem}}.changelog-pager{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:2rem;flex-wrap:wrap}.changelog-pager-pages{display:flex;gap:0.25rem;flex-wrap:wrap}.changelog-pager-step,.changelog-pager-page{min-width:2rem;padding:0.3rem 0.75rem;font-size:0.8125rem;line-height:1.4;border-radius:0.375rem;border:1px solid rgb(229 231 235);background:transparent;color:rgb(75 85 99);cursor:pointer;transition:background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease}.changelog-pager-step:hover:not(:disabled),.changelog-pager-page:hover:not(.is-active){background:rgb(243 244 246);color:rgb(17 24 39)}.changelog-pager-step:disabled{opacity:0.4;cursor:default}.changelog-pager-page.is-active{background:#16a34a;background:rgb(var(--primary));border-color:#16a34a;border-color:rgb(var(--primary));color:#fff}.dark .changelog-pager-step,.dark .changelog-pager-page{border-color:rgb(55 65 81);color:rgb(156 163 175)}.dark .changelog-pager-step:hover:not(:disabled),.dark .changelog-pager-page:hover:not(.is-active){background:rgb(31 41 55);color:rgb(243 244 246)}.dark .changelog-pager-page.is-active{color:#fff}"}],"page":{"pagePath":"api-reference/get-sdk-session-usage","slug":"/api-reference/get-sdk-session-usage","pageMetadata":{"title":"Get SDK session usage","description":"Retrieve how many AI steps your organisation's SDK sessions used over the last `days` days, grouped by the test ID each session was started with. These are the numbers the **Usage by test** table on the usage dashboard shows.\n\nEach session's steps are counted from its step log:\n\n- An **AI step** is a step the AI model had to decide.\n- A **cached step** was replayed from the cache instead.\n- Steps your own code performed are free and count as neither.\n\nThe cache hit rate is `cachedSteps / (cachedSteps + aiSteps)`, as a percentage.\n\nA test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test's ID. Sessions started without a test ID share one row, with `testId` set to `null`.\n\nBy default, sessions started with any of your API keys are included. Pass `apiKeyId` to see only the sessions one key started.\n\nAny API key of your organisation can call this endpoint, including read-only `audit` keys. The organisation is taken from the API key. Results can be up to one minute old.\n\nThese numbers won't add up to the monthly allowance on the usage dashboard, because the two measure different things:\n\n- **Monthly allowance:** counts AI model calls from all your runs in the calendar month, including runs that don't go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan.\n- **This endpoint:** counts AI steps of SDK sessions only, unweighted, over the last `days` days. A session counts in the window it started in.\n\nAn AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.","deprecated":null,"version":null,"openapi":"/openapi.json get /usage/sdk-sessions","href":"/api-reference/get-sdk-session-usage","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Retrieve how many AI steps your organisation’s SDK sessions used over the last \", _jsx(_components.code, {\n children: \"days\"\n }), \" days, grouped by the test ID each session was started with. These are the numbers the \", _jsx(_components.strong, {\n children: \"Usage by test\"\n }), \" table on the usage dashboard shows.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Each session’s steps are counted from its step log:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"An \", _jsx(_components.strong, {\n children: \"AI step\"\n }), \" is a step the AI model had to decide.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"A \", _jsx(_components.strong, {\n children: \"cached step\"\n }), \" was replayed from the cache instead.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Steps your own code performed are free and count as neither.\"\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The cache hit rate is \", _jsx(_components.code, {\n children: \"cachedSteps / (cachedSteps + aiSteps)\"\n }), \", as a percentage.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test’s ID. Sessions started without a test ID share one row, with \", _jsx(_components.code, {\n children: \"testId\"\n }), \" set to \", _jsx(_components.code, {\n children: \"null\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"By default, sessions started with any of your API keys are included. Pass \", _jsx(_components.code, {\n children: \"apiKeyId\"\n }), \" to see only the sessions one key started.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Any API key of your organisation can call this endpoint, including read-only \", _jsx(_components.code, {\n children: \"audit\"\n }), \" keys. The organisation is taken from the API key. Results can be up to one minute old.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"These numbers won’t add up to the monthly allowance on the usage dashboard, because the two measure different things:\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Monthly allowance:\"\n }), \" counts AI model calls from all your runs in the calendar month, including runs that don’t go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"This endpoint:\"\n }), \" counts AI steps of SDK sessions only, unweighted, over the last \", _jsx(_components.code, {\n children: \"days\"\n }), \" days. A session counts in the window it started in.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\"\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Get SDK session usage","description":"Retrieve how many AI steps your organisation's SDK sessions used over the last `days` days, grouped by the test ID each session was started with. These are the numbers the **Usage by test** table on the usage dashboard shows.\n\nEach session's steps are counted from its step log:\n\n- An **AI step** is a step the AI model had to decide.\n- A **cached step** was replayed from the cache instead.\n- Steps your own code performed are free and count as neither.\n\nThe cache hit rate is `cachedSteps / (cachedSteps + aiSteps)`, as a percentage.\n\nA test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test's ID. Sessions started without a test ID share one row, with `testId` set to `null`.\n\nBy default, sessions started with any of your API keys are included. Pass `apiKeyId` to see only the sessions one key started.\n\nAny API key of your organisation can call this endpoint, including read-only `audit` keys. The organisation is taken from the API key. Results can be up to one minute old.\n\nThese numbers won't add up to the monthly allowance on the usage dashboard, because the two measure different things:\n\n- **Monthly allowance:** counts AI model calls from all your runs in the calendar month, including runs that don't go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan.\n- **This endpoint:** counts AI steps of SDK sessions only, unweighted, over the last `days` days. A session counts in the window it started in.\n\nAn AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.","deprecated":null,"version":null,"openapi":"/openapi.json get /usage/sdk-sessions","href":"/api-reference/get-sdk-session-usage","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Get SDK session usage","description":"Retrieve how many AI steps your organisation's SDK sessions used over the last `days` days, grouped by the test ID each session was started with. These are the numbers the **Usage by test** table on the usage dashboard shows.\n\nEach session's steps are counted from its step log:\n\n- An **AI step** is a step the AI model had to decide.\n- A **cached step** was replayed from the cache instead.\n- Steps your own code performed are free and count as neither.\n\nThe cache hit rate is `cachedSteps / (cachedSteps + aiSteps)`, as a percentage.\n\nA test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test's ID. Sessions started without a test ID share one row, with `testId` set to `null`.\n\nBy default, sessions started with any of your API keys are included. Pass `apiKeyId` to see only the sessions one key started.\n\nAny API key of your organisation can call this endpoint, including read-only `audit` keys. The organisation is taken from the API key. Results can be up to one minute old.\n\nThese numbers won't add up to the monthly allowance on the usage dashboard, because the two measure different things:\n\n- **Monthly allowance:** counts AI model calls from all your runs in the calendar month, including runs that don't go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan.\n- **This endpoint:** counts AI steps of SDK sessions only, unweighted, over the last `days` days. A session counts in the window it started in.\n\nAn AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.","operationId":"get_sdk_session_usage","parameters":["bef2740d-6404-471f-9899-d989d7d11617","2510e7d4-6b6d-4ea8-a855-19e61c8b0179"],"responses":{"200":"71a62861-bc71-4d1c-8709-1f7516a86d57","401":"bb4a186a-4383-4b27-b249-930c7177ba1c","422":"3a1e7705-b19d-4905-9bd6-670b1264757c"},"method":"get","type":"path","servers":["31979921-3f5d-458f-a621-e5d47d63d435"],"security":["a850a53c-b5e8-41a3-aa4e-562819e828db"],"path":"/usage/sdk-sessions","baseUrlOptions":["https://api.mobileboost.io"],"title":"Get SDK session usage","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"bef2740d-6404-471f-9899-d989d7d11617":{"required":false,"schema":{"title":"Days","type":"integer","default":30,"minimum":1,"maximum":90,"isRequired":false,"description":"How many days to look back from now (1-90).","uniqueKey":"","typeLabel":"integer"},"name":"days","in":"query","description":"How many days to look back from now (1-90)."},"2510e7d4-6b6d-4ea8-a855-19e61c8b0179":{"required":false,"schema":{"title":"API key ID","type":"string","example":"AbCdEfGhIjK","isRequired":false,"description":"Only include sessions started with this API key. Use the key ID: the part of the key's prefix after `mb_live_`, for example `AbCdEfGhIjK` for a key starting `mb_live_AbCdEfGhIjK`. Use `legacy` for keys MobileBoost issued to you directly, or `unattributed` for sessions from before MobileBoost recorded which key started a session. Omit it to include every session.","uniqueKey":"","typeLabel":"string"},"name":"apiKeyId","in":"query","description":"Only include sessions started with this API key. Use the key ID: the part of the key's prefix after `mb_live_`, for example `AbCdEfGhIjK` for a key starting `mb_live_AbCdEfGhIjK`. Use `legacy` for keys MobileBoost issued to you directly, or `unattributed` for sessions from before MobileBoost recorded which key started a session. Omit it to include every session."}},"responses":{"71a62861-bc71-4d1c-8709-1f7516a86d57":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"window":{"type":"object","description":"The time window the numbers cover.","properties":{"days":{"type":"integer","description":"The `days` value used.","uniqueKey":"window.days","typeLabel":"integer"},"start":{"type":"string","format":"date-time","description":"Start of the window (UTC).","uniqueKey":"window.start","typeLabel":"string\u003cdate-time>"},"end":{"type":"string","format":"date-time","description":"End of the window (UTC).","uniqueKey":"window.end","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"window","typeLabel":"object"},"apiKeyId":{"oneOf":[{"type":"string","description":"The `apiKeyId` filter applied, or `null` when sessions from all keys are included.","uniqueKey":"apiKeyId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The `apiKeyId` filter applied, or `null` when sessions from all keys are included.","uniqueKey":"apiKeyId.oneOf.1","typeLabel":"null"}],"uniqueKey":"apiKeyId","typeLabel":"string | null"},"truncated":{"type":"boolean","description":"`true` when more than 30,000 sessions fall in the window. Only the newest 30,000 are counted.","uniqueKey":"truncated","typeLabel":"boolean"},"totals":{"type":"object","description":"Totals across every session counted.","properties":{"runs":{"type":"integer","description":"Number of sessions.","uniqueKey":"totals.runs","typeLabel":"integer"},"failedRuns":{"type":"integer","description":"Number of sessions that failed.","uniqueKey":"totals.failedRuns","typeLabel":"integer"},"aiSteps":{"type":"integer","description":"AI steps across all sessions.","uniqueKey":"totals.aiSteps","typeLabel":"integer"},"cachedSteps":{"type":"integer","description":"Steps replayed from the cache across all sessions.","uniqueKey":"totals.cachedSteps","typeLabel":"integer"},"cacheHitRate":{"oneOf":[{"type":"number","description":"Percentage (0-100) of cacheable steps served from the cache. `null` when no step was cacheable.","uniqueKey":"totals.cacheHitRate.oneOf.0","typeLabel":"number"},{"type":"null","description":"Percentage (0-100) of cacheable steps served from the cache. `null` when no step was cacheable.","uniqueKey":"totals.cacheHitRate.oneOf.1","typeLabel":"null"}],"uniqueKey":"totals.cacheHitRate","typeLabel":"number | null"}},"uniqueKey":"totals","typeLabel":"object"},"byTestId":{"type":"array","items":{"type":"object","description":"Usage of the sessions started with one test ID.","properties":{"testId":{"oneOf":[{"type":"string","description":"The test ID the sessions were started with. `null` for sessions started without one.","uniqueKey":"byTestId.items.[INDEX].testId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The test ID the sessions were started with. `null` for sessions started without one.","uniqueKey":"byTestId.items.[INDEX].testId.oneOf.1","typeLabel":"null"}],"uniqueKey":"byTestId.items.[INDEX].testId","typeLabel":"string | null"},"runs":{"type":"integer","description":"Number of sessions with this test ID.","uniqueKey":"byTestId.items.[INDEX].runs","typeLabel":"integer"},"failedRuns":{"type":"integer","description":"Number of those sessions that failed.","uniqueKey":"byTestId.items.[INDEX].failedRuns","typeLabel":"integer"},"aiSteps":{"type":"integer","description":"AI steps across those sessions.","uniqueKey":"byTestId.items.[INDEX].aiSteps","typeLabel":"integer"},"cachedSteps":{"type":"integer","description":"Steps replayed from the cache. Use it with `aiSteps` to combine rows, since cache hit rates can't be averaged.","uniqueKey":"byTestId.items.[INDEX].cachedSteps","typeLabel":"integer"},"avgAiSteps":{"type":"number","description":"Average AI steps per session.","uniqueKey":"byTestId.items.[INDEX].avgAiSteps","typeLabel":"number"},"cacheHitRate":{"oneOf":[{"type":"number","description":"Percentage (0-100) of cacheable steps served from the cache. `null` when no step was cacheable.","uniqueKey":"byTestId.items.[INDEX].cacheHitRate.oneOf.0","typeLabel":"number"},{"type":"null","description":"Percentage (0-100) of cacheable steps served from the cache. `null` when no step was cacheable.","uniqueKey":"byTestId.items.[INDEX].cacheHitRate.oneOf.1","typeLabel":"null"}],"uniqueKey":"byTestId.items.[INDEX].cacheHitRate","typeLabel":"number | null"},"avgRuntimeSeconds":{"oneOf":[{"type":"number","description":"Average session duration in seconds, ignoring durations of an hour or more. `null` when no session had a usable duration.","uniqueKey":"byTestId.items.[INDEX].avgRuntimeSeconds.oneOf.0","typeLabel":"number"},{"type":"null","description":"Average session duration in seconds, ignoring durations of an hour or more. `null` when no session had a usable duration.","uniqueKey":"byTestId.items.[INDEX].avgRuntimeSeconds.oneOf.1","typeLabel":"null"}],"uniqueKey":"byTestId.items.[INDEX].avgRuntimeSeconds","typeLabel":"number | null"}},"uniqueKey":"byTestId.items.[INDEX]","typeLabel":"object"},"description":"One row per test ID, ordered by `aiSteps`, highest first.","uniqueKey":"byTestId","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"window":{"days":30,"start":"2026-08-24T09:00:00Z","end":"2026-09-23T09:00:00Z"},"apiKeyId":null,"truncated":false,"totals":{"runs":47,"failedRuns":3,"aiSteps":1470,"cachedSteps":2940,"cacheHitRate":66.67},"byTestId":[{"testId":"checkout-flow","runs":42,"failedRuns":3,"aiSteps":1260,"cachedSteps":2940,"avgAiSteps":30,"cacheHitRate":70,"avgRuntimeSeconds":184.6},{"testId":null,"runs":5,"failedRuns":0,"aiSteps":210,"cachedSteps":0,"avgAiSteps":42,"cacheHitRate":0,"avgRuntimeSeconds":96.2}]},"examples":{"Example":{"title":"Example","value":{"window":{"days":30,"start":"2026-08-24T09:00:00Z","end":"2026-09-23T09:00:00Z"},"apiKeyId":null,"truncated":false,"totals":{"runs":47,"failedRuns":3,"aiSteps":1470,"cachedSteps":2940,"cacheHitRate":66.67},"byTestId":[{"testId":"checkout-flow","runs":42,"failedRuns":3,"aiSteps":1260,"cachedSteps":2940,"avgAiSteps":30,"cacheHitRate":70,"avgRuntimeSeconds":184.6},{"testId":null,"runs":5,"failedRuns":0,"aiSteps":210,"cachedSteps":0,"avgAiSteps":42,"cacheHitRate":0,"avgRuntimeSeconds":96.2}]}}},"exampleType":"examples"}},"exampleType":"examples"},"bb4a186a-4383-4b27-b249-930c7177ba1c":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"detail":"Invalid API key"},"examples":{"Example":{"title":"Example","value":{"detail":"Invalid API key"}}},"exampleType":"examples"}},"exampleType":"examples"},"3a1e7705-b19d-4905-9bd6-670b1264757c":{"description":"A query parameter is invalid, for example `days` outside 1-90.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"a850a53c-b5e8-41a3-aa4e-562819e828db":{"BearerAuth":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"31979921-3f5d-458f-a621-e5d47d63d435":{"url":"https://api.mobileboost.io"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"mobileboost-321ad6a9","siteName":"MobileBoost","title":"Get SDK session usage - MobileBoost","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-07T21:00:15.318Z","originalFileLocation":"api-reference/get-sdk-session-usage.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=\"Retrieve how many AI steps your organisation\u0026#x27;s SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows. Each session\u0026#x27;s steps are counted from its step log: - An AI step is a step the AI model had to decide. - A cached step was replayed from the cache instead. - Steps your own code performed are free and count as neither. The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage. A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test\u0026#x27;s ID. Sessions started without a test ID share one row, with testId set to null. By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started. Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old. These numbers won\u0026#x27;t add up to the monthly allowance on the usage dashboard, because the two measure different things: - Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don\u0026#x27;t go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan. - This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in. An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MobileBoost\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get SDK session usage - MobileBoost\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieve how many AI steps your organisation\u0026#x27;s SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows. Each session\u0026#x27;s steps are counted from its step log: - An AI step is a step the AI model had to decide. - A cached step was replayed from the cache instead. - Steps your own code performed are free and count as neither. The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage. A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test\u0026#x27;s ID. Sessions started without a test ID share one row, with testId set to null. By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started. Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old. These numbers won\u0026#x27;t add up to the monthly allowance on the usage dashboard, because the two measure different things: - Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don\u0026#x27;t go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan. - This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in. An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MobileBoost\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mobileboost-321ad6a9.mintlify.site/_mintlify/api/og/v2?division=Usage\u0026amp;title=Get+SDK+session+usage\u0026amp;description=Retrieve+how+many+AI+steps+your+organisation%27s+SDK+sessions+used+over+the+last+%60days%60+days%2C+grouped+by+the+test+ID+each+session+was+started+with.+These+are+the+\u0026amp;theme=62e36e17279e54a177c18a56\u0026amp;signature=d0bb99c90c3639af081699fdb12268934905b8cae55272b0b3f2ef18c376fa2a\">\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=\"Get SDK session usage - MobileBoost\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieve how many AI steps your organisation\u0026#x27;s SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows. Each session\u0026#x27;s steps are counted from its step log: - An AI step is a step the AI model had to decide. - A cached step was replayed from the cache instead. - Steps your own code performed are free and count as neither. The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage. A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test\u0026#x27;s ID. Sessions started without a test ID share one row, with testId set to null. By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started. Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old. These numbers won\u0026#x27;t add up to the monthly allowance on the usage dashboard, because the two measure different things: - Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don\u0026#x27;t go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan. - This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in. An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mobileboost-321ad6a9.mintlify.site/_mintlify/api/og/v2?division=Usage\u0026amp;title=Get+SDK+session+usage\u0026amp;description=Retrieve+how+many+AI+steps+your+organisation%27s+SDK+sessions+used+over+the+last+%60days%60+days%2C+grouped+by+the+test+ID+each+session+was+started+with.+These+are+the+\u0026amp;theme=62e36e17279e54a177c18a56\u0026amp;signature=d0bb99c90c3639af081699fdb12268934905b8cae55272b0b3f2ef18c376fa2a\">\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/mobileboost-321ad6a9/OkIIS1ivp_fMe1gq/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MobileBoost\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/get-sdk-session-usage.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mobileboost.io/#organization\",\"name\":\"MobileBoost\",\"url\":\"https://docs.mobileboost.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mobileboost-321ad6a9/OGuA69W71_lGnu9x/logo/light.png?fit=max\u0026auto=format\u0026n=OGuA69W71_lGnu9x\u0026q=85\u0026s=b6a6cc5ef5708fb7e589eb22c4e758e5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mobileboost.io#website\",\"name\":\"MobileBoost\",\"url\":\"https://docs.mobileboost.io\",\"publisher\":{\"@id\":\"https://docs.mobileboost.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage#webpage\",\"url\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage\",\"name\":\"Get SDK session usage\",\"description\":\"Retrieve how many AI steps your organisation's SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows. Each session's steps are counted from its step log: - An AI step is a step the AI model had to decide. - A cached step was replayed from the cache instead. - Steps your own code performed are free and count as neither. The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage. A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test's ID. Sessions started without a test ID share one row, with testId set to null. By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started. Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old. These numbers won't add up to the monthly allowance on the usage dashboard, because the two measure different things: - Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don't go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan. - This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in. An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\",\"dateModified\":\"2026-10-07T21:00:15.318Z\",\"isPartOf\":{\"@id\":\"https://docs.mobileboost.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"MobileBoost\",\"item\":\"https://docs.mobileboost.io\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get SDK session usage\",\"item\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage#apireference\",\"headline\":\"Get SDK session usage\",\"name\":\"Get SDK session usage\",\"description\":\"Retrieve how many AI steps your organisation's SDK sessions used over the last days days, grouped by the test ID each session was started with. These are the numbers the Usage by test table on the usage dashboard shows. Each session's steps are counted from its step log: - An AI step is a step the AI model had to decide. - A cached step was replayed from the cache instead. - Steps your own code performed are free and count as neither. The cache hit rate is cachedSteps / (cachedSteps + aiSteps), as a percentage. A test ID is the value your SDK passed when it started the session, returned exactly as it was recorded. Sessions started by a MobileBoost Platform test run carry that test's ID. Sessions started without a test ID share one row, with testId set to null. By default, sessions started with any of your API keys are included. Pass apiKeyId to see only the sessions one key started. Any API key of your organisation can call this endpoint, including read-only audit keys. The organisation is taken from the API key. Results can be up to one minute old. These numbers won't add up to the monthly allowance on the usage dashboard, because the two measure different things: - Monthly allowance: counts AI model calls from all your runs in the calendar month, including runs that don't go through an SDK session. Vision and non-vision calls are weighted by the step factors in your plan. - This endpoint: counts AI steps of SDK sessions only, unweighted, over the last days days. A session counts in the window it started in. An AI step usually takes one model call, but not always, so even for SDK sessions alone the two can differ.\",\"url\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mobileboost.io/api-reference/get-sdk-session-usage#webpage\"},\"dateModified\":\"2026-10-07T21:00:15.318Z\",\"publisher\":{\"@id\":\"https://docs.mobileboost.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mobileboost.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MobileBoost\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MobileBoost","nav":{"global":null,"tabs":[{"tab":"Test Agent","icon":"robot","pages":[{"title":"Test Agent","href":"/test-agent/overview"}]},{"tab":"Local Tooling","icon":"code","pages":[{"title":"Local Tooling","href":"/engineer-tooling/overview"}]},{"tab":"QA Studio","icon":"flask-vial","pages":[{"title":"QA Studio","href":"/qa-studio/build-requirements"}]},{"tab":"API","icon":"square-terminal","groups":[{"group":"Getting started","pages":[{"title":"Getting started","href":"/api/getting-started"},{"title":"Folders","href":"/api/folders"}]},{"group":"Tests","pages":[{"title":"Create test","deprecated":null,"version":null,"openapi":"/openapi.json post /tests","href":"/api-reference/create-test"},{"title":"Get tests","deprecated":null,"version":null,"openapi":"/openapi.json get /tests","href":"/api-reference/get-tests"},{"title":"Update test","deprecated":null,"version":null,"openapi":"/openapi.json patch /tests","href":"/api-reference/update-test"},{"title":"Delete test","deprecated":null,"version":null,"openapi":"/openapi.json delete /tests","href":"/api-reference/delete-test"},{"title":"Execute tests","deprecated":null,"version":null,"openapi":"/openapi.json post /tests/execute","href":"/api-reference/execute-tests"},{"title":"Generate test automation","deprecated":null,"version":null,"openapi":"/openapi.json post /tests/generate","href":"/api-reference/generate-test-automation"}]},{"group":"Folders","pages":[{"title":"List folders","deprecated":null,"version":null,"openapi":"/openapi.json get /tests/folders","href":"/api-reference/list-folders"},{"title":"Create folder","deprecated":null,"version":null,"openapi":"/openapi.json post /tests/folders","href":"/api-reference/create-folder"},{"title":"Rename or move folder","deprecated":null,"version":null,"openapi":"/openapi.json patch /tests/folders","href":"/api-reference/rename-or-move-folder"},{"title":"Delete folder","deprecated":null,"version":null,"openapi":"/openapi.json delete /tests/folders","href":"/api-reference/delete-folder"},{"title":"Move tests into a folder","deprecated":null,"version":null,"openapi":"/openapi.json post /tests/folders/move","href":"/api-reference/move-tests-into-a-folder"}]},{"group":"Runs","pages":[{"title":"Get run status","deprecated":null,"version":null,"openapi":"/openapi.json get /runs/{runId}","href":"/api-reference/get-run-status"}]},{"group":"Builds","pages":[{"title":"Upload build","deprecated":null,"version":null,"openapi":"/openapi.json post /uploadBuild","href":"/api-reference/upload-build"}]},{"group":"Native Runners","pages":[{"title":"XCUITest","href":"/api/xcui-packaging"},{"title":"Espresso","href":"/api/espresso-packaging"}]},{"group":"Audit","pages":[{"title":"List audit logs","description":"Retrieve your organisation’s audit log events as a paginated, cursor-based stream. This endpoint is intended for SIEM ingestion, such as a Splunk REST or modular input. Poll with `since=\u003cnext_cursor>` from the previous response to fetch only new events.\n\nAudit logging must be enabled for your organisation. If audit logging is not enabled, the endpoint returns `403`. The organisation is derived from the API key which can be created in your organisations account.\n\nSet the `Accept` header to `application/x-ndjson` to receive newline-delimited JSON instead of a single JSON object. In this mode, the next cursor is returned in the `X-Next-Cursor` response header rather than in a response field.","deprecated":null,"version":null,"openapi":"/openapi.json get /audit/logs","href":"/api-reference/list-audit-logs"}]},{"group":"Usage","pages":[{"title":"Get SDK session usage","deprecated":null,"version":null,"openapi":"/openapi.json get /usage/sdk-sessions","href":"/api-reference/get-sdk-session-usage"}]}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Get SDK session usage - MobileBoost","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js","Markdown-D7Ofw1oz.js","clsx-eKJ4rcii.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CwjSCXIK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-9EK5IAXV.js"]}