Skip to the main content
GET0 units (free)No API key required

GET /v1/calibration/residuals

Aggregate residual statistics over approved observation records only.

Server: https://gridforge-engine.fly.dev · Operation ID: calibrationResiduals · TS SDK: client.calibrationResiduals()

Behaviour & Evidence Boundary

Per subsystem and per variable: how many approved observations and distinct sites there are, the state, and how many more are still needed. A draft or rejected record changes nothing here, not even a count; no site, hall, record id, free text or measurement is in the payload. With nothing approved it says `uncalibrated` with `n_records` 0. A store whose hash chain is broken answers 503, never an empty or partial answer. Free, no key.

Call via cURL, TypeScript SDK & Python CLI

cURL (HTTPS JSON)
bash
curl -sS -X GET "https://gridforge-engine.fly.dev/v1/calibration/residuals"
TypeScript SDK — client.calibrationResiduals()
ts
import { GridForgeClient } from "@timetopower/gridforge-sdk";

const client = new GridForgeClient();
const result = await client.calibrationResiduals();
console.log(result);
Python stdlib CLI (gridforge)
bash
gridforge calibration report

Request Contract & Input Schema

This read endpoint takes no request body and no required query parameters.

Response Schema, Headers & Error Codes

Responses carry X-GridForge-Schema: gridforge/api/1, x-request-id, metering headers (X-GridForge-Units, X-GridForge-Units-Month, X-GridForge-Units-Remaining), rate-limit headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset), and RFC 9745/8594 Deprecation / Sunset headers when applicable. POST calls accept Idempotency-Key up to 150 characters.

OpenAPI 3.1 200 Response Schema
json
{
  "type": "object",
  "required": [
    "schema",
    "state",
    "n_records",
    "n_sites",
    "headline",
    "requirements",
    "subsystem_states",
    "subsystems",
    "withheld_variables",
    "note",
    "schema_version"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "description": "The engine's API schema id, added to every JSON object response."
    },
    "schema": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "n_records": {
      "type": "integer"
    },
    "n_sites": {
      "type": "integer"
    },
    "headline": {
      "type": "string"
    },
    "requirements": {
      "type": "object"
    },
    "subsystem_states": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "subsystems": {
      "type": "object"
    },
    "withheld_variables": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Variables kept out of the public report."
    },
    "note": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
Error codes returned by GET /v1/calibration/residuals
StatusCondition
400the body is not valid JSON or not a JSON object, or the Idempotency-Key is longer than the limit
401a metered route was called without a key, or with one the engine does not accept
402the key's monthly allowance or cap is spent; the call was refused and not charged. Buy more, do not retry
409the requested action conflicts with current readiness or state (for example require_rfq_ready on an architecture that is not yet RFQ-ready)
422the input is too thin or invalid, or an Idempotency-Key was reused with a different body; nothing was solved
429the per-client request rate limit was exceeded; wait and retry (the limit is rate_limit_per_minute at /v1/version)
503paid endpoints are not configured on that deployment, or a charge could not be recorded durably

Worked Example (examples/intake/reference_hall.json)

SYNTHETIC REFERENCE DATA

SYNTHETIC REFERENCE DATA — every request and response in this file was generated deterministically by running the real GridForge Python engine against examples/intake/reference_hall.json. Not a measurement of any customer asset.

Real Engine Output (Synthetic Hall) — GET /v1/calibration/residuals
json
{
  "schema_version": "gridforge/api/1",
  "schema": "gridforge.calibration.residuals.public/1",
  "state": "uncalibrated",
  "n_records": 0,
  "n_sites": 0,
  "headline": "Calibration is reported per subsystem; no single accuracy figure is produced. envelope: UNCALIBRATED (n=0). grid: UNCALIBRATED (n=0). power: UNCALIBRATED (n=0). thermal: UNCALIBRATED (n=0).",
  "requirements": {
    "min_approved_observations_per_variable": 10,
    "min_distinct_sites_per_variable": 3,
    "low_quality_counts_toward_calibration": false
  },
  "subsystem_states": {
    "envelope": "UNCALIBRATED",
    "grid": "UNCALIBRATED",
    "power": "UNCALIBRATED",
    "thermal": "UNCALIBRATED"
  },
  "subsystems": {
    "envelope": {
      "state": "UNCALIBRATED",
      "approved_observations": 0,
      "distinct_sites": 0,
      "statement": "envelope: UNCALIBRATED (n=0 approved observations). Figures are modelled; accuracy is unquantified.",
      "variables": {
        "facility_load_kW": {
          "unit": "kW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "it_load_kW": {
          "unit": "kW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "racks": {
          "unit": "racks",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        }
      }
    },
    "grid": {
      "state": "UNCALIBRATED",
      "approved_observations": 0,
      "distinct_sites": 0,
      "statement": "grid: UNCALIBRATED (n=0 approved observations). Figures are modelled; accuracy is unquantified.",
      "variables": {
        "grid_firm_MW": {
          "unit": "MW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        }
      }
    },
    "power": {
      "state": "UNCALIBRATED",
      "approved_observations": 0,
      "distinct_sites": 0,
      "statement": "power: UNCALIBRATED (n=0 approved observations). Figures are modelled; accuracy is unquantified.",
      "variables": {
        "btm_firm_MW": {
          "unit": "MW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "transformer_load_kVA": {
          "unit": "kVA",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "ups_load_kW": {
          "unit": "kW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        }
      }
    },
    "thermal": {
      "state": "UNCALIBRATED",
      "approved_observations": 0,
      "distinct_sites": 0,
      "statement": "thermal: UNCALIBRATED (n=0 approved observations). Figures are modelled; accuracy is unquantified.",
      "variables": {
        "coolant_flow_lps": {
          "unit": "L/s",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "coolant_supply_temp_C": {
          "unit": "degC",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "heat_rejection_kW": {
          "unit": "kW",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        },
        "pue": {
          "unit": "ratio",
          "state": "UNCALIBRATED",
          "approved_observations": 0,
          "counting_toward_calibration": 0,
          "distinct_sites": 0,
          "still_needed": {
            "observations": 10,
            "sites": 3
          }
        }
      }
    }
  },
  "withheld_variables": [
    "capex_total_eur",
    "weeks_to_full"
  ],
  "note": "Aggregate statistics over human-approved site observations only. Errors are in each variable's own unit and are never combined into one accuracy figure. A measured-versus-predicted residual describes this engine's past error at the contributing sites; it is not a guarantee for any other site. Capex and schedule residuals are withheld from the public report, as those figures are elsewhere on the public tier."
}