Custom Model Costs for Self-Hosted and Fine-Tuned Models
Laminar prices every LLM span from a built-in table covering the major providers. Custom model costs let you define your own per-project pricing for models that table doesn’t know about: fine-tuned deployments, self-hosted open-weight models, private inference endpoints, or a negotiated rate that differs from list price. Set a price once in project settings and every matching span ingested from then on is costed with it.
Project settings: two custom prices, one scoped to a provider and one matching spans that carry no provider
Custom prices are per project and take priority over the built-in table. They apply at ingestion, so a price change affects spans ingested from that point on, not spans already stored.
Go to Settings > Model costs in the project sidebar, under Project settings.
2
Create the entry
Click Model cost and fill in the form.
The add dialog: prices are entered in dollars per million tokens
Field
Notes
Provider
Optional. Must match gen_ai.system on your spans. Leave blank to match spans that carry no provider.
Model
Required. Must match the model name on your spans exactly.
Input
Price for input (prompt) tokens.
Cache read
Price for tokens read from a prompt cache. Usually a fraction of the input price.
Output
Price for output (completion) tokens.
Enter every price in dollars per million tokens, matching how providers publish their rates. Laminar converts to a per-token rate internally. At least one of Input or Output is required; leave a field blank and that token class is not charged.
3
Confirm on a span
Send a request through the model, open the trace, and check the cost on the LLM span. If it reads $0, the provider or model string doesn’t match: see Why isn’t my custom price applying? below.
Edit and delete are the pencil and trash icons on each row. Both take effect on the next ingested span.
This is the one thing that causes a custom price to silently not apply. The model and provider you enter are matched exactly against the values on your spans, with no normalization beyond case-insensitivity:
Model is matched against gen_ai.response.model, falling back to gen_ai.request.model when there is no response model. A date or version suffix is part of the name: an entry for acme-llm-v1 does not match a span reporting acme-llm-v1-2026-01-01. Add a separate entry per deployed variant.
Provider is matched against gen_ai.system, after stripping anything past the first dot (a span reporting anthropic.messages matches an entry of anthropic). Enter anthropic, not anthropic.messages.
A blank Provider means blank, not “any”. An entry with no provider matches only spans that carry no gen_ai.system at all. If your spans set a provider, the entry must set the same one.
Case doesn’t matter: both sides are lowercased before matching. To read the exact strings your spans carry, query them:
Explicit cost attributes on the span. If a span sets gen_ai.usage.input_cost, output_cost, or cost, Laminar uses those numbers and consults no price table. This is the escape hatch when you compute cost yourself: see LLM cost tracking.
Your project’s custom prices, matched exactly as described above.
The built-in price table, which does normalize: it strips date snapshots and tries provider-prefixed variants, so gpt-5-mini-2026-04-01 still resolves to gpt-5-mini pricing.
Once a project has at least one custom price, a Copy to project button appears. Pick a target project in the same workspace and Laminar copies every entry across. This is the fast path when several projects share the same self-hosted models.
Copying replaces all custom model costs in the target project. Any entries that exist there are deleted first, not merged.
The span costs $0. The provider or model doesn’t match. Run the SQL query above and compare character for character, watching for date suffixes and a provider you didn’t expect.
The span has a cost you didn’t configure. Either your instrumentation sets explicit cost attributes (which win outright) or the model resolved against the built-in table. Check whether your code sets gen_ai.usage.*_cost.
Only older spans are wrong. Prices apply at ingestion. Spans stored before you added the price keep their original cost.
Token counts are missing. Any price needs token counts to multiply. If input_tokens and output_tokens are 0, fix the instrumentation first: LLM cost tracking covers the attributes to set.
Instrument a custom provider by hand and set token counts or explicit costs.
Span attribute reference
Every attribute Laminar reads, including the model and provider keys.
SQL editor
Query cost and token totals across traces and spans.
Dashboards
Chart spend over time, grouped by model or provider.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Laminar documentation","colors":{"primary":"#d0754e","light":"#d0754e","dark":"#d0754e"},"logo":"https://mintcdn.com/laminarai/S438DUdrFaxkWj71/logo/laminar-wordmark.svg?fit=max\u0026auto=format\u0026n=S438DUdrFaxkWj71\u0026q=85\u0026s=6b0de22c2375c7edcbfa86892965fc24","favicon":"https://mintcdn.com/laminarai/W6ojRY5YjRjfXRin/favicon.png?fit=max\u0026auto=format\u0026n=W6ojRY5YjRjfXRin\u0026q=85\u0026s=c81860de08addc72dce2e6e580686fcd","appearance":{"default":"dark","strict":true},"background":{"color":{"dark":"#0F0F0F"}},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Contact support"},{"href":"https://laminar.sh/projects","label":"Dashboard"}],"primary":{"type":"github","href":"https://github.com/lmnr-ai/lmnr"}},"footer":{"socials":{"discord":"https://discord.gg/nNFUUDAKub","twitter":"https://twitter.com/lmnrai","linkedin":"https://linkedin.com/company/lmnr-ai","github":"https://github.com/lmnr-ai"}},"icons":{"library":"lucide"},"integrations":{"posthog":{"apiKey":"phc_dUMdjfNKf11jcHgtn7juSnT4P1pO0tafsPUWt4PuwG7","apiHost":"https://p.laminar.sh"}},"thumbnails":{"background":"https://mintcdn.com/laminarai/d9XjS_AxLkd_3ZV5/images/og-background.png?fit=max\u0026auto=format\u0026n=d9XjS_AxLkd_3ZV5\u0026q=85\u0026s=e73fe8bb357c4422f4803266b1b9d15f"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"laminarai","hasAudioNarration":false,"actualSubdomain":"laminarai","customDomains":["laminar.sh"],"gitSource":{"type":"github","owner":"lmnr-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6aec5dc0754501e0c6b59e0b","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Documentation","count":70},{"language":"default","tag":"Integrations","count":34},{"language":"default","tag":"API Reference","count":27},{"language":"default","tag":"Evaluations","count":20},{"language":"default","tag":"Tracing","count":20},{"language":"default","tag":"Platform","count":19},{"language":"default","tag":"SDK","count":14},{"language":"default","tag":"Agent frameworks","count":12},{"language":"default","tag":"Tracing Structure","count":12},{"language":"default","tag":"Signals","count":11}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"platform/custom-model-costs","slug":"/platform/custom-model-costs","pageMetadata":{"title":"Custom Model Costs for Self-Hosted and Fine-Tuned Models","sidebarTitle":"Custom model costs","description":null,"href":"/platform/custom-model-costs"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,Frame,Heading,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Laminar prices every LLM span from a built-in table covering the major providers. `,_jsx(_components.strong,{children:`Custom model costs let you define your own per-project pricing for models that table doesn’t know about`}),`: fine-tuned deployments, self-hosted open-weight models, private inference endpoints, or a negotiated rate that differs from list price. Set a price once in project settings and every matching span ingested from then on is costed with it.`]}),`\n`,_jsx(Frame,{caption:`Project settings: two custom prices, one scoped to a provider and one matching spans that carry no provider`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=2613919b07d9d962c15fc95144d33dd9`,alt:`Model costs settings page listing two custom model cost entries with input, cache read, and output prices`,\"data-og-width\":`1512`,width:`1512`,\"data-og-height\":`982`,height:`982`,\"data-path\":`images/platform/custom-model-costs-table.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=280\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=946f26cc48f2bdb0c4bb4d759b809819 280w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=560\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=b368dc6dfa696f35e819dc1f368be99d 560w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=840\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=483faec9aa9bb70228354ba88ec0c257 840w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=1100\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=e383d469ea907a28f59dbe4583b655c8 1100w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=1650\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=f65a1a30086146cb0bf90ec69f578960 1650w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-costs-table.png?w=2500\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=30f6bfb67e7aa43b7c8f9af7a2423e56 2500w`})}),`\n`,_jsxs(_components.p,{children:[`Custom prices are `,_jsx(_components.strong,{children:`per project`}),` and take priority over the built-in table. They apply at ingestion, so a price change affects spans ingested from that point on, not spans already stored.`]}),`\n`,_jsx(Heading,{level:`2`,id:`add-a-custom-price`,children:`Add a custom price`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Open Model costs`,children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Settings > Model costs`}),` in the project sidebar, under `,_jsx(_components.strong,{children:`Project settings`}),`.`]})}),_jsxs(Step,{title:`Create the entry`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Model cost`}),` and fill in the form.`]}),_jsx(Frame,{caption:`The add dialog: prices are entered in dollars per million tokens`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=d9a79d104fa136f97e8bb056c76cfecb`,alt:`Add custom model cost dialog with provider, model, and input, cache read, and output price fields`,\"data-og-width\":`1512`,width:`1512`,\"data-og-height\":`982`,height:`982`,\"data-path\":`images/platform/custom-model-cost-dialog.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=280\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=7ec67694170fa6f6cea8dc5a64edc9ae 280w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=560\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=ccb707fa3e5394a1167be4f20ec79db1 560w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=840\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=f98837ea1fcdc17f211e84bf8a897cf7 840w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=1100\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=e60cf68876af8813fb8912a26482eb77 1100w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=1650\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=1877f7c9bf13ed3bd0e6b3de3dbe57e2 1650w, https://mintcdn.com/laminarai/gSmUkVtkMPXEq48X/images/platform/custom-model-cost-dialog.png?w=2500\u0026fit=max\u0026auto=format\u0026n=gSmUkVtkMPXEq48X\u0026q=85\u0026s=04b27cb2ece9e8b968ebec8236be219a 2500w`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Provider`})}),_jsxs(_components.td,{children:[`Optional. Must match `,_jsx(_components.code,{children:`gen_ai.system`}),` on your spans. Leave blank to match spans that carry no provider.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Model`})}),_jsx(_components.td,{children:`Required. Must match the model name on your spans exactly.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Input`})}),_jsx(_components.td,{children:`Price for input (prompt) tokens.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Cache read`})}),_jsx(_components.td,{children:`Price for tokens read from a prompt cache. Usually a fraction of the input price.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Output`})}),_jsx(_components.td,{children:`Price for output (completion) tokens.`})]})]})]}),_jsxs(_components.p,{children:[`Enter every price in `,_jsx(_components.strong,{children:`dollars per million tokens`}),`, matching how providers publish their rates. Laminar converts to a per-token rate internally. At least one of `,_jsx(_components.strong,{children:`Input`}),` or `,_jsx(_components.strong,{children:`Output`}),` is required; leave a field blank and that token class is not charged.`]})]}),_jsx(Step,{title:`Confirm on a span`,children:_jsxs(_components.p,{children:[`Send a request through the model, open the trace, and check the cost on the LLM span. If it reads `,_jsx(_components.code,{children:`$0`}),`, the provider or model string doesn’t match: see `,_jsx(_components.a,{href:`#why-isnt-my-custom-price-applying`,children:`Why isn’t my custom price applying?`}),` below.`]})})]}),`\n`,_jsx(_components.p,{children:`Edit and delete are the pencil and trash icons on each row. Both take effect on the next ingested span.`}),`\n`,_jsx(Heading,{level:`2`,id:`names-must-match-your-span-attributes-exactly`,children:`Names must match your span attributes exactly`}),`\n`,_jsxs(_components.p,{children:[`This is the one thing that causes a custom price to silently not apply. `,_jsx(_components.strong,{children:`The model and provider you enter are matched exactly against the values on your spans`}),`, with no normalization beyond case-insensitivity:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Model`}),` is matched against `,_jsx(_components.code,{children:`gen_ai.response.model`}),`, falling back to `,_jsx(_components.code,{children:`gen_ai.request.model`}),` when there is no response model. A date or version suffix is part of the name: an entry for `,_jsx(_components.code,{children:`acme-llm-v1`}),` does `,_jsx(_components.strong,{children:`not`}),` match a span reporting `,_jsx(_components.code,{children:`acme-llm-v1-2026-01-01`}),`. Add a separate entry per deployed variant.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Provider`}),` is matched against `,_jsx(_components.code,{children:`gen_ai.system`}),`, after stripping anything past the first dot (a span reporting `,_jsx(_components.code,{children:`anthropic.messages`}),` matches an entry of `,_jsx(_components.code,{children:`anthropic`}),`). Enter `,_jsx(_components.code,{children:`anthropic`}),`, not `,_jsx(_components.code,{children:`anthropic.messages`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A blank Provider means blank, not “any”`}),`. An entry with no provider matches only spans that carry no `,_jsx(_components.code,{children:`gen_ai.system`}),` at all. If your spans set a provider, the entry must set the same one.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Case doesn’t matter: both sides are lowercased before matching. To read the exact strings your spans carry, query them:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`sql`,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:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT DISTINCT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, model`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` spans`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`WHERE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` span_type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'LLM'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Run this in the `,_jsx(_components.a,{href:`/platform/sql-editor`,children:`SQL editor`}),` and copy the values straight into the form. See the `,_jsx(_components.a,{href:`/tracing/structure/span-attribute-reference`,children:`span attribute reference`}),` for the full list of attributes Laminar reads.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-laminar-picks-a-price`,children:`How Laminar picks a price`}),`\n`,_jsx(_components.p,{children:`For each LLM span, in order:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Explicit cost attributes on the span.`}),` If a span sets `,_jsx(_components.code,{children:`gen_ai.usage.input_cost`}),`, `,_jsx(_components.code,{children:`output_cost`}),`, or `,_jsx(_components.code,{children:`cost`}),`, Laminar uses those numbers and consults no price table. This is the escape hatch when you compute cost yourself: see `,_jsx(_components.a,{href:`/tracing/cost-tracking`,children:`LLM cost tracking`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your project’s custom prices`}),`, matched exactly as described above.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The built-in price table`}),`, which does normalize: it strips date snapshots and tries provider-prefixed variants, so `,_jsx(_components.code,{children:`gpt-5-mini-2026-04-01`}),` still resolves to `,_jsx(_components.code,{children:`gpt-5-mini`}),` pricing.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If none match, the span’s cost is `,_jsx(_components.code,{children:`0`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`copy-prices-to-another-project`,children:`Copy prices to another project`}),`\n`,_jsxs(_components.p,{children:[`Once a project has at least one custom price, a `,_jsx(_components.strong,{children:`Copy to project`}),` button appears. Pick a target project in the same workspace and Laminar copies every entry across. This is the fast path when several projects share the same self-hosted models.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Copying `,_jsx(_components.strong,{children:`replaces`}),` all custom model costs in the target project. Any entries that exist there are deleted first, not merged.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`why-isn’t-my-custom-price-applying`,children:`Why isn’t my custom price applying?`}),`\n`,_jsx(_components.p,{children:`Work through these in order:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`The span costs `,_jsx(_components.code,{children:`$0`}),`.`]}),` The provider or model doesn’t match. Run the SQL query above and compare character for character, watching for date suffixes and a provider you didn’t expect.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`The span has a cost you didn’t configure.`}),` Either your instrumentation sets explicit cost attributes (which win outright) or the model resolved against the built-in table. Check whether your code sets `,_jsx(_components.code,{children:`gen_ai.usage.*_cost`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Only older spans are wrong.`}),` Prices apply at ingestion. Spans stored before you added the price keep their original cost.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Token counts are missing.`}),` Any price needs token counts to multiply. If `,_jsx(_components.code,{children:`input_tokens`}),` and `,_jsx(_components.code,{children:`output_tokens`}),` are `,_jsx(_components.code,{children:`0`}),`, fix the instrumentation first: `,_jsx(_components.a,{href:`/tracing/cost-tracking`,children:`LLM cost tracking`}),` covers the attributes to set.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`what’s-next`,children:`What’s next`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`LLM cost tracking`,href:`/tracing/cost-tracking`,children:_jsx(_components.p,{children:`Instrument a custom provider by hand and set token counts or explicit costs.`})}),_jsx(Card,{title:`Span attribute reference`,href:`/tracing/structure/span-attribute-reference`,children:_jsx(_components.p,{children:`Every attribute Laminar reads, including the model and provider keys.`})}),_jsx(Card,{title:`SQL editor`,href:`/platform/sql-editor`,children:_jsx(_components.p,{children:`Query cost and token totals across traces and spans.`})}),_jsx(Card,{title:`Dashboards`,href:`/platform/dashboards`,children:_jsx(_components.p,{children:`Chart spend over time, grouped by model or provider.`})})]})]})}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":"Custom Model Costs for Self-Hosted and Fine-Tuned Models","sidebarTitle":"Custom model costs","description":null,"href":"/platform/custom-model-costs"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Add a custom price","slug":"add-a-custom-price","depth":2,"children":[]},{"title":"Names must match your span attributes exactly","slug":"names-must-match-your-span-attributes-exactly","depth":2,"children":[]},{"title":"How Laminar picks a price","slug":"how-laminar-picks-a-price","depth":2,"children":[]},{"title":"Copy prices to another project","slug":"copy-prices-to-another-project","depth":2,"children":[]},{"title":"Why isn’t my custom price applying?","slug":"why-isn’t-my-custom-price-applying","depth":2,"children":[]},{"title":"What’s next","slug":"what’s-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"laminarai","siteName":"Laminar documentation","title":"Custom Model Costs for Self-Hosted and Fine-Tuned Models - Laminar documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T10:43:28.988Z","originalFileLocation":"platform/custom-model-costs.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";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=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Laminar documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_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=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom Model Costs for Self-Hosted and Fine-Tuned Models - Laminar documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Laminar documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://laminar.sh/docs/platform/custom-model-costs\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://laminarai.mintlify.site/docs/_mintlify/api/og/v2?division=Platform\u0026amp;title=Custom+Model+Costs+for+Self-Hosted+and+Fine-Tuned+Models\u0026amp;theme=1648d20b53ce7529dc4a544e\u0026amp;signature=a8af3e5bd9430858e386412b7f13da32c94b3f49910df382fa37499bb0d8634a\">\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=\"Custom Model Costs for Self-Hosted and Fine-Tuned Models - Laminar documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://laminarai.mintlify.site/docs/_mintlify/api/og/v2?division=Platform\u0026amp;title=Custom+Model+Costs+for+Self-Hosted+and+Fine-Tuned+Models\u0026amp;theme=1648d20b53ce7529dc4a544e\u0026amp;signature=a8af3e5bd9430858e386412b7f13da32c94b3f49910df382fa37499bb0d8634a\">\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=\"/docs/mintlify-assets/_mintlify/favicons/laminarai/VQjyHLSbUBgKAPKE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Laminar documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#d0754e\">\u003clink data-mint-head rel=\"canonical\" href=\"https://laminar.sh/docs/platform/custom-model-costs\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/platform/custom-model-costs.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://laminar.sh/#organization\",\"name\":\"Laminar documentation\",\"url\":\"https://laminar.sh\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/laminarai/S438DUdrFaxkWj71/logo/laminar-wordmark.svg?fit=max\u0026auto=format\u0026n=S438DUdrFaxkWj71\u0026q=85\u0026s=6b0de22c2375c7edcbfa86892965fc24\"}},{\"@type\":\"WebSite\",\"@id\":\"https://laminar.sh/docs#website\",\"name\":\"Laminar documentation\",\"url\":\"https://laminar.sh/docs\",\"publisher\":{\"@id\":\"https://laminar.sh/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://laminar.sh/docs/platform/custom-model-costs#webpage\",\"url\":\"https://laminar.sh/docs/platform/custom-model-costs\",\"name\":\"Custom Model Costs for Self-Hosted and Fine-Tuned Models\",\"dateModified\":\"2026-11-05T10:43:28.988Z\",\"isPartOf\":{\"@id\":\"https://laminar.sh/docs#website\"},\"breadcrumb\":{\"@id\":\"https://laminar.sh/docs/platform/custom-model-costs#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://laminar.sh/docs/platform/custom-model-costs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform\",\"item\":\"https://laminar.sh/docs/platform\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Model Costs for Self-Hosted and Fine-Tuned Models\",\"item\":\"https://laminar.sh/docs/platform/custom-model-costs\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://laminar.sh/docs/platform/custom-model-costs#article\",\"headline\":\"Custom Model Costs for Self-Hosted and Fine-Tuned Models\",\"name\":\"Custom Model Costs for Self-Hosted and Fine-Tuned Models\",\"url\":\"https://laminar.sh/docs/platform/custom-model-costs\",\"mainEntityOfPage\":{\"@id\":\"https://laminar.sh/docs/platform/custom-model-costs#webpage\"},\"dateModified\":\"2026-11-05T10:43:28.988Z\",\"publisher\":{\"@id\":\"https://laminar.sh/#organization\"},\"isPartOf\":{\"@id\":\"https://laminar.sh/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Laminar documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Laminar documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Overview","pages":[{"title":"Laminar","sidebarTitle":"Laminar","href":"/overview"},{"title":"Getting Started","href":"/getting-started"}]},{"group":"Tracing","pages":[{"title":"Tracing","sidebarTitle":"Introduction","href":"/tracing/introduction"},{"group":"Tracing Structure","pages":[{"title":"Tracing Structure","sidebarTitle":"Overview","href":"/tracing/structure/overview"},{"title":"Trace Functions","href":"/tracing/structure/observe-decorator"},{"title":"Trace Parts of Your Code","href":"/tracing/structure/manual-span-creation"},{"title":"Span Types","sidebarTitle":"Span Types","href":"/tracing/structure/span-types"},{"title":"Sessions","href":"/tracing/structure/sessions"},{"title":"User ID","href":"/tracing/structure/user-id"},{"title":"Metadata","href":"/tracing/structure/metadata"},{"title":"Tags","href":"/tracing/structure/tags"},{"title":"Tracing Images","href":"/tracing/structure/images"},{"title":"Continuing Traces","href":"/tracing/structure/continuing-traces"},{"title":"Span Attribute Reference","sidebarTitle":"Span Attribute Reference","href":"/tracing/structure/span-attribute-reference"},{"title":"Flushing Spans and Shutting Down","href":"/tracing/structure/flushing-and-shutdown"}]},{"title":"Task extraction for AI agent runs","sidebarTitle":"Task extraction","href":"/tracing/task-extraction"},{"title":"Agent versioning: track prompt and tool changes","sidebarTitle":"Agent versions","href":"/tracing/agent-versions"},{"title":"LLM cost tracking","href":"/tracing/cost-tracking"},{"title":"Session replay for browser agents","href":"/tracing/browser-agent-observability"},{"title":"LangGraph Visualization","sidebarTitle":"LangGraph Visualization","href":"/tracing/langgraph-visualization"},{"group":"Troubleshooting","pages":[{"title":"Troubleshooting","href":"/tracing/troubleshooting"},{"title":"Troubleshooting non-Laminar SDKs","href":"/tracing/troubleshooting-opentelemetry"}]}]},{"group":"Signals","pages":[{"title":"Signals","sidebarTitle":"Introduction","href":"/signals/introduction"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/signals/quickstart"},{"title":"Manage Signals from the CLI","sidebarTitle":"CLI","href":"/signals/cli"},{"title":"Clusters","sidebarTitle":"Clusters","href":"/signals/clusters"},{"title":"Alerts","sidebarTitle":"Alerts","href":"/signals/alerts"},{"title":"Reports","sidebarTitle":"Reports","href":"/signals/reports"}]},{"group":"Evaluations","pages":[{"group":"Agent evaluations","pages":[{"title":"Agent Evaluations in Real Environments with Laminar","sidebarTitle":"Introduction","href":"/agent-evaluations/introduction"},{"title":"Agent Evaluations Quickstart with lmnr-cli","sidebarTitle":"Quickstart","href":"/agent-evaluations/quickstart"},{"title":"Agent Evaluation Concepts - Tasks, Trials, and Verifiers","sidebarTitle":"Concepts","href":"/agent-evaluations/concepts"},{"title":"Run Agent Evaluations with lmnr-cli eval run","sidebarTitle":"Run evals with lmnr-cli","href":"/agent-evaluations/running-evals"},{"title":"The Evals Folder Reference for lmnr.yaml, harbor.yaml, and task.toml","sidebarTitle":"The evals folder","href":"/agent-evaluations/evals-folder"},{"title":"Build an Agent Evaluation Harness That Matches Production","sidebarTitle":"Build a production harness","href":"/agent-evaluations/production-harness"},{"title":"Capture Agent Trajectories in Every Evaluation Trial","sidebarTitle":"Capture the trajectory","href":"/agent-evaluations/trajectories"},{"title":"Troubleshooting Agent Evaluations","sidebarTitle":"Troubleshooting","href":"/agent-evaluations/troubleshooting"}]},{"group":"LLM evaluations","pages":[{"title":"LLM Evaluations","sidebarTitle":"Introduction","href":"/evaluations/introduction"},{"title":"LLM evaluations quickstart","sidebarTitle":"Quickstart","href":"/evaluations/quickstart"},{"title":"Evaluation concepts","sidebarTitle":"Concepts","href":"/evaluations/concepts"},{"title":"Compare evaluation runs","sidebarTitle":"Compare runs","href":"/evaluations/comparing-runs"},{"title":"Custom Rendering for Evaluation Traces","sidebarTitle":"Custom rendering","href":"/evaluations/custom-rendering"},{"title":"Datasets for evaluations","sidebarTitle":"Datasets","href":"/evaluations/datasets"},{"title":"Manual evaluation API","sidebarTitle":"Manual API","href":"/evaluations/manual-evaluation"},{"title":"Self-hosted evaluations","sidebarTitle":"Self-hosted","href":"/evaluations/self-hosted"}]}]},{"group":"Debugger","pages":[{"title":"AI Agent Debugger: Record, Replay, Evaluate","sidebarTitle":"Introduction","href":"/debugger/introduction"},{"title":"Set Up the Laminar Debugger","sidebarTitle":"Setup","href":"/debugger/setup"},{"title":"How the Debugger Runs","sidebarTitle":"The debugger process","href":"/debugger/process"},{"title":"How Debugger Caching Works","sidebarTitle":"How caching works","href":"/debugger/caching"}]},{"group":"Datasets","pages":[{"sidebarTitle":"Introduction","title":"Introduction to Laminar datasets","href":"/datasets/introduction"},{"sidebarTitle":"Adding data","title":"Adding data to Laminar datasets","href":"/datasets/adding-data"},{"sidebarTitle":"CLI","title":"Laminar datasets CLI","href":"/datasets/cli"}]},{"group":"Platform","pages":[{"title":"Platform","sidebarTitle":"Introduction","href":"/platform"},{"title":"Viewing Traces","sidebarTitle":"Viewing traces","href":"/platform/viewing-traces"},{"title":"Table views","sidebarTitle":"Table views","href":"/platform/table-views"},{"title":"Slack integration","sidebarTitle":"Slack integration","href":"/platform/integrations"},{"title":"Live tracing","sidebarTitle":"Live tracing","href":"/platform/live-tracing"},{"title":"Laminar Agent","sidebarTitle":"Laminar Agent","href":"/platform/laminar-agent"},{"title":"MCP Server","href":"/platform/mcp"},{"title":"SQL Editor","href":"/platform/sql-editor"},{"title":"CLI","href":"/platform/cli"},{"title":"Terraform Provider for Laminar Signals and LLM Profiles","sidebarTitle":"Terraform","href":"/platform/terraform"},{"title":"Full text search","href":"/platform/search"},{"title":"Render Templates for Custom Data Views","sidebarTitle":"Render templates","description":null,"href":"/platform/render-templates"},{"title":"Custom Model Costs for Self-Hosted and Fine-Tuned Models","sidebarTitle":"Custom model costs","href":"/platform/custom-model-costs"},{"title":"Usage Warnings and Hard Limits for Data and Signals","sidebarTitle":"Usage limits","description":null,"href":"/platform/usage-limits"},{"title":"PII Redaction for AI Agent Traces","sidebarTitle":"PII redaction","href":"/platform/pii-redaction"},{"title":"Dashboards: Chart Agent Cost, Tokens, and Latency","sidebarTitle":"Dashboards","href":"/platform/dashboards"},{"title":"Labeling Queues","sidebarTitle":"Labeling Queues","href":"/queues/quickstart"},{"title":"LLM Profiles for Custom LLM Providers and API Keys","sidebarTitle":"LLM profiles","href":"/platform/llm-profiles"},{"title":"Playground","href":"/playground"}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/signals"}]},{"tab":"Self-hosting","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"tab":"SDK","pages":[{"title":"SDK","href":"/sdk/observe"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/ingestion/ingest-opentelemetry-traces"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Custom Model Costs for Self-Hosted and Fine-Tuned Models - Laminar documentation","buildId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","deploymentId":"dpl_3pZeXn3XukjzFRgAX73A7GNDfRJ1","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DM_qMxGl.js","DynamicMarkdown-C91yhnNP.js","zoom-image-lightbox-g3ZzIKzc.js","lightbox-handle-r17bVUz3.js"]}