---
title: TrimCarbon Offset API
description: Buy carbon offsets from your own systems, paid from a prepaid balance.
sidebar:
  label: Introduction
  order: 0
---

The Offset API lets your company buy carbon credits from its own systems: a nightly job that offsets yesterday's fuel use, a script that offsets each shipment, or a button in your internal tools.

## How it works

1. **You request API access** on the [developer page](https://trimcarbon.com/developers/access). We review each request; the API is for businesses that offset their own emissions.
2. **You top up a prepaid USD balance** through Stripe Checkout, from $250. Each top-up comes with an invoice.
3. **You buy offsets** with `POST /offsets`, by volume (`kg`) or by price (`amount_cents`). The cost comes out of your balance at your rate per kg.
4. **We buy and retire the credits** through our supplier, usually within minutes. The offset then shows as `placed`, with a link to its public certificate.

## Base URL

```txt
https://trimcarbon.com/api/v1
```

All requests and responses are JSON. Amounts are in US cents, volumes in whole kg of CO₂.

## Keys

| Key | Spends | Retires credits |
| --- | --- | --- |
| `tc_live_…` | Your real balance | Yes |
| `tc_test_…` | A simulated balance | No |

A key is either **read only** or **read and buy**. See [Authentication](/docs/authentication).

## Next steps

- [Quickstart](/docs/quickstart): your first purchase with a test key.
- [Idempotency](/docs/idempotency): retry safely, never buy twice.
- [API reference](/docs/reference): every endpoint, with a playground.
