REST API

AI Impact Calculator API

Calculate the carbon footprint, energy usage, and water consumption of any AI model call from your own application. One endpoint, zero setup.

Base URL

https://aiimpactcalculator.com/api/v1

Authentication

Pass your API key as a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY
ℹ️

Try it now — no signup needed

Use the demo key aic_demo_key_12345 to make live requests below. Limited to 100 requests/month.

Endpoint

POST/api/v1/calculate

Request Body

FieldTypeRequiredDescription
modelstringYesAI model key (see table below)
tokensnumberYesNumber of tokens (or images for image-gen)
gridstringNoPower grid key (default: global-avg)
custom_wh_per_1knumberConditionalRequired when model is custom

Model Values

modelDescriptionEnergy rate
gpt-4GPT-4 / Claude 3 Opus4.5 Wh / 1k tokens
gpt-3.5GPT-3.5 / Llama-70b0.5 Wh / 1k tokens
llama-7bSmall (7B) Models0.1 Wh / 1k tokens
image-genImage Generation2.9 Wh / image
customCustomProvide custom_wh_per_1k

Grid Values

gridDescriptionIntensity
global-avgGlobal Average475 gCO2e/kWh
us-avgUS Average380 gCO2e/kWh
eu-avgEU Average250 gCO2e/kWh
hydro-greenGreen Grid (Hydro/Wind)20 gCO2e/kWh
coal-heavyCoal Heavy820 gCO2e/kWh

Example Response

{
  "model": "gpt-4",
  "tokens": 50000,
  "grid": "eu-avg",
  "energy_kwh": 0.225,
  "carbon_gco2e": 56.25,
  "water_liters": 0.405,
  "equivalents": {
    "smartphones_charged": 18.75,
    "km_driven": 0.331,
    "led_hours": 25.0,
    "netflix_hours_sd": 0.88,
    "emails_equivalent": 14
  },
  "plan": "free",
  "rate_limit": {
    "limit": 100,
    "remaining": 99,
    "reset_at": "2026-04-01T00:00:00.000Z"
  },
  "methodology_url": "https://aiimpactcalculator.com/methodology"
}

Code Snippets

curl -X POST https://aiimpactcalculator.com/api/v1/calculate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4",
    "tokens": 50000,
    "grid": "eu-avg"
  }'

Error Codes

HTTP StatuscodeMeaning
401UNAUTHORIZEDMissing or invalid API key
400INVALID_MODELUnknown model value
400INVALID_TOKENStokens must be a positive number
400INVALID_GRIDUnknown grid value
400MISSING_CUSTOM_RATEcustom_wh_per_1k required for custom model
400BAD_REQUESTMalformed JSON body
429RATE_LIMIT_EXCEEDEDMonthly request limit reached

Rate Limiting

Limits are per calendar month and reset on the 1st. The current usage is returned in every response under rate_limit, and in these response headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 2026-04-01T00:00:00.000Z

Pricing

PlanPriceRequests/moBest for
Free$0 / mo100Evaluation, personal projects
Indie$9 / mo5,000Solo devs, small apps
Pro$29 / mo50,000SaaS products, agencies
Business$99 / mo500,000Enterprise, ESG reporting

Need a custom plan or higher volume? Contact us.

Try It Live

Uses the demo key. Runs against the real API.

Ready to integrate?

The demo key is rate-limited. Contact us to get a production key, or use the methodology to understand how the numbers are calculated.

Read the Methodology