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

GET /v1/calibration

How far the model has been reconciled against instrumented sites.

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

Behaviour & Evidence Boundary

The accuracy record, public precisely because the answer can be "none": `state` is uncalibrated, indicative or calibrated, with the counts behind it (observations, sites, halls, outputs asserted and outputs with site observations) and a `policy`. Only the published ledger is read; an observation a client supplied never reaches it. If the ledger fails its integrity check the route answers 503 with state "unavailable" rather than an empty or partial record. 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"
TypeScript SDK — client.calibration()
ts
import { GridForgeClient } from "@timetopower/gridforge-sdk";

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

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
{
  "allOf": [
    {
      "$ref": "#/components/schemas/CalibrationBlock"
    },
    {
      "type": "object",
      "required": [
        "ledger_sources",
        "policy",
        "schema_version"
      ],
      "properties": {
        "schema_version": {
          "type": "string",
          "description": "The engine's API schema id, added to every JSON object response."
        },
        "ledger_sources": {
          "type": "integer"
        },
        "policy": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  ]
}
Error codes returned by GET /v1/calibration
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
json
{
  "schema_version": "gridforge/api/1",
  "state": "uncalibrated",
  "statement": "Model accuracy against instrumented sites has not been established: 0 reconciled observations across 0 sites, covering 0 of 20 model outputs. Every figure in this report is modelled. The uncertainty ranges shown come from input uncertainty propagated through the model, not from the difference between this engine's predictions and site data — no such difference has been recorded yet.",
  "observations": 0,
  "observations_total": 0,
  "observations_without_source_ref": 0,
  "sites": 0,
  "halls": 0,
  "keys_asserted": 20,
  "keys_with_site_observations": 0,
  "keys_calibrated": 0,
  "coverage": 0,
  "keys": [],
  "uncalibrated_keys": [
    "btm.firm_MW",
    "constraint.architecture_capability.racks",
    "constraint.busway_ampacity.racks",
    "constraint.cdu_capacity.racks",
    "constraint.floor_loading.racks",
    "constraint.floor_space.racks"
  ],
  "ledger_sources": 1,
  "policy": "An observation must be E5 or above — site data, not another run of our own model — and client site data never enters the published ledger."
}