GET /v1/version
What this engine serves, how it meters, and its provenance.
Server: https://gridforge-engine.fly.dev · Operation ID: version · TS SDK: client.version()
Behaviour & Evidence Boundary
The engine's own statement of itself: version and provenance, the routes it serves (`endpoints`), the unit weight of every route (`unit_rates`), the pay-as-you-go terms (`payg`: unit_price_cents, currency, min_invoice_cents, free_allowance_units, billing_rule), the Idempotency-Key rule, the rate limit, and where the machine interfaces and the calibration record are. This is the authoritative source of every price and limit; this document states none. Free, no key.
Call via cURL, TypeScript SDK & Python CLI
curl -sS -X GET "https://gridforge-engine.fly.dev/v1/version"import { GridForgeClient } from "@timetopower/gridforge-sdk";
const client = new GridForgeClient();
const result = await client.version();
console.log(result);gridforge --versionRequest 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.
{
"type": "object",
"required": [
"version",
"provenance",
"auth_configured",
"signed_keys",
"rate_limit_per_minute",
"schema",
"idempotency",
"idempotency_key_max_chars",
"tier",
"endpoints",
"unit_rates",
"payg",
"metering",
"machine_interface",
"calibration",
"schema_version"
],
"properties": {
"schema_version": {
"type": "string",
"description": "The engine's API schema id, added to every JSON object response."
},
"version": {
"type": "string"
},
"provenance": {
"type": "object",
"properties": {
"schema": {
"type": "string"
},
"engine_version": {
"type": "string"
},
"code_sha256": {
"type": "string"
},
"cost_library_sha256": {
"type": "string"
},
"calibration_sha256": {
"type": "string"
},
"digest": {
"type": "string"
},
"report_date": {
"type": "string"
}
}
},
"auth_configured": {
"type": "boolean"
},
"signed_keys": {
"type": "boolean"
},
"rate_limit_per_minute": {
"type": "integer"
},
"schema": {
"type": "string"
},
"idempotency": {
"type": "string"
},
"idempotency_key_max_chars": {
"type": "integer"
},
"tier": {
"type": "string"
},
"endpoints": {
"type": "array",
"items": {
"type": "string"
}
},
"capabilities": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"description": "Behaviour a route has that its path does not show, as named flags. A flag is present and true only when the engine does it; an engine that does not list a flag does not do it. qualify_assumed_fields: POST /v1/qualify accepts an optional assumed_fields, a list of the seven field names it takes (contracted_MW, current_site_peak_MW, current_it_load_MW, busway_ampacity_A, tapoff_max_A, plant_supply_C, positions_available), each at most once and each one the request gives; a named figure is classed E0 (assumed), never E5, in the result's basis; the class cannot be chosen by the caller and a request without the field is answered exactly as before. The response then adds inputs_declared_assumed (what the engine recorded for each figure) and intake.assumed_count; completeness and required_inputs_missing still count a declared figure as supplied."
},
"unit_rates": {
"type": "object",
"additionalProperties": {
"type": "integer"
},
"description": "Units per call by route; a route with weight 0 is free."
},
"payg": {
"type": "object",
"properties": {
"unit_price_cents": {
"type": "integer"
},
"currency": {
"type": "string"
},
"min_invoice_cents": {
"type": "integer"
},
"free_allowance_units": {
"type": "integer"
},
"billing_rule": {
"type": "string"
}
},
"description": "The pay-as-you-go terms: the engine's own statement, the only place this contract's prices live."
},
"metering": {
"type": "object",
"properties": {
"durable": {
"type": "boolean"
},
"ledger_durable": {
"type": "boolean",
"description": "True when a charge is recorded in a durable ledger; an Idempotency-Key survives eviction and restarts only then."
},
"over_quota_status": {
"type": "integer"
},
"note": {
"type": "string"
}
}
},
"machine_interface": {
"type": "object",
"properties": {
"tools": {
"type": "string"
},
"mcp": {
"type": "string"
},
"protocolVersion": {
"type": "string"
}
}
},
"calibration": {
"type": "string"
}
},
"additionalProperties": true
}| Status | Condition |
|---|---|
| 400 | the body is not valid JSON or not a JSON object, or the Idempotency-Key is longer than the limit |
| 401 | a metered route was called without a key, or with one the engine does not accept |
| 402 | the key's monthly allowance or cap is spent; the call was refused and not charged. Buy more, do not retry |
| 409 | the requested action conflicts with current readiness or state (for example require_rfq_ready on an architecture that is not yet RFQ-ready) |
| 422 | the input is too thin or invalid, or an Idempotency-Key was reused with a different body; nothing was solved |
| 429 | the per-client request rate limit was exceeded; wait and retry (the limit is rate_limit_per_minute at /v1/version) |
| 503 | paid endpoints are not configured on that deployment, or a charge could not be recorded durably |
Worked Example (examples/intake/reference_hall.json)
SYNTHETIC REFERENCE DATASYNTHETIC 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.
{
"schema_version": "gridforge/api/1",
"version": "0.9.0",
"provenance": {
"schema": "gridforge/provenance/1",
"engine_version": "0.9.0",
"code_sha256": "513ef0ec9c09e9075f84882f57c09db627f377a5eb563cdbd530eb591723b05d",
"cost_library_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
"calibration_sha256": "225e762caa8cb172d84527d9dafc91d35fa66926b5536689e683325e81945c89",
"digest": "7469d0c89429794a8a8eab67792aa3044ee8c2536f8e69bdd645df912c5f98a9",
"report_date": "2026-11-27"
},
"auth_configured": true,
"signed_keys": false,
"rate_limit_per_minute": 30,
"schema": "gridforge/api/1",
"idempotency": "send an Idempotency-Key header (at most 150 characters) on a POST, or on an /mcp tools/call, to make a retry free and identical",
"idempotency_key_max_chars": 150,
"tier": "public",
"endpoints": [
"/v1/bids",
"/v1/compare",
"/v1/deck",
"/v1/diff",
"/v1/estimate",
"/v1/portfolio"
],
"capabilities": {
"qualify_assumed_fields": true
},
"unit_rates": {
"/mcp": 0,
"/v1/bids": 2,
"/v1/calibration": 0,
"/v1/calibration/residuals": 0,
"/v1/compare": 1,
"/v1/deck": 3,
"/v1/diff": 2,
"/v1/estimate": 0,
"/v1/portfolio": 1,
"/v1/power/assess": 5,
"/v1/power/deploy/assess": 5,
"/v1/power/deploy/bids": 2,
"/v1/power/deploy/spec": 3,
"/v1/proposal": 2,
"/v1/qualify": 0,
"/v1/screen": 1,
"/v1/spec": 3,
"/v1/study": 5,
"/v1/tools": 0,
"/v1/usage": 0
},
"payg": {
"unit_price_cents": 200,
"currency": "eur",
"min_invoice_cents": 500,
"free_allowance_units": 25,
"billing_rule": "A month's charge is the net ledger units for the UTC month (charges minus refunds) at €2 a unit, invoiced monthly in arrears. A month whose charge is under the €5 minimum invoice is not invoiced on its own: it is carried forward and added to the next month, and so on from month to month. A balance that never reaches €5 is never invoiced. A request that is rejected, unauthorised, invalid or fails is refunded and never charged, and a retry with the same Idempotency-Key is never charged twice. Free-allowance usage is never invoiced. The customer's own monthly cap is a hard stop: beyond it the engine answers 402 and nothing more accrues."
},
"metering": {
"durable": false,
"ledger_durable": false,
"over_quota_status": 402,
"note": "Units are published so a caller can predict a bill before making the call. A meter whose rate is secret is a meter nobody integrates against."
},
"machine_interface": {
"tools": "/v1/tools",
"mcp": "/mcp",
"protocolVersion": "2026-11-27"
},
"calibration": "/v1/calibration"
}