{
"error": "Invalid usage query: `start` must be within the last 90 days."
}
{
"error": "Invalid API key. Check the key, or create one at https://app.relace.ai."
}
{
"error": "Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits."
}
{
"error": "Usage is unavailable; retry shortly."
}
Your organization’s token usage and cost over a time window, along with its credit balance, API keys and spend caps. Any API key in the organization can call it, and the report always covers the whole organization behind that key.
start and end take RFC 3339 timestamps with a time zone, such as 2026-11-01T00:00:00Z. Both are rounded down to the hour, so usage is reported in whole hours and the current hour appears once it ends.
With neither set, the report covers the last 7 days.
start can go back at most 90 days.
end cannot be in the future.
The usage.start and usage.end fields in the response show the window after defaults and rounding.
Buckets
bucket splits the window into day, week or month buckets, all in UTC. Weeks start on Monday and months start on the 1st. The first and last buckets are cut to the window, so a window from Wednesday to the following Wednesday returns two week buckets: Wednesday to Monday, then Monday to Wednesday.Every bucket in the window is returned, including buckets with no usage, which have an empty results list.
Grouping
group_by sets what each bucket’s results are split by:
group_by
One result per
model (default)
model
api_key
API key
model,api_key
model and API key pair
empty (group_by=)
bucket
Per-key usage is only available from December 2, 2026 onward. Usage before that date is not attributed to any key: with group_by=api_key or group_by=model,api_key, it appears under api_key_id: null. To see usage per key, set start to 2026-12-02T00:00:00Z or later.
api_key_id matches an entry in keys, so you can look up a key’s name. It is null for usage before December 2, 2026, and for usage from the Relace console.totals covers the whole window and is the same whatever bucket and group_by you choose.
Tokens and cost
input_tokens counts all input tokens, cached ones included. cached_input_tokens is the part served from the prefix cache.
Money fields are US dollars as decimal strings with 9 decimal places, such as "0.710000000". Parse them as decimals, not floats, to avoid rounding errors.
Each result is rounded down to 9 decimal places on its own, so totals.cost_usd can be slightly higher than the sum of the results shown, by less than $0.000000001 per result.
Credits, keys and spend caps
credits.remaining_usd is the prepaid credit balance. credits is null for accounts billed by invoice.
keys lists every API key in the organization, newest first, including revoked keys with their revoked_at time.
spend_caps lists the organization’s daily, weekly and monthly spend caps with the current period’s spend. capped_until is set while a cap is blocking requests.
This endpoint keeps working when the organization is out of credits or over a spend cap, so you can always check where you stand.
Rate limits
Usage calls have their own budget of 60 requests per minute per organization, shared by all of the organization’s keys. They do not count against your model request rate limit. Over the limit, you’ll receive a 429 with a Retry-After header.If the usage service is briefly unavailable, you’ll receive a 503 with a Retry-After header and can retry after that interval. A report is never returned partially.
Authorizations
Authorization
string
header
required
Relace API key Authorization header using the Bearer scheme.
Query Parameters
start
string<date-time>
Start of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must be within the last 90 days. Defaults to 7 days before end.
end
string<date-time>
End of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must not be in the future. Defaults to now.
bucket
enum<string>
default:day
Bucket size. Weeks start Monday 00:00 UTC. Months start on the 1st at 00:00 UTC.
Available options:
day,
week,
month
group_by
string
default:model
Comma-separated list of model and api_key. Pass an empty value (group_by=) for one result per bucket.
Response
The usage report
billing_mode
enum<string>
credit for prepaid credits, invoice for monthly invoicing.
Available options:
credit,
invoice
credits
object | null
Remaining prepaid credits. null for invoice accounts.
Show child attributes
usage
object
Show child attributes
keys
object[]
Every API key of the organization, revoked keys included, newest first.
Show child attributes
spend_caps
object[]
The organization's spend caps, daily first. Empty when none are set.
Show child attributes
as_of
string<date-time>
When this report was built.
Example:
"2026-12-03T00:51:12.000Z"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Relace","colors":{"primary":"#0066FF","light":"#4D94FF","dark":"#0047B3"},"logo":{"light":"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/light.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=8fb6212c3f7e36d063d878a98d7cff90","dark":"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/dark.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=978d07312f6ac13f58c22aaa151579ea","href":"https://relace.ai"},"favicon":"https://mintcdn.com/relace/s7F5Z9LGe0g03FCB/favicon.svg?fit=max\u0026auto=format\u0026n=s7F5Z9LGe0g03FCB\u0026q=85\u0026s=b1aef1a2a6e6df815b78fc4d767560ef","navbar":{"links":[{"href":"mailto:info@relace.ai","label":"Support"}],"primary":{"type":"button","label":"Playground","href":"https://app.relace.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/relace-ai"}},"integrations":{"posthog":{"apiKey":"phc_guqCHgvq8r5z5YETZZ5q6394qFrzl7M7W516jUCklUq","sessionRecording":true}},"contextual":{"options":["copy"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"relace","hasAudioNarration":false,"actualSubdomain":"relace","customDomains":["docs.relace.ai"],"gitSource":{"type":"github","owner":"squack-io","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b10aebf9ffae5051c3fdd8b"},"feedback":{"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b11eefd7e2065ba344d8356","clientVersion":"0.0.4448","searchFilterCounts":[{"language":"default","tag":"API Reference","count":9},{"language":"default","tag":"Documentation","count":8},{"language":"default","tag":"Model Guides","count":5},{"language":"default","tag":"Open Models","count":4},{"language":"default","tag":"Relace Models","count":3},{"language":"default","tag":"Instant Apply","count":3},{"language":"default","tag":"General","count":2},{"language":"default","tag":"Agents","count":2},{"language":"default","tag":"Fast Agentic Search","count":2},{"language":"default","tag":"Guides","count":2}]},"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},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/account/usage","slug":"/api-reference/account/usage","pageMetadata":{"title":"Usage","openapi":"GET /v1/usage","description":"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.","href":"/api-reference/account/usage"},"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: \"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._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(_components.p,{children:`Your organization’s token usage and cost over a time window, along with its credit balance, API keys and spend caps. Any API key in the organization can call it, and the report always covers the whole organization behind that key.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://models.relace.ai/v1/usage?bucket=week\u0026group_by=model,api_key\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$RELACE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`time-window`,children:`Time window`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`start`}),` and `,_jsx(_components.code,{children:`end`}),` take RFC 3339 timestamps with a time zone, such as `,_jsx(_components.code,{children:`2026-11-01T00:00:00Z`}),`. Both are rounded down to the hour, so usage is reported in whole hours and the current hour appears once it ends.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`With neither set, the report covers the last 7 days.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`start`}),` can go back at most 90 days.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`end`}),` cannot be in the future.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`usage.start`}),` and `,_jsx(_components.code,{children:`usage.end`}),` fields in the response show the window after defaults and rounding.`]}),`\n`,_jsx(Heading,{level:`2`,id:`buckets`,children:`Buckets`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`bucket`}),` splits the window into `,_jsx(_components.code,{children:`day`}),`, `,_jsx(_components.code,{children:`week`}),` or `,_jsx(_components.code,{children:`month`}),` buckets, all in UTC. Weeks start on Monday and months start on the 1st. The first and last buckets are cut to the window, so a window from Wednesday to the following Wednesday returns two week buckets: Wednesday to Monday, then Monday to Wednesday.`]}),`\n`,_jsxs(_components.p,{children:[`Every bucket in the window is returned, including buckets with no usage, which have an empty `,_jsx(_components.code,{children:`results`}),` list.`]}),`\n`,_jsx(Heading,{level:`2`,id:`grouping`,children:`Grouping`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`group_by`}),` sets what each bucket’s `,_jsx(_components.code,{children:`results`}),` are split by:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`group_by`})}),_jsx(_components.th,{children:`One result per`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`model`}),` (default)`]}),_jsx(_components.td,{children:`model`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsx(_components.td,{children:`API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model,api_key`})}),_jsx(_components.td,{children:`model and API key pair`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`empty (`,_jsx(_components.code,{children:`group_by=`}),`)`]}),_jsx(_components.td,{children:`bucket`})]})]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Per-key usage is only available from December 2, 2026 onward. Usage before that date is not attributed to any key: with `,_jsx(_components.code,{children:`group_by=api_key`}),` or `,_jsx(_components.code,{children:`group_by=model,api_key`}),`, it appears under `,_jsx(_components.code,{children:`api_key_id: null`}),`. To see usage per key, set `,_jsx(_components.code,{children:`start`}),` to `,_jsx(_components.code,{children:`2026-12-02T00:00:00Z`}),` or later.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`api_key_id`}),` matches an entry in `,_jsx(_components.code,{children:`keys`}),`, so you can look up a key’s name. It is `,_jsx(_components.code,{children:`null`}),` for usage before December 2, 2026, and for usage from the Relace console.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`totals`}),` covers the whole window and is the same whatever `,_jsx(_components.code,{children:`bucket`}),` and `,_jsx(_components.code,{children:`group_by`}),` you choose.`]}),`\n`,_jsx(Heading,{level:`2`,id:`tokens-and-cost`,children:`Tokens and cost`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`input_tokens`}),` counts all input tokens, cached ones included. `,_jsx(_components.code,{children:`cached_input_tokens`}),` is the part served from the prefix cache.`]}),`\n`,_jsxs(_components.li,{children:[`Money fields are US dollars as decimal strings with 9 decimal places, such as `,_jsx(_components.code,{children:`\"0.710000000\"`}),`. Parse them as decimals, not floats, to avoid rounding errors.`]}),`\n`,_jsxs(_components.li,{children:[`Each result is rounded down to 9 decimal places on its own, so `,_jsx(_components.code,{children:`totals.cost_usd`}),` can be slightly higher than the sum of the results shown, by less than $0.000000001 per result.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`credits-keys-and-spend-caps`,children:`Credits, keys and spend caps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`credits.remaining_usd`}),` is the prepaid credit balance. `,_jsx(_components.code,{children:`credits`}),` is `,_jsx(_components.code,{children:`null`}),` for accounts billed by invoice.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`keys`}),` lists every API key in the organization, newest first, including revoked keys with their `,_jsx(_components.code,{children:`revoked_at`}),` time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`spend_caps`}),` lists the organization’s daily, weekly and monthly spend caps with the current period’s spend. `,_jsx(_components.code,{children:`capped_until`}),` is set while a cap is blocking requests.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This endpoint keeps working when the organization is out of credits or over a spend cap, so you can always check where you stand.`}),`\n`,_jsx(Heading,{level:`2`,id:`rate-limits`,children:`Rate limits`}),`\n`,_jsxs(_components.p,{children:[`Usage calls have their own budget of 60 requests per minute per organization, shared by all of the organization’s keys. They do not count against your model request rate limit. Over the limit, you’ll receive a `,_jsx(_components.code,{children:`429`}),` with a `,_jsx(_components.code,{children:`Retry-After`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[`If the usage service is briefly unavailable, you’ll receive a `,_jsx(_components.code,{children:`503`}),` with a `,_jsx(_components.code,{children:`Retry-After`}),` header and can retry after that interval. A report is never returned partially.`]})]})}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":"Usage","openapi":"GET /v1/usage","description":"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.","href":"/api-reference/account/usage"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Time window","slug":"time-window","depth":2,"children":[]},{"title":"Buckets","slug":"buckets","depth":2,"children":[]},{"title":"Grouping","slug":"grouping","depth":2,"children":[]},{"title":"Tokens and cost","slug":"tokens-and-cost","depth":2,"children":[]},{"title":"Credits, keys and spend caps","slug":"credits-keys-and-spend-caps","depth":2,"children":[]},{"title":"Rate limits","slug":"rate-limits","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.","servers":["ee2d9ec7-1385-4cee-9d10-7d4c7b8675f2"],"parameters":["bea81f92-dcbc-4905-9704-de82e1a28296","cddd5ba9-6484-400d-9159-9ffbe1de357d","d2a33575-3852-4931-93e7-a24263c13bfa","84cec368-82bb-4846-b378-ae723ab68aa1"],"responses":{"200":"241e43cb-1ecf-4d1d-a220-72f5423de167","400":"e27d16e7-1ac5-4779-b9bc-e355a9bd6cec","401":"f514f5db-4513-4597-89b1-c43f027be828","429":"b8fd3e19-3e99-4afd-92a5-a891794fda13","503":"1fe7689c-74a7-41d1-bfde-e5381e0eb882"},"method":"get","type":"path","security":["5efc6393-0061-44d5-9b9a-550a6d41739c"],"path":"/v1/usage","baseUrlOptions":["https://models.relace.ai"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"bea81f92-dcbc-4905-9704-de82e1a28296":{"name":"start","in":"query","required":false,"schema":{"type":"string","format":"date-time","isRequired":false,"description":"Start of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must be within the last 90 days. Defaults to 7 days before `end`.","uniqueKey":"","typeLabel":"string\u003cdate-time>"},"description":"Start of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must be within the last 90 days. Defaults to 7 days before `end`.","example":"2026-11-01T00:00:00Z"},"cddd5ba9-6484-400d-9159-9ffbe1de357d":{"name":"end","in":"query","required":false,"schema":{"type":"string","format":"date-time","isRequired":false,"description":"End of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must not be in the future. Defaults to now.","uniqueKey":"","typeLabel":"string\u003cdate-time>"},"description":"End of the window, as an RFC 3339 timestamp with a time zone. Rounded down to the hour. Must not be in the future. Defaults to now.","example":"2026-12-01T00:00:00Z"},"d2a33575-3852-4931-93e7-a24263c13bfa":{"name":"bucket","in":"query","required":false,"schema":{"type":"string","enum":["day","week","month"],"default":"day","isRequired":false,"description":"Bucket size. Weeks start Monday 00:00 UTC. Months start on the 1st at 00:00 UTC.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"description":"Bucket size. Weeks start Monday 00:00 UTC. Months start on the 1st at 00:00 UTC."},"84cec368-82bb-4846-b378-ae723ab68aa1":{"name":"group_by","in":"query","required":false,"schema":{"type":"string","default":"model","isRequired":false,"description":"Comma-separated list of `model` and `api_key`. Pass an empty value (`group_by=`) for one result per bucket.","uniqueKey":"","typeLabel":"string"},"description":"Comma-separated list of `model` and `api_key`. Pass an empty value (`group_by=`) for one result per bucket.","example":"model,api_key"}},"responses":{"241e43cb-1ecf-4d1d-a220-72f5423de167":{"description":"The usage report","content":{"application/json":{"schema":{"type":"object","properties":{"billing_mode":{"type":"string","enum":["credit","invoice"],"description":"`credit` for prepaid credits, `invoice` for monthly invoicing.","uniqueKey":"billing_mode","typeLabel":"enum\u003cstring>"},"credits":{"oneOf":[{"type":"object","description":"Remaining prepaid credits. `null` for invoice accounts.","properties":{"remaining_usd":{"type":"string","description":"Remaining credit balance in US dollars.","example":"12.345678901","uniqueKey":"credits.oneOf.0.remaining_usd","typeLabel":"string"}},"uniqueKey":"credits.oneOf.0","typeLabel":"object"},{"type":"null","description":"Remaining prepaid credits. `null` for invoice accounts.","properties":{"remaining_usd":{"type":"string","description":"Remaining credit balance in US dollars.","example":"12.345678901"}},"uniqueKey":"credits.oneOf.1","typeLabel":"null"}],"uniqueKey":"credits","typeLabel":"object | null"},"usage":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start of the window, after defaults and rounding.","example":"2026-11-26T00:00:00.000Z","uniqueKey":"usage.start","typeLabel":"string\u003cdate-time>"},"end":{"type":"string","format":"date-time","description":"End of the window, after defaults and rounding.","example":"2026-12-03T00:00:00.000Z","uniqueKey":"usage.end","typeLabel":"string\u003cdate-time>"},"bucket":{"type":"string","enum":["day","week","month"],"uniqueKey":"usage.bucket","typeLabel":"enum\u003cstring>"},"group_by":{"type":"array","items":{"type":"string","enum":["model","api_key"],"uniqueKey":"usage.group_by.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"The grouping applied. Empty when results are not grouped.","example":["model","api_key"],"uniqueKey":"usage.group_by","typeLabel":"enum\u003cstring>[]"},"totals":{"type":"object","description":"Tokens and cost.","properties":{"input_tokens":{"type":"integer","description":"Input tokens, cached input tokens included.","example":50000,"uniqueKey":"usage.totals.input_tokens","typeLabel":"integer"},"cached_input_tokens":{"type":"integer","description":"The part of `input_tokens` served from the prefix cache.","example":1000,"uniqueKey":"usage.totals.cached_input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens.","example":4000,"uniqueKey":"usage.totals.output_tokens","typeLabel":"integer"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 9 decimal places, rounded down.","example":"0.710000000","uniqueKey":"usage.totals.cost_usd","typeLabel":"string"}},"uniqueKey":"usage.totals","typeLabel":"object"},"buckets":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"Start of the bucket, inclusive.","example":"2026-11-26T00:00:00.000Z","uniqueKey":"usage.buckets.items.[INDEX].start","typeLabel":"string\u003cdate-time>"},"end":{"type":"string","format":"date-time","description":"End of the bucket, exclusive.","example":"2026-11-27T00:00:00.000Z","uniqueKey":"usage.buckets.items.[INDEX].end","typeLabel":"string\u003cdate-time>"},"results":{"type":"array","description":"One entry per group with usage in the bucket, sorted by model and then by key id. Empty when the bucket has no usage.","items":{"type":"object","description":"Tokens and cost for one group in one bucket.","properties":{"model":{"type":"string","description":"The model. Present only when `group_by` includes `model`.","example":"relace-apply-3","uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].model","typeLabel":"string"},"api_key_id":{"oneOf":[{"type":"integer","description":"The API key's id, matching `keys[].id`. Present only when `group_by` includes `api_key`. `null` for usage before December 2, 2026, when per-key reporting began, and for usage from the Relace console.","example":42,"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].api_key_id.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The API key's id, matching `keys[].id`. Present only when `group_by` includes `api_key`. `null` for usage before December 2, 2026, when per-key reporting began, and for usage from the Relace console.","example":42,"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].api_key_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].api_key_id","typeLabel":"integer | null"},"input_tokens":{"type":"integer","description":"Input tokens, cached input tokens included.","example":50000,"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].input_tokens","typeLabel":"integer"},"cached_input_tokens":{"type":"integer","description":"The part of `input_tokens` served from the prefix cache.","example":1000,"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].cached_input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","description":"Output tokens.","example":4000,"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].output_tokens","typeLabel":"integer"},"cost_usd":{"type":"string","description":"US dollars as a decimal string with 9 decimal places, rounded down.","example":"0.710000000","uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX].cost_usd","typeLabel":"string"}},"uniqueKey":"usage.buckets.items.[INDEX].results.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usage.buckets.items.[INDEX].results","typeLabel":"object[]"}},"uniqueKey":"usage.buckets.items.[INDEX]","typeLabel":"object"},"uniqueKey":"usage.buckets","typeLabel":"object[]"}},"uniqueKey":"usage","typeLabel":"object"},"keys":{"type":"array","description":"Every API key of the organization, revoked keys included, newest first.","items":{"type":"object","properties":{"id":{"type":"integer","example":42,"uniqueKey":"keys.items.[INDEX].id","typeLabel":"integer"},"name":{"oneOf":[{"type":"string","example":"ci","uniqueKey":"keys.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","example":"ci","uniqueKey":"keys.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"keys.items.[INDEX].name","typeLabel":"string | null"},"redacted_key":{"oneOf":[{"type":"string","description":"The first 6 and last 4 characters of the key.","example":"rlc-ab...wxyz","uniqueKey":"keys.items.[INDEX].redacted_key.oneOf.0","typeLabel":"string"},{"type":"null","description":"The first 6 and last 4 characters of the key.","example":"rlc-ab...wxyz","uniqueKey":"keys.items.[INDEX].redacted_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"keys.items.[INDEX].redacted_key","typeLabel":"string | null"},"is_service":{"type":"boolean","description":"`true` for an organization service key, `false` for a personal key.","example":false,"uniqueKey":"keys.items.[INDEX].is_service","typeLabel":"boolean"},"created_at":{"type":"string","format":"date-time","example":"2026-10-14T18:22:05.000Z","uniqueKey":"keys.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"last_used":{"oneOf":[{"type":"string","format":"date-time","example":"2026-12-02T23:58:41.000Z","uniqueKey":"keys.items.[INDEX].last_used.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","example":"2026-12-02T23:58:41.000Z","uniqueKey":"keys.items.[INDEX].last_used.oneOf.1","typeLabel":"null"}],"uniqueKey":"keys.items.[INDEX].last_used","typeLabel":"string\u003cdate-time> | null"},"revoked_at":{"oneOf":[{"type":"string","format":"date-time","description":"When the key was revoked. `null` for an active key.","example":null,"uniqueKey":"keys.items.[INDEX].revoked_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"When the key was revoked. `null` for an active key.","example":null,"uniqueKey":"keys.items.[INDEX].revoked_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"keys.items.[INDEX].revoked_at","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"keys.items.[INDEX]","typeLabel":"object"},"uniqueKey":"keys","typeLabel":"object[]"},"spend_caps":{"type":"array","description":"The organization's spend caps, daily first. Empty when none are set.","items":{"type":"object","properties":{"period":{"type":"string","enum":["daily","weekly","monthly"],"uniqueKey":"spend_caps.items.[INDEX].period","typeLabel":"enum\u003cstring>"},"limit_usd":{"type":"string","description":"The cap, in US dollars.","example":"50.000000000","uniqueKey":"spend_caps.items.[INDEX].limit_usd","typeLabel":"string"},"spent_usd":{"type":"string","description":"Spend in the current period, in US dollars.","example":"3.200000000","uniqueKey":"spend_caps.items.[INDEX].spent_usd","typeLabel":"string"},"resets_at":{"type":"string","format":"date-time","description":"When the current period ends and spend resets.","example":"2026-12-04T00:00:00.000Z","uniqueKey":"spend_caps.items.[INDEX].resets_at","typeLabel":"string\u003cdate-time>"},"capped_until":{"oneOf":[{"type":"string","format":"date-time","description":"Set while the organization is blocked by this cap. Requests are refused until this time. `null` otherwise.","example":null,"uniqueKey":"spend_caps.items.[INDEX].capped_until.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Set while the organization is blocked by this cap. Requests are refused until this time. `null` otherwise.","example":null,"uniqueKey":"spend_caps.items.[INDEX].capped_until.oneOf.1","typeLabel":"null"}],"uniqueKey":"spend_caps.items.[INDEX].capped_until","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"spend_caps.items.[INDEX]","typeLabel":"object"},"uniqueKey":"spend_caps","typeLabel":"object[]"},"as_of":{"type":"string","format":"date-time","description":"When this report was built.","example":"2026-12-03T00:51:12.000Z","uniqueKey":"as_of","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"billing_mode":"credit","credits":{"remaining_usd":"12.345678901"},"usage":{"start":"2026-11-26T00:00:00.000Z","end":"2026-12-03T00:00:00.000Z","bucket":"day","group_by":["model","api_key"],"totals":{"input_tokens":50000,"cached_input_tokens":1000,"output_tokens":4000,"cost_usd":"0.710000000"},"buckets":[{"start":"2026-11-26T00:00:00.000Z","end":"2026-11-27T00:00:00.000Z","results":[{"model":"relace-apply-3","api_key_id":42,"input_tokens":50000,"cached_input_tokens":1000,"output_tokens":4000,"cost_usd":"0.710000000"}]}]},"keys":[{"id":42,"name":"ci","redacted_key":"rlc-ab...wxyz","is_service":false,"created_at":"2026-10-14T18:22:05.000Z","last_used":"2026-12-02T23:58:41.000Z","revoked_at":null}],"spend_caps":[{"period":"daily","limit_usd":"50.000000000","spent_usd":"3.200000000","resets_at":"2026-12-04T00:00:00.000Z","capped_until":null}],"as_of":"2026-12-03T00:51:12.000Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"e27d16e7-1ac5-4779-b9bc-e355a9bd6cec":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"Invalid usage query: `start` must be within the last 90 days.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid usage query: `start` must be within the last 90 days."}}},"exampleType":"generated"}},"exampleType":"generated"},"f514f5db-4513-4597-89b1-c43f027be828":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"Invalid API key. Check the key, or create one at https://app.relace.ai.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid API key. Check the key, or create one at https://app.relace.ai."}}},"exampleType":"generated"}},"exampleType":"generated"},"b8fd3e19-3e99-4afd-92a5-a891794fda13":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Rate limit exceeded. Retry after the Retry-After interval, or contact support to raise your limits."}}},"exampleType":"generated"}},"exampleType":"generated"},"1fe7689c-74a7-41d1-bfde-e5381e0eb882":{"description":"Usage is temporarily unavailable","headers":{"Retry-After":{"schema":{"type":"string"},"description":"Seconds to wait before retrying"}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"Usage is unavailable; retry shortly.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Usage is unavailable; retry shortly."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"5efc6393-0061-44d5-9b9a-550a6d41739c":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Relace API key Authorization header using the Bearer scheme.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"ee2d9ec7-1385-4cee-9d10-7d4c7b8675f2":{"url":"https://models.relace.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Relace API key Authorization header using the Bearer scheme.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Relace API key Authorization header using the Bearer scheme.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"relace","siteName":"Relace","title":"Usage - Relace","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-03T22:37:42.467Z","originalFileLocation":"api-reference/account/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=\"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Relace\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_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/relace/NSKygUkcOPJ0dXD5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Usage - Relace\">\u003cmeta data-mint-head property=\"og:description\" content=\"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Relace\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.relace.ai/api-reference/account/usage\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://relace.mintlify.site/_mintlify/api/og/v2?division=Account\u0026amp;title=Usage\u0026amp;description=Usage%2C+cost%2C+credit+balance%2C+API+keys+and+spend+caps+for+the+organization+that+owns+the+API+key.\u0026amp;theme=57c4eb56dcaa832310d126ad\u0026amp;signature=e91eb1f20144e605517cd0a9a307ecccdd918aa22eeff7cb1fe3e40122450587\">\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=\"Usage - Relace\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://relace.mintlify.site/_mintlify/api/og/v2?division=Account\u0026amp;title=Usage\u0026amp;description=Usage%2C+cost%2C+credit+balance%2C+API+keys+and+spend+caps+for+the+organization+that+owns+the+API+key.\u0026amp;theme=57c4eb56dcaa832310d126ad\u0026amp;signature=e91eb1f20144e605517cd0a9a307ecccdd918aa22eeff7cb1fe3e40122450587\">\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/relace/NSKygUkcOPJ0dXD5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Relace\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.relace.ai/api-reference/account/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/account/usage.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.relace.ai/#organization\",\"name\":\"Relace\",\"url\":\"https://docs.relace.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/relace/db9WpuNCcZDHVmZO/logo/light.svg?fit=max\u0026auto=format\u0026n=db9WpuNCcZDHVmZO\u0026q=85\u0026s=8fb6212c3f7e36d063d878a98d7cff90\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.relace.ai#website\",\"name\":\"Relace\",\"url\":\"https://docs.relace.ai\",\"publisher\":{\"@id\":\"https://docs.relace.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.relace.ai/api-reference/account/usage#webpage\",\"url\":\"https://docs.relace.ai/api-reference/account/usage\",\"name\":\"Usage\",\"description\":\"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\",\"dateModified\":\"2026-12-03T22:37:42.467Z\",\"isPartOf\":{\"@id\":\"https://docs.relace.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.relace.ai/api-reference/account/usage#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.relace.ai/api-reference/account/usage#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Relace\",\"item\":\"https://docs.relace.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Usage\",\"item\":\"https://docs.relace.ai/api-reference/account/usage\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.relace.ai/api-reference/account/usage#apireference\",\"headline\":\"Usage\",\"name\":\"Usage\",\"description\":\"Usage, cost, credit balance, API keys and spend caps for the organization that owns the API key.\",\"url\":\"https://docs.relace.ai/api-reference/account/usage\",\"mainEntityOfPage\":{\"@id\":\"https://docs.relace.ai/api-reference/account/usage#webpage\"},\"dateModified\":\"2026-12-03T22:37:42.467Z\",\"publisher\":{\"@id\":\"https://docs.relace.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.relace.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Relace\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Relace\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/account/usage.md","siteName":"Relace","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/docs/introduction"}]},{"anchor":"API Reference","icon":"square-terminal","groups":[{"group":"General","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"}]},{"group":"Relace Models","pages":[{"title":"Compact Trace","openapi":"POST /v1/code/compact","href":"/api-reference/compact/compact"},{"title":"Apply Code","openapi":"POST /v1/code/apply","href":"/api-reference/instant-apply/apply"},{"title":"Search Code","openapi":"POST /v1/search/chat/completions","href":"/api-reference/fast-agentic-search/search"}]},{"group":"Open Models","pages":[{"title":"Chat Completions","openapi":"POST /v1/chat/completions","href":"/api-reference/open-models/chat-completions"},{"title":"Messages","openapi":"POST /v1/messages","href":"/api-reference/open-models/messages"},{"title":"List Models","openapi":"GET /v1/models","description":"The catalog of models your account can call, with each model's current per-token prices, context limit and supported parameters. Prices change over time; poll this endpoint to track them. Entries are OpenAI model objects (`object: \"model\"`, `owned_by: \"relace\"`), so `client.models.list()` in any OpenAI SDK pointed at `https://models.relace.ai/v1` works.","href":"/api-reference/open-models/list-models"}]},{"group":"Account","pages":[{"title":"Usage","openapi":"GET /v1/usage","href":"/api-reference/account/usage"}]}]}]},"basePath":"","title":"Usage - Relace","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BD9G1WMi.js","snippetPresets-Bcqr8I2u.js","utils-BrYn4XiY.js","style-to-object-BY3JEAdk.js","utils-CYrCnchl.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CNFO66BS.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BneVo7uA.js","_Uint8Array-n4RvRzp3.js","isObject-FP1Yky1u.js","ApiExamples-C1YMsTjy.js","usePlaygroundInputsStore-DayW4kZ9.js","shallow-DDCzdKmR.js","isEqual-CBVoazy8.js","CodeSnippets-CWandYY5.js","CodeSnippet-grFP6YU_.js","use-playground-group-access-BBqHUxQK.js","Page-DBPN_x5x.js","api-description-markdown-1J-AA_Kv.js","DynamicMarkdown-Dgh_e4rL.js","SectionHeading-BP6Np9Uh.js","MethodPill-4k_Ty_Xv.js","getPastedJson-CWUNKLcr.js","Check2Icon-Cs4FQb2J.js","axios-CsQoIw0U.js","Markdown-CR8c2fXT.js","AssistantPageLink-BBR7elHb.js","dist-DjFwSv8l.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}