Farther ShoreDocs
Go to Farther Shore
Getting startedCore conceptsLaunch checklist
ProductsUpstream routingEnvironmentsDeveloper portals
Billing strategiesPlans and limitsSubscribersAPI keys
Gateway enforcementUsage meteringLimits and creditsGateway sharding
Launch a request-counted product15mAdd monthly included usageAdd subscription plus overageCreate a prepaid credits productMeter AI token usageAdd a custom meterIssue and test an API keyDebug a denied requestUpdate product docsPrepare for launch
TroubleshootingGateway response codesMeter namingPlatform docs publishing
Status
Docs/Cookbook/Add a custom meter

Add a custom meter

Define a product-specific unit and enforce it in plans.

PreviousMeter AI token usageNextIssue and test an API key

On this page

Good custom meter examplesStepsExample definitionProduct docs languageValidation

Custom meters let you bill or limit product-specific work instead of forcing everything into requests.

Good custom meter examples

MeterProduct
image_generationsImage API
document_pagesDocument parsing API
reportsAnalytics report API
minutes_transcribedSpeech transcription API
records_enrichedData enrichment API

Steps

  1. Name the meter using lowercase snake case.
  2. Define exactly what increments the meter.
  3. Add the meter to the product.
  4. Use the meter in a plan limit, included usage amount, overage rule, or credit spend rule.
  5. Update product docs with the meter definition.
  6. Test with a request that increments the meter.

Example definition

Meter: document_pages
Meaning: one processed page in an uploaded document
When counted: after the upstream reports the page count

Product docs language

Usage is metered by processed document page. A 10-page PDF counts as 10
document_pages.

Validation

Confirm:

  • the meter name appears consistently in plans and docs
  • usage increments by the expected amount
  • limits or overage rules use the same meter
  • subscribers can understand the unit before buying