Materials-first carbon API for AI agents and product teams.

Karboncheck helps AI agents estimate and compare the carbon footprint of materials to support low-carbon decisions, while keeping a broader general-purpose backend behind the scenes.

Supported Domains (v1)

Materials

Status: supported

Primary focus for v1. Steel, aluminium, plastics, inox, beton.

Transport

Status: partial

Useful for many cases, but not the primary product focus.

Food

Status: experimental

Still available, but not the quality priority for the beta launch.

Materials Use Cases

Estimate a material

Estimate 1 tonne of aluminium or 100 kg of plastic in one API call.

Compare two options

Compare steel vs aluminium for the same quantity and keep the lower-carbon option.

Feed an AI agent

Ask an agent which material is lower carbon and let it call search, estimate, or compare-materials.

Integration Flow

1. Register

Call POST /api/register with an email address to receive an API key once.

2. Store the key

Keep the API key in a secret manager or environment variable. Do not embed it in browser-side code.

3. Search or estimate

Use GET /api/recherche for discovery, POST /api/estimate for a single material estimate, or POST /api/compare-materials for a low-carbon comparison.

4. Monitor usage

Call GET /api/my-usage to detect exhausted quota before retry loops or agent workflows build up.

Endpoint Reference

GET
/ping
Auth: Public

Health check for uptime and basic connectivity.

curl
curl "https://www.karboncheck.com/ping"
Success response
{"status": "ok"}
POST
/api/register
Auth: Public

Create an account and return a new API key.

Payload
{
  "email": "dev@example.com"
}
curl
curl -X POST "https://www.karboncheck.com/api/register" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "dev@example.com"
  }'
Success response
{
  "api_key": "<generated_api_key>"
}
Quota is assigned server-side and cannot be overridden by public clients.
The API key is shown only once. Store it immediately in a secret manager or environment variable.
GET
/api/my-usage
Auth: Bearer API key

Return current usage, quota, and remaining calls.

curl
curl "https://www.karboncheck.com/api/my-usage" \
  -H "Authorization: Bearer <api_key>"
Success response
{
  "calls_used": 12,
  "quota": 100,
  "calls_remaining": 88,
  "created_at": "2026-03-16T10:00:00Z"
}
GET
/api/recherche
Auth: Bearer API key

Search emission factors and return grouped results plus an agent-ready block.

Payload
Query string: ?query=aluminium
curl
curl "https://www.karboncheck.com/api/recherche?query=aluminium" \
  -H "Authorization: Bearer <api_key>"
Success response
{
  "ambigue": true,
  "regroupements": [...],
  "agent": {
    "best_match": {...},
    "warnings": [...],
    "alternatives": [...]
  }
}
POST
/api/estimate
Auth: Bearer API key

Estimate total emissions from a structured quantity and activity payload.

Payload
{
  "query": "aluminium",
  "quantity": 1,
  "unit": "tonne",
  "source": "auto"
}
curl
curl -X POST "https://www.karboncheck.com/api/estimate" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "aluminium",
    "quantity": 1,
    "unit": "tonne",
    "source": "auto"
  }'
Success response
{
  "query": "1 tonne aluminium",
  "matched_query": "aluminium",
  "factor_name": "Aluminium – neuf",
  "factor_value": 7803.0,
  "factor_unit": "kgCO2e/tonne",
  "result_kgco2e": 7803.0,
  "result_unit": "kgCO2e",
  "warnings": [...],
  "alternatives": [...]
}
The `unit` field is optional for count-based activities such as devices.
The pair `factor_value` + `factor_unit` is the emission factor; `result_kgco2e` is the total footprint for the requested quantity.
POST
/api/compare-materials
Auth: Bearer API key

Compare multiple material options and return a low-carbon ranking.

Payload
{
  "options": ["steel", "aluminium"],
  "quantity": 1,
  "unit": "tonne",
  "source": "auto"
}
curl
curl -X POST "https://www.karboncheck.com/api/compare-materials" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "options": ["steel", "aluminium"],
    "quantity": 1,
    "unit": "tonne",
    "source": "auto"
  }'
Success response
{
  "quantity": 1,
  "unit": "tonne",
  "ranking": ["steel", "aluminium"],
  "best_low_carbon_option": "steel",
  "options": [...],
  "warnings": [...]
}
v1 ranking is strictly based on the lowest estimated kgCO2e result for the shared quantity and unit.
If one option cannot be resolved, it is returned with a warning instead of failing the whole comparison.
GET
/mcp.json
Auth: Public

Lightweight manifest describing the current MCP preparation status.

curl
curl "https://www.karboncheck.com/mcp.json"
Success response
{
  "name": "Karboncheck",
  "status": "experimental",
  "transport": {"implemented": false},
  "tools": [...]
}
GET
/openapi.json
Auth: Public

Machine-readable OpenAPI schema generated by FastAPI.

curl
curl "https://www.karboncheck.com/openapi.json"
Success response
{"openapi": "3.1.0", "...": "..."}

Common Error Codes

HTTP Routes Meaning Recommended action
401 /api/recherche, /api/estimate, /api/my-usage API key missing or invalid. Check the Authorization header format: Bearer <api_key>.
404 /api/estimate, /api/compare-materials No compatible factor was found for the request. Inspect the query wording, unit, and warnings returned by /api/recherche.
422 /api/register, /api/recherche, /api/estimate, /api/compare-materials Payload or query parameters are invalid. Check required fields, empty strings, and strictly positive quantities.
429 /api/recherche, /api/estimate, /api/compare-materials, /api/my-usage Quota reached or rate limit exceeded. Call /api/my-usage and retry later or request a fresh key through the intended onboarding flow.

Copy-Paste Snippets

JavaScript fetch

const apiKey = process.env.KARBONCHECK_API_KEY;

const response = await fetch("https://www.karboncheck.com/api/estimate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    query: "aluminium",
    quantity: 1,
    unit: "tonne",
    source: "auto",
  }),
});

const data = await response.json();
console.log(data);

Python requests

import os
import requests

api_key = os.environ["KARBONCHECK_API_KEY"]
response = requests.post(
    "https://www.karboncheck.com/api/estimate",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "query": "steel",
        "quantity": 1,
        "unit": "tonne",
        "source": "auto",
    },
    timeout=10,
)
response.raise_for_status()
print(response.json())

JavaScript compare materials

const apiKey = process.env.KARBONCHECK_API_KEY;

const compare = await fetch(
  "https://www.karboncheck.com/api/compare-materials",
  {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${apiKey}`,
  },
  body: JSON.stringify({
    options: ["steel", "aluminium"],
    quantity: 1,
    unit: "tonne"
  }),
});
console.log(await compare.json());

Python compare materials

import os
import requests

api_key = os.environ["KARBONCHECK_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}"}

compare = requests.post(
    "https://www.karboncheck.com/api/compare-materials",
    headers=headers,
    json={
        "options": ["steel", "aluminium"],
        "quantity": 1,
        "unit": "tonne",
    },
    timeout=10,
)
compare.raise_for_status()
print(compare.json())

Beta Pricing

Freemium with hard stop

Free plan: 100 req/month

You reached your quota. Request higher usage.

Request higher usage

Real Error Examples

401 Unauthorized

Missing or invalid API key on /api/recherche, /api/estimate, /api/compare-materials, or /api/my-usage.

{
  "detail": "API key is missing."
}
404 Not Found

No compatible factor found on /api/estimate or no option could be resolved in a comparison.

{
  "detail": "No compatible emission factor was found."
}
422 Unprocessable Entity

Invalid payload, empty query, or non-positive quantity.

{
  "detail": "The 'quantity' field must be strictly positive."
}
429 Too Many Requests

Quota reached or rate limit exceeded.

{
  "detail": "You reached your quota. Request higher usage."
}

FAQ

What should I do if my API key is blocked?

Check /api/my-usage first. A 401 means the key is missing or invalid. A 429 means the quota has been exhausted or the rate limit was exceeded. During the beta, higher usage requests are handled manually through the pricing page.

Can I use the API inside an LLM or agent workflow?

Yes. /api/recherche, /api/estimate, and /api/compare-materials return structured fields for best match, warnings, alternatives, and low-carbon ranking. The Python module src/tools/agent_tools.py also provides a transport-independent tool layer.

How do I report a data or matching issue?

Open an issue or share the route, payload, HTTP status, raw response, and the expected result so the case can be reproduced quickly.