Skip to content
TrimCarbon
Start offsetting
Carbon Compass

A carbon offset API for flight schools, clubs and fleets

Offset every lesson, every day's flying or every fuel uplift from your own software. How a carbon offset API works, what it costs, and when a plan is the better fit.

7 min read

A carbon offset API lets your software buy carbon offsets on its own. Your scheduling system closes a lesson, sends one request, and the CO₂ of that flight is offset, with a public certificate to show for it. Nobody types card numbers or exports spreadsheets at the end of the month.

That matters once a fleet gets busy. TrimCarbon's self-serve plans stop at 15 tonnes of CO₂ a year, about 170 hours of one Cessna 172. A school 172 flying 600 hours a year makes 52.8 tonnes on its own. The TrimCarbon Offset API is built for that scale: businesses that offset their own flying, as it happens.

TrimCarbon sells carbon offsets and runs this API, and I'm a private pilot with night and float ratings and 170 hours, mostly in Cessna 172s.

What a carbon offset API does

It turns offsetting into one HTTP request. With the TrimCarbon Offset API, your system:

  1. Buys by volume or by price. Send {"kg": 115} to offset 115 kg of CO₂, or {"amount_cents": 50000} to spend up to $500 on as many whole kg as that buys.
  2. Pays from a prepaid balance. You top up a USD balance by card, from $250, and each purchase is deducted from it. No card charge per flight.
  3. Gets credits retired. We buy and retire the carbon credits through our supplier, usually within minutes. How the credits are vetted.
  4. Gets proof. Each offset gets a public certificate in the TrimCarbon registry, listing the projects behind it, their registry IDs and the retirement serial numbers.

Your software can also read the balance, list past offsets and get totals, so the same numbers can feed a dashboard or a sustainability report.

The API is for businesses that offset their own emissions: a school's fleet, a club's aircraft, an operator's flying. We review each request for access.

When the API beats a plan, and when it doesn't

A plan is the simpler choice when you know your flying in advance. You pick an amount, and it renews on its own. The API is the better fit when:

  • You fly more than 15 tonnes a year. That is the ceiling of the self-serve plans: about 170 hours of a 172, 194 of a PA-28 or 258 of a 152.
  • Your hours change from month to month. A plan bills a fixed amount. The API offsets what you actually flew, from your own records.
  • You want an offset per flight. Each lesson, rental or job gets its own offset, labelled with your booking number.
  • You want it in your own tools. A button in your dispatch screen, a line in your nightly job, a total on your website.

If you fly your own aircraft or rent a few hours a month, a plan costs less and needs no code: $0.036 per kg on the monthly plan, against the API's standard $0.04. See what an hour costs to offset or compare the plans.

Five ways schools, clubs and operators use it

1. Offset each lesson when it closes. A Cessna 172 burns about 10.6 US gallons an hour at a typical cruise setting, or 88 kg of CO₂. When the instructor closes a 1.3-hour lesson, the scheduling system sends 1.3 × 88 = 114.4 kg, rounded up to 115 kg. At $0.04 per kg, that's $4.60. The booking number goes in the reference field, so every offset traces back to a flight.

2. Offset the day's flying in one batch. Some schools would rather send one request a night: the sum of the day's Hobbs time, aircraft by aircraft. Thirty hours in 172s is 2,640 kg, or $105.60. One request a day is also one certificate a day, which is easier to share than thirty.

3. Offset from fuel records. Fuel uplift is the most accurate number you have. Every US gallon of avgas makes 8.31 kg of CO₂ (the EPA's emission factor), so a 40-gallon fill is 332 kg. Turbine operators can do the same with Jet A, at 3.15 kg of CO₂ per kg of fuel, the factor our calculator uses. Aerial work, survey and skydiving operators often have these records already.

4. Spend a fixed monthly budget. A club that sets aside $500 a month for offsetting sends {"amount_cents": 50000} once a month. The API buys the most whole kg that fit in the budget, and never charges more than it.

5. Show members and students the total. A read-only key can fetch your totals and recent offsets for a page on your website or a screen in the briefing room, without being able to buy anything. Each certificate has a public link you can share.

What a purchase looks like

This is the whole request for the lesson in example 1. The Idempotency-Key makes it safe to retry: if the network drops and your system sends it again, the API returns the same offset instead of buying twice. Use your booking number in it, so one flight can never be offset twice.

Offset a 1.3-hour lesson in a Cessna 172
curl https://trimcarbon.com/api/v1/offsets \
-H "Authorization: Bearer $TRIMCARBON_KEY" \
-H "Idempotency-Key: booking-48213" \
-H "Content-Type: application/json" \
-d '{"kg": 115, "reference": "Booking 48213, C-GABC"}'

The response says how much was offset and charged. The offset is processing at first, then placed once the credits are retired, with a link to its certificate. The quickstart walks through your first purchase with a test key, and the API reference has examples in curl, Node, Python and PHP.

How to get started

  1. Request access. On the developer page, tell us about your organisation and how much you expect to offset. Your account needs two-factor authentication or a passkey before we approve it, because its keys spend real money.
  2. Build against test keys. A test key (tc_test_…) spends a simulated $1,000 balance that you can reset at any time. Test offsets are placed after a few seconds and retire nothing, so you can try every case, including an empty balance.
  3. Top up. Each top-up is $250 to $10,000 by card, with an invoice, and the balance can hold up to $50,000. For more, we can invoice you.
  4. Switch to a live key. Live keys (tc_live_…) spend your real balance. A key can buy, or only read.

What it costs, and the rules that come with it

Each account has its own rate per kg of CO₂, set when we approve it and shown on your developer page. The standard rate is $0.04 per kg, $40 a tonne, the same as a one-time tonne on our website. That is about 33 cents per gallon of avgas. Large accounts can get a custom rate: tell us your volume when you request access.

A few rules keep the money safe:

  • The balance is prepaid and not refundable. It doesn't expire, it pays only for API purchases, and it is lost if you delete your account. Top up what you expect to use in the coming months, not a year at a time.
  • An empty balance stops purchases. A purchase the balance doesn't cover fails with a clear error, and nothing is bought. You choose a threshold, and we email you when the balance falls below it.
  • Large purchases wait for review. A purchase above 15 tonnes is paid from the balance, then waits for us to check it before the credits are retired, in case a typo turns 150 kg into 150,000.
  • Failed orders come back. If an order can't be placed after our retries, its cost returns to your balance.

Before you tell anyone you're carbon neutral

Offsetting a fleet's CO₂ doesn't undo it: it funds the retirement of rated carbon credits for the same amount, each meant to stand for a tonne avoided or removed elsewhere. So cut your fuel burn first, and check what you can and can't claim after offsetting before it goes on your website.

The certificates help either way. Anyone can check what a certificate shows, down to the serial numbers at the registry, so your claim rests on records, not on our word.

Questions schools and operators ask

Can we offset our students' and renters' flights? Yes. Lessons and rentals in your aircraft are your fleet's emissions. If you want to sell offsets to customers for flights that aren't yours, talk to us first: the API is for offsetting your own flying.

Do we need a developer? Someone who can send an HTTP request from your scheduling system, a script or an automation tool. The quickstart takes a few minutes with a test key. Without anyone technical, a plan or a fleet estimate is the easier path.

How many requests can we send? 60 a minute per key, and one purchase can be as large as 1,000 tonnes. Most fleets need one request per flight or one per day.

Can we keep a plan and use the API? Yes. They're separate: a plan keeps offsetting its fixed amount, and the API offsets what you send. Our pages for flight schools and flying clubs cover the plans, and the school and club guide covers how to fund it.

Burn less first, then offset what's left. See what your fleet adds up to, or request API access.

What does your flying emit?

Pick your aircraft and hours to see the CO₂ and what it costs to offset.

Calculate my hours