TrimCarbon Offsets API

Buy offsets and follow their orders.

GitHub OpenAPI

Operations 4

POST /offsets Buy offsets #
GET /offsets List offsets #
GET /offsets/{id} Get an offset #
POST /quotes Get a quote #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trimcarbon-com:trimcarbon-com-offsets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trimcarbon-com-offsets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TrimCarbon Offset Offsets API
  version: '1'
  description: 'Buy carbon offsets from your own systems. Your account has a prepaid USD balance; each purchase takes its cost from the balance, and we buy and retire the carbon credits for it.


    Every request needs an API key, sent as `Authorization: Bearer tc_live_…`. Test keys (`tc_test_…`) spend a simulated balance: they charge nothing and retire nothing, and their offsets show as placed after a few seconds. Top-ups start at $250, on the developer page.'
  contact:
    email: contact@trimcarbon.com
  termsOfService: https://trimcarbon.com/legal/terms-and-conditions#api
servers:
- url: https://trimcarbon.com/api/v1
security:
- apiKey: []
tags:
- name: Offsets
  description: Buy offsets and follow their orders.
paths:
  /offsets:
    post:
      operationId: createOffset
      tags:
      - Offsets
      summary: Buy offsets
      description: Takes the cost from your balance and orders the credits. The offset starts as `processing`; it becomes `placed` once the credits are retired, usually within minutes. Purchases larger than your account’s review limit wait for our review first. Needs a key with purchase access.
      parameters:
      - name: Idempotency-Key
        in: header
        required: true
        description: 'A unique value per purchase, such as a UUID. Retrying with the same key and body returns the first purchase (with `Idempotent-Replayed: true`) instead of buying again. The same key with a different body is refused with 409.'
        schema:
          type: string
          minLength: 1
          maxLength: 255
        example: 7f8d0c6e-2b1a-4e9f-9d3c-5a6b7c8d9e0f
      requestBody:
        required: true
        description: Exactly one of `kg` (whole kg, up to 1,000,000) and `amount_cents`, and an optional `reference`.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OffsetRequest'
            examples:
              byVolume:
                summary: By volume
                value:
                  kg: 1000
                  reference: fleet-2026-09
              byPrice:
                summary: By price
                value:
                  amount_cents: 5000
      responses:
        '201':
          description: The purchase (or, on a retry, the first one).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offset'
        '400':
          description: Bad JSON, or a missing or invalid Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, unknown or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: '`insufficient_balance`: the balance doesn’t cover the purchase. The error has `balance_cents` and `required_cents`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '`api_access_inactive` (the account is suspended or not approved) or `insufficient_permissions` (a read-only key).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`idempotency_key_reused`: the key was used for a different request.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '`validation_error` (with `param`) or `amount_too_small`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`: wait for the `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    get:
      operationId: listOffsets
      tags:
      - Offsets
      summary: List offsets
      description: Your offsets for this key’s mode, newest first.
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 10
      - name: starting_after
        in: query
        description: The last offset ID of the previous page.
        schema:
          type: string
      - name: reference
        in: query
        description: Only offsets with this `reference`.
        schema:
          type: string
      responses:
        '200':
          description: A page of offsets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OffsetList'
        '401':
          description: Missing, unknown or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '`api_access_inactive` (the account is suspended or not approved) or `insufficient_permissions` (a read-only key).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`resource_missing`: no such offset for this key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '`validation_error` (with `param`) or `amount_too_small`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`: wait for the `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /offsets/{id}:
    get:
      operationId: getOffset
      tags:
      - Offsets
      summary: Get an offset
      description: One offset and its status. Once placed, `certificate_url` links to its public certificate.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        example: off_8Hq2kP0aZr4mXc1vB7nT3yLw
      responses:
        '200':
          description: The offset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offset'
        '401':
          description: Missing, unknown or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '`api_access_inactive` (the account is suspended or not approved) or `insufficient_permissions` (a read-only key).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`resource_missing`: no such offset for this key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`: wait for the `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /quotes:
    post:
      operationId: createQuote
      tags:
      - Offsets
      summary: Get a quote
      description: What a purchase would buy and cost at your rate, and whether your balance covers it. Buys nothing.
      requestBody:
        required: true
        description: Exactly one of `kg` (whole kg, up to 1,000,000) and `amount_cents`, and an optional `reference`.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OffsetRequest'
            examples:
              byVolume:
                summary: By volume
                value:
                  kg: 1000
                  reference: fleet-2026-09
              byPrice:
                summary: By price
                value:
                  amount_cents: 5000
      responses:
        '200':
          description: The quote.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
        '400':
          description: Bad JSON, or a missing or invalid Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, unknown or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '`api_access_inactive` (the account is suspended or not approved) or `insufficient_permissions` (a read-only key).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: '`validation_error` (with `param`) or `amount_too_small`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`rate_limited`: wait for the `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OffsetRequest:
      oneOf:
      - type: object
        properties:
          kg:
            type: integer
            minimum: 1
            maximum: 1000000
            description: kg of CO₂ to offset.
            example: 1000
          reference:
            description: Your own label, such as a trip or invoice ID. Returned as you sent it; never public, never sent to the credit supplier.
            example: fleet-2026-09
            type: string
            minLength: 1
            maxLength: 200
        required:
        - kg
        additionalProperties: false
        title: By volume
      - type: object
        properties:
          amount_cents:
            type: integer
            minimum: 1
            maximum: 5000000
            description: US cents to spend. Buys the most whole kg whose charge fits in this amount.
            example: 5000
          reference:
            description: Your own label, such as a trip or invoice ID. Returned as you sent it; never public, never sent to the credit supplier.
            example: fleet-2026-09
            type: string
            minLength: 1
            maxLength: 200
        required:
        - amount_cents
        additionalProperties: false
        title: By price
    Quote:
      type: object
      properties:
        object:
          type: string
          const: quote
        livemode:
          type: boolean
          description: 'False for test keys: nothing was charged or retired.'
        kg:
          type: integer
        amount_cents:
          type: integer
          description: What the purchase would cost.
        currency:
          type: string
          const: usd
        rate_millicents_per_kg:
          type: integer
          description: 'Your rate in thousandths of a cent per kg: 4000 is $0.04/kg ($40 per tonne).'
          example: 4000
        available_cents:
          type: integer
          description: Your balance now.
        sufficient_balance:
          type: boolean
        requires_review:
          type: boolean
          description: 'The purchase is larger than your account’s automatic limit: it would wait for our review before the credits are retired.'
      required:
      - object
      - livemode
      - kg
      - amount_cents
      - currency
      - rate_millicents_per_kg
      - available_cents
      - sufficient_balance
      - requires_review
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
              - authentication_error
              - permission_error
              - invalid_request_error
              - rate_limit_error
              - api_error
            code:
              type: string
              example: insufficient_balance
            message:
              type: string
            param:
              description: The request field that is wrong.
              type: string
            balance_cents:
              description: 'With `insufficient_balance`: your balance now.'
              type: integer
            required_cents:
              description: 'With `insufficient_balance`: what the purchase costs.'
              type: integer
          required:
          - type
          - code
          - message
          additionalProperties: false
      required:
      - error
      additionalProperties: false
    Offset:
      type: object
      properties:
        object:
          type: string
          const: offset
        id:
          type: string
          example: off_8Hq2kP0aZr4mXc1vB7nT3yLw
        livemode:
          type: boolean
          description: 'False for test keys: nothing was charged or retired.'
        status:
          type: string
          enum:
          - processing
          - placed
          - refunded
          description: '`processing` until the credits are bought and retired; `placed` once they are; `refunded` if we could not place the order and returned the charge to your balance.'
        kg:
          type: integer
          description: kg of CO₂ offset.
        amount_cents:
          type: integer
          description: What the purchase took from your balance.
        currency:
          type: string
          const: usd
        rate_millicents_per_kg:
          type: integer
          description: 'Your rate in thousandths of a cent per kg: 4000 is $0.04/kg ($40 per tonne).'
          example: 4000
        requested:
          type: object
          properties:
            kg:
              anyOf:
              - type: integer
              - type: 'null'
            amount_cents:
              anyOf:
              - type: integer
              - type: 'null'
          required:
          - kg
          - amount_cents
          additionalProperties: false
          description: 'What you asked for: kg, or an amount to spend.'
        reference:
          type:
          - string
          - 'null'
        certificate_url:
          format: uri
          description: The public certificate on trimcarbon.com, once the order is placed. Null for test offsets.
          type:
          - string
          - 'null'
        created:
          type: string
          format: date-time
          example: '2026-10-08T14:03:12.000Z'
        placed:
          anyOf:
          - type: string
            format: date-time
            example: '2026-10-08T14:03:12.000Z'
          - type: 'null'
      required:
      - object
      - id
      - livemode
      - status
      - kg
      - amount_cents
      - currency
      - rate_millicents_per_kg
      - requested
      - reference
      - certificate_url
      - created
      - placed
      additionalProperties: false
      description: One purchase of carbon credits through the API.
    OffsetList:
      type: object
      properties:
        object:
          type: string
          const: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Offset'
        has_more:
          type: boolean
          description: 'More offsets are older than the last one: pass its ID as `starting_after`.'
      required:
      - object
      - data
      - has_more
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'An API key from the developer page: `tc_live_…` for real purchases, `tc_test_…` for tests. Keep it on your server.'