Saltar al contenido
AIWaterUse.org
EN
Menú
↑ ↓ para moverte · Enter para abrir · Esc para cerrar

Desarrolladores

API

Un endpoint, gratis, CORS abierto, sin clave. Devuelve las mismas cifras que muestra la calculadora, con los tres escenarios y la versión de los coeficientes. Pedimos un enlace a aiwateruse.org al publicar cifras obtenidas de él.

Endpoint

GEThttps://aiwateruse.org/api/v1/estimate?model=claude-sonnet&tokens=86000000&scenario=mid

Pruébalo

Parámetros

model
Id del sitio (claude-sonnet) o nombre de API (claude-sonnet-4). Obligatorio. Valores inválidos devuelven la lista completa de modelos.
tokens
Tokens totales: 86000000, 86.000.000 y 86M funcionan. Para modelos de imagen/vídeo es el número de generaciones.
prompts / period
Alternativa a tokens: prompts por día, con period=day|month|year opcional (por defecto day).
scenario
low | mid | high (por defecto mid). Elige qué escenario describe el bloque de equivalentes; siempre se devuelven los tres.

Atribución

Libre para cualquier uso. Al publicar cifras de esta API, enlaza a aiwateruse.org; eso mantiene los datos al día.

Ejemplo

{
  "input": {
    "model": "claude-sonnet",
    "modelLabel": "Claude Sonnet",
    "class": "standard",
    "units": 86000000,
    "unitKind": "tokens",
    "scenario": "mid"
  },
  "energyKwh": {
    "low": 34.4,
    "mid": 68.8,
    "high": 129
  },
  "water": {
    "low": {
      "liters": 20.64,
      "gallons": 5.45251
    },
    "mid": {
      "liters": 344,
      "gallons": 90.8752
    },
    "high": {
      "liters": 2064,
      "gallons": 545.251
    }
  },
  "carbonKg": {
    "low": 3.44,
    "mid": 24.08,
    "high": 34.4
  },
  "equivalents": {
    "scenario": "mid",
    "water": [
      {
        "id": "almond",
        "count": 86,
        "sediment": true,
        "kind": "water"
      },
      {
        "id": "toilet-flush",
        "count": 57.3333,
        "sediment": false,
        "kind": "water"
      },
      {
        "id": "coffee",
        "count": 2.64615,
        "sediment": true,
        "kind": "water"
      },
      {
        "id": "home-day",
        "count": 1.10968,
        "sediment": false,
        "kind": "water"
      }
    ],
    "energy": [
      {
        "id": "ev-mile",
        "count": 229.333,
        "sediment": false,
        "kind": "energy"
      },
      {
        "id": "household-day",
        "count": 2.37241,
        "sediment": false,
        "kind": "energy"
      }
    ],
    "carbon": [
      {
        "id": "car-mile",
        "count": 60.2,
        "sediment": false,
        "kind": "carbon"
      },
      {
        "id": "tree-year",
        "count": 1.14667,
        "sediment": true,
        "kind": "carbon"
      }
    ]
  },
  "meta": {
    "coefficientsVersion": "1.3.1",
    "scenarios": {
      "low": "cooling only",
      "mid": "cooling + electricity generation",
      "high": "full lifecycle: + training amortization + hardware manufacturing"
    },
    "note": "Estimates, not measurements. Energy band reflects benchmark variance; water/carbon are computed from mid energy times the scenario factor.",
    "methodology": "https://aiwateruse.org/methodology",
    "attribution": "Please link to https://aiwateruse.org when citing these figures."
  }
}