Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.
Check your selected model’s current prices, account balance, and applicable limits before making llm.sg requests.
Billing page locations, currencies, payment methods, pricing units, and charging rules still require product confirmation. Use the platform’s actual pricing and billing records.
Read token usage
Tokens measure the input and output processed by a model. They are not equivalent to words or characters.Compatible responses may include:
Field
Meaning
usage.prompt_tokens
Input token count
usage.completion_tokens
Output token count
usage.total_tokens
Total token count
Availability and detailed accounting depend on the model and endpoint. Reasoning, cached content, and multimodal input may have separate rules.
Estimate text generation cost
For a model priced separately by input and output tokens:
Estimated cost = input tokens × input price ÷ pricing unit + output tokens × output price ÷ pricing unit
If prices are listed per million tokens, use 1,000,000 as the pricing unit. Use current prices in the same currency. This estimate does not replace actual billing records.
Check your records
If the console provides usage or request history, compare the model ID, timestamp, request ID, token usage, and number of attempts against your application logs. Include the timezone when investigating differences.Keep costs predictable by evaluating small batches, trimming unnecessary conversation history, and using output limits supported by your model. Set bounded retries and check whether your SDK already retries automatically.A timeout can occur after the server starts processing. Another request may create additional usage. Failed, canceled, or interrupted request charges depend on the platform’s billing policy.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"llm.sg Docs","description":"User guides for the llm.sg model router platform.","colors":{"primary":"#171717","light":"#E5E5E5","dark":"#000000"},"logo":{"light":"https://mintcdn.com/llmsg/FOR_5jAu1HmGbX-_/logo/llmsg-light.svg?fit=max\u0026auto=format\u0026n=FOR_5jAu1HmGbX-_\u0026q=85\u0026s=c751c79771f51fd51f5c84a398e3dc89","dark":"https://mintcdn.com/llmsg/FOR_5jAu1HmGbX-_/logo/llmsg-dark.svg?fit=max\u0026auto=format\u0026n=FOR_5jAu1HmGbX-_\u0026q=85\u0026s=1cd393d360733c6ada6ee0b5c3cd250d","href":"https://llm.sg"},"favicon":"https://mintcdn.com/llmsg/s4Y_9-SsMFIEzcVu/logo/dashboard-favicon.svg?fit=max\u0026auto=format\u0026n=s4Y_9-SsMFIEzcVu\u0026q=85\u0026s=cd08bc776b90db68bc30f1f792ead380","appearance":{"strict":true},"navbar":{"links":[{"href":"https://llm.sg/dashboard","label":"Dashboard"}]},"footer":{"links":[{"header":"Legal","items":[{"label":"Privacy policy","href":"/en/docs/privacy-policy"},{"label":"Terms of service","href":"/en/docs/terms-of-service"}]}]},"fonts":{"family":"DM Sans"},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"https://llm.sg/dashboard","label":"Dashboard"}]},"href":"en/docs/overview"},{"language":"zh-Hans","footer":{"links":[{"header":"法律条款","items":[{"label":"隐私政策","href":"/zh-Hans/docs/privacy-policy"},{"label":"服务条款","href":"/zh-Hans/docs/terms-of-service"}]}]},"navbar":{"links":[{"href":"https://llm.sg/dashboard","label":"Dashboard"}]},"href":"zh-Hans/docs/overview"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"llmsg","hasAudioNarration":false,"actualSubdomain":"llmsg","customDomains":["wiki.llm.sg"],"gitSource":{"type":"github","owner":"agnesai-engineering","repo":"llmsgdocs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6adecd8990f989adb253c76e"},"entitlements":{},"buildId":"6aed2cddab6690d1634ff54e","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"en","tag":"User guides","count":9},{"language":"zh-Hans","tag":"用户指南","count":9},{"language":"en","tag":"Get started","count":3},{"language":"en","tag":"Guides","count":3},{"language":"zh-Hans","tag":"开始使用","count":3},{"language":"zh-Hans","tag":"使用指南","count":3},{"language":"en","tag":"Legal","count":2},{"language":"zh-Hans","tag":"法律条款","count":2},{"language":"en","tag":"Help","count":1},{"language":"zh-Hans","tag":"帮助","count":1}]},"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":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"footer a[href*=\"utm_campaign=poweredBy\"],#footer a[href*=\"utm_campaign=poweredBy\"]{display:none!important}a[href*=\"apihub.agnes-ai.com\"],a[href^=\"https://apihub.agnes-ai.com\"]{pointer-events:none!important;cursor:default!important;text-decoration:none!important;color:inherit!important}#navbar,#sidebar{letter-spacing:0.02em}.nav-logo{margin-top:4px}#sidebar .sidebar-group-header{margin-top:0!important;margin-bottom:0.625rem!important;padding:0!important;min-height:0!important}@media (min-width: 1024px){#sidebar .sidebar-group-header{margin-bottom:0.625rem!important}}#sidebar .sidebar-group-header h3.sidebar-title,#sidebar h3.sidebar-title{margin:0;padding:0;font-size:0.875rem;line-height:1.5rem;font-weight:600;letter-spacing:0.02em;color:rgb(17 24 39)}html.dark #sidebar .sidebar-group-header h3.sidebar-title,html.dark #sidebar h3.sidebar-title,[data-theme=\"dark\"] #sidebar .sidebar-group-header h3.sidebar-title,[data-theme=\"dark\"] #sidebar h3.sidebar-title{color:rgb(229 231 235)}#sidebar .sidebar-group-header h3.sidebar-title span,#sidebar h3.sidebar-title span{display:block;line-height:inherit}#sidebar #sidebar-content li>a,#sidebar #sidebar-content li>button{font-size:0.875rem;font-weight:400;letter-spacing:0.02em}#sidebar #sidebar-content li[data-active]>a,#sidebar #sidebar-content li[data-active]>button{font-weight:500}.navbar-link>a{font-weight:400}table{border-collapse:collapse;border-spacing:0;width:100%;margin:1rem 0 1.5rem;border:none;border-radius:0;overflow:visible;background:transparent}table thead th,table tbody th,table tbody td{border:none;border-bottom:1px solid #eeeeee;text-align:left;vertical-align:top;padding:1rem 1.25rem 1rem 0;background:transparent}table thead th:last-child,table tbody th:last-child,table tbody td:last-child{padding-right:0}table thead th{font-weight:600;color:inherit}table tbody tr:last-child th,table tbody tr:last-child td{border-bottom:none}table tbody td:first-child,table tbody th:first-child{font-weight:600}html.dark table thead th,html.dark table tbody th,html.dark table tbody td,[data-theme=\"dark\"] table thead th,[data-theme=\"dark\"] table tbody th,[data-theme=\"dark\"] table tbody td{border-bottom-color:rgba(255, 255, 255, 0.1)}del{text-decoration:none;position:relative}del::after{content:\"\";position:absolute;left:0;right:0;top:50%;height:1px;background:currentColor;transform:translateY(-50%);pointer-events:none}h2{margin-top:2.5rem;margin-bottom:1rem;padding-bottom:0.375rem}h3{margin-top:1.75rem;margin-bottom:0.75rem}article>p:first-of-type,#main-content>p:first-of-type{font-size:1.05rem;line-height:1.7}pre{border-radius:0.5rem;margin:1rem 0 1.5rem}.note p,.tip p,.warning p,.info p{margin-bottom:0.5rem}.note ul,.tip ul,.warning ul,.info ul{margin-top:0.5rem;margin-bottom:0}.card-group{margin:1rem 0 1.5rem}.accordion-group{margin:1rem 0}.steps{margin:1.5rem 0}.tabs{margin:1rem 0 1.5rem}article :not(pre)>code,.prose :not(pre)>code,p :not(pre)>code,li :not(pre)>code,td :not(pre)>code,.field-row :not(pre)>code{background-color:#f3f4f6;color:#e85d4c;border-radius:0.375rem;padding:0.2rem 0.55rem;font-size:0.8125rem;font-weight:500;font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;border:none;box-decoration-break:clone;-webkit-box-decoration-break:clone}html.dark article :not(pre)>code,html.dark .prose :not(pre)>code,[data-theme=\"dark\"] article :not(pre)>code,[data-theme=\"dark\"] .prose :not(pre)>code{background-color:rgba(255, 255, 255, 0.08);color:#f87171}.field-row{display:block;margin:0.625rem 0 1rem;line-height:1.75}.field-label{color:#525252;margin-right:0.35rem}html.dark .field-label,[data-theme=\"dark\"] .field-label{color:#a3a3a3}.field-kv{display:block;margin:0.35rem 0;line-height:1.75}.field-kv .field-key{color:#525252;margin-right:0.35rem}html.dark .field-kv .field-key,[data-theme=\"dark\"] .field-kv .field-key{color:#a3a3a3}"}],"page":{"pagePath":"en/docs/usage-and-billing","slug":"/en/docs/usage-and-billing","pageMetadata":{"title":"Understand usage and billing","sidebarTitle":"Usage and billing","description":"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.","keywords":["llm.sg","tokens","billing"],"href":"/en/docs/usage-and-billing"},"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: \"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\"\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`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Check your selected model’s current prices, account balance, and applicable limits before making llm.sg requests.`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Billing page locations, currencies, payment methods, pricing units, and charging rules still require product confirmation. Use the platform’s actual pricing and billing records.`})}),`\n`,_jsx(Heading,{level:`2`,id:`read-token-usage`,children:`Read token usage`}),`\n`,_jsx(_components.p,{children:`Tokens measure the input and output processed by a model. They are not equivalent to words or characters.`}),`\n`,_jsx(_components.p,{children:`Compatible responses may include:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.prompt_tokens`})}),_jsx(_components.td,{children:`Input token count`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.completion_tokens`})}),_jsx(_components.td,{children:`Output token count`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.total_tokens`})}),_jsx(_components.td,{children:`Total token count`})]})]})]}),`\n`,_jsx(_components.p,{children:`Availability and detailed accounting depend on the model and endpoint. Reasoning, cached content, and multimodal input may have separate rules.`}),`\n`,_jsx(Heading,{level:`2`,id:`estimate-text-generation-cost`,children:`Estimate text generation cost`}),`\n`,_jsx(_components.p,{children:`For a model priced separately by input and output tokens:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Estimated cost = input tokens × input price ÷ pricing unit`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` + output tokens × output price ÷ pricing unit`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`If prices are listed per million tokens, use `,_jsx(_components.code,{children:`1,000,000`}),` as the pricing unit. Use current prices in the same currency. This estimate does not replace actual billing records.`]}),`\n`,_jsx(Heading,{level:`2`,id:`check-your-records`,children:`Check your records`}),`\n`,_jsx(_components.p,{children:`If the console provides usage or request history, compare the model ID, timestamp, request ID, token usage, and number of attempts against your application logs. Include the timezone when investigating differences.`}),`\n`,_jsx(_components.p,{children:`Keep costs predictable by evaluating small batches, trimming unnecessary conversation history, and using output limits supported by your model. Set bounded retries and check whether your SDK already retries automatically.`}),`\n`,_jsx(_components.p,{children:`A timeout can occur after the server starts processing. Another request may create additional usage. Failed, canceled, or interrupted request charges depend on the platform’s billing policy.`})]})}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":"Understand usage and billing","sidebarTitle":"Usage and billing","description":"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.","keywords":["llm.sg","tokens","billing"],"href":"/en/docs/usage-and-billing"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Read token usage","slug":"read-token-usage","depth":2,"children":[]},{"title":"Estimate text generation cost","slug":"estimate-text-generation-cost","depth":2,"children":[]},{"title":"Check your records","slug":"check-your-records","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"llmsg","siteName":"llm.sg Docs","title":"Understand usage and billing - llm.sg Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en/docs/usage-and-billing","matchLevel":0},"zh-Hans":{"href":"/zh-Hans/docs/usage-and-billing","matchLevel":1}}},"lastModified":"2026-11-05T10:06:03.466Z","originalFileLocation":"en/docs/usage-and-billing.mdx","locale":"en"},"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=\"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\">\u003cmeta data-mint-head name=\"application-name\" content=\"llm.sg Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_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/llmsg/G-zm4FuP4oHKftlT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Understand usage and billing - llm.sg Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"llm.sg Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://wiki.llm.sg/en/docs/usage-and-billing\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://llmsg.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Understand+usage+and+billing\u0026amp;description=Understand+token+usage%2C+estimate+text+generation+costs+using+current+model+prices%2C+and+compare+llm.sg+request+records+with+your+account+billing+data.\u0026amp;theme=d93cf05fcee7e9bc600d31b2\u0026amp;signature=c8e05db035bd4abe6f5f0a788160402736ae0a2411aa43be4891f8066ae4be85\">\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=\"Understand usage and billing - llm.sg Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://llmsg.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=Understand+usage+and+billing\u0026amp;description=Understand+token+usage%2C+estimate+text+generation+costs+using+current+model+prices%2C+and+compare+llm.sg+request+records+with+your+account+billing+data.\u0026amp;theme=d93cf05fcee7e9bc600d31b2\u0026amp;signature=c8e05db035bd4abe6f5f0a788160402736ae0a2411aa43be4891f8066ae4be85\">\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/llmsg/G-zm4FuP4oHKftlT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"llm.sg Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#171717\">\u003clink data-mint-head rel=\"canonical\" href=\"https://wiki.llm.sg/en/docs/usage-and-billing\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/docs/usage-and-billing.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://wiki.llm.sg/en/docs/usage-and-billing\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://wiki.llm.sg/zh-Hans/docs/usage-and-billing\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://wiki.llm.sg/en/docs/usage-and-billing\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://wiki.llm.sg/#organization\",\"name\":\"llm.sg Docs\",\"url\":\"https://wiki.llm.sg\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/llmsg/FOR_5jAu1HmGbX-_/logo/llmsg-light.svg?fit=max\u0026auto=format\u0026n=FOR_5jAu1HmGbX-_\u0026q=85\u0026s=c751c79771f51fd51f5c84a398e3dc89\"}},{\"@type\":\"WebSite\",\"@id\":\"https://wiki.llm.sg#website\",\"name\":\"llm.sg Docs\",\"url\":\"https://wiki.llm.sg\",\"publisher\":{\"@id\":\"https://wiki.llm.sg/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://wiki.llm.sg/en/docs/usage-and-billing#webpage\",\"url\":\"https://wiki.llm.sg/en/docs/usage-and-billing\",\"name\":\"Understand usage and billing\",\"description\":\"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\",\"dateModified\":\"2026-11-05T10:06:03.466Z\",\"isPartOf\":{\"@id\":\"https://wiki.llm.sg#website\"},\"breadcrumb\":{\"@id\":\"https://wiki.llm.sg/en/docs/usage-and-billing#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://wiki.llm.sg/en/docs/usage-and-billing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://wiki.llm.sg/en/docs/models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Understand usage and billing\",\"item\":\"https://wiki.llm.sg/en/docs/usage-and-billing\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://wiki.llm.sg/en/docs/usage-and-billing#article\",\"headline\":\"Understand usage and billing\",\"name\":\"Understand usage and billing\",\"description\":\"Understand token usage, estimate text generation costs using current model prices, and compare llm.sg request records with your account billing data.\",\"url\":\"https://wiki.llm.sg/en/docs/usage-and-billing\",\"mainEntityOfPage\":{\"@id\":\"https://wiki.llm.sg/en/docs/usage-and-billing#webpage\"},\"dateModified\":\"2026-11-05T10:06:03.466Z\",\"keywords\":\"llm.sg, tokens, billing\",\"publisher\":{\"@id\":\"https://wiki.llm.sg/#organization\"},\"isPartOf\":{\"@id\":\"https://wiki.llm.sg#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"llm.sg Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"llm.sg Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/en/docs/usage-and-billing.md","siteName":"llm.sg Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"navbar":{"links":[{"href":"https://llm.sg/dashboard","label":"Dashboard"}]},"tabs":[{"tab":"User guides","groups":[{"group":"Get started","pages":[{"title":"Welcome to llm.sg","href":"/en/docs/overview"},{"title":"Account and API keys","href":"/en/docs/account-and-api-keys"},{"title":"Get started with llm.sg","sidebarTitle":"Quickstart","href":"/en/docs/quickstart"}]},{"group":"Guides","pages":[{"title":"Choose and switch models","sidebarTitle":"Models","href":"/en/docs/models"},{"title":"Stream responses and manage conversations","sidebarTitle":"Chat","description":"Read incremental text from compatible model responses and send relevant message history to continue a conversation through the llm.sg API endpoint.","href":"/en/docs/chat"},{"title":"Understand usage and billing","sidebarTitle":"Usage and billing","href":"/en/docs/usage-and-billing"}]},{"group":"Help","pages":[{"title":"Troubleshoot API requests","sidebarTitle":"Troubleshooting","description":"Diagnose llm.sg authentication, endpoint, model, rate limit, and timeout errors, and collect a safe request example and request ID for investigation.","href":"/en/docs/troubleshooting"}]},{"group":"Legal","pages":[{"title":"Privacy policy","href":"/en/docs/privacy-policy"},{"title":"Terms of service","href":"/en/docs/terms-of-service"}]}]}]},{"language":"zh-Hans","footer":{"links":[{"header":"法律条款","items":[{"label":"隐私政策","href":"/zh-Hans/docs/privacy-policy"},{"label":"服务条款","href":"/zh-Hans/docs/terms-of-service"}]}]},"navbar":{"links":[{"href":"https://llm.sg/dashboard","label":"Dashboard"}]},"pages":[{"title":"zh-Hans","href":"/zh-Hans/docs/usage-and-billing"}]}]},"basePath":"","title":"Understand usage and billing - llm.sg Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}