Skip to main content
TerraTwin uses a credit-based model for API usage. Every successful request consumes credits from your account, based on the work required to model your shipment.

What is a credit?

A credit is the basic unit of work TerraTwin charges for when modelling a shipment. In practice: 1 shipment leg = 1 credit, regardless of distance, mode mix, or route complexity.

One balance per API

Your account holds a separate credit balance for each API, such as the Emissions API and the Distance API. A request only ever uses the balance of the API it calls, and every API key and integration on the account draws from the same balances.

Credit balances

  • Credits are counted in the same way for every API, so the same shipment costs the same number of credits in the Emissions API and in the Distance API. The creditCost in each response shows how many credits the request used.
  • When an API’s balance runs out, its requests are rejected with 403 (error code 42), even if you have credits left for another API. Credits are never moved or borrowed between APIs.
  • Running out of credits for one API doesn’t stop requests to another API that still has credits.
Distance API credits appear as route credits in error messages, for example “Your account has no remaining route credits”.

Getting credits

1

Sign up & get free credits

Every new TerraTwin account starts with 50 courtesy Emissions API credits.
2

Buy more credits

Emissions API credits can be bought on the TerraTwin website on a pay-as-you-go basis.Distance API credits can’t be bought on the website yet – contact TerraTwin at team@terratwin.com to add them to your account. Buying credits for each API on the website is coming.
3

Credits are consumed per shipment leg

For each request, TerraTwin splits your shipment into legs – 1 leg = 1 credit – and charges them to the balance of the API you called.
Credits are tracked at the account level and shared across all API keys – including personal keys and service accounts.

How credit consumption works

TerraTwin breaks every shipment into legs – single, continuous movements using one mode of transport. A leg is typically:
  • An air segment: airport → airport
  • A road segment: hub → address or address → hub
  • A rail segment: rail terminal → rail terminal
  • A sea segment: port → port
You are charged 1 credit per leg, in the Emissions API and the Distance API alike.
A road leg where a truck boards a ferry and continues after landing is still treated as one road leg → one credit.

Examples

Simple flight

You send a 100 kg shipment from Madrid Airport (MAD) to Miami Airport (MIA) as a single airport-to-airport leg.TerraTwin:
  • Fly Madrid (MAD) → Miami (MIA)
Legs: 1 (air only)
Credits consumed: 1

Multi-leg, multi-modal

You send the same 100 kg shipment from a street address in Madrid to a street address in Miami in a single request.TerraTwin:
  • Drive street address in Madrid → Madrid (MAD)
  • Fly Madrid (MAD) → Miami (MIA)
  • Truck Miami (MIA) → street address in Miami
Legs: 3 (road → air → road)
Credits consumed: 3
You are not charged credits for location lookups of any trip origins, waypoints or destinations.