POST /v1/portfolio
Rank halls.
Server: https://gridforge-engine.fly.dev · Operation ID: gridforge_portfolio · TS SDK: client.portfolio()
Behaviour & Evidence Boundary
Rank halls. Many intakes in (at most 50 halls in one request; a larger estate is several requests), an ordered list out: racks, weeks to power, capex per rack and what binds first for each. A hall that is not ranked on a figure (no deployable rack, a required input missing or an equipment bank undeclared) is listed after the ranked ones with rank null. Bills one unit per hall. Returns: halls ranked against the objective, each marked rankable or not (a hall with a required input missing or an equipment bank undeclared is ranked on assumptions and kept out of the comparable total), with the comparable total of deployable racks, an upper-bound total that counts halls on one connection once each, the halls left out and a constraint roll-up; with format md or html, also the rendered document and a model pack per hall. Every numeric field in a response carries an evidence class (E0 assumed … E7 observed in operation) and a provenance digest. An agent consuming these must not present an E0 or E1 figure as a property of the physical asset. The calibration block states how far this engine has been reconciled against site data; where it says uncalibrated, it means uncalibrated.
Call via cURL, TypeScript SDK & Python CLI
curl -sS -X POST "https://gridforge-engine.fly.dev/v1/portfolio" \
-H "Authorization: Bearer $GRIDFORGE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"intakes":[{"project":{"client":"Reference Project (synthetic)","reference":"REF-EU-01/DH-02","objective":"max_compute","note":"SYNTHETIC REFERENCE DATA — not a customer asset. Used to demonstrate the deliverable."},"site":{"id":"REF-EU-01","name":"Reference Colocation Campus","country":"DE","metro":"Frankfurt","design_drybulb_C":34,"design_wetbulb_C":21},"hall":{"id":"DH-02","build_year":2015,"floor_type":"raised_floor","net_white_space_m2":2400,"floor_loading_kPa":{"value":12,"note":"Design value from the building record, not a survey"},"clear_height_m":3.2,"aisle_pitch_m":2.4,"rack_positions":560,"positions_available":180,"design_density_kW_per_rack":8,"containment":"cold_aisle"},"grid":{"dso":"Reference DSO","firm_capacity_MVA":14,"power_factor":0.97,"contracted_MW":12,"current_site_peak_MW":{"value":7.4,"note":"12 months of half-hourly metered data"},"current_it_load_MW":4.9,"queue_note":"Assumed for this synthetic hall: no increase in connection capacity is available inside the study horizon. The existing firm capacity is therefore the asset, and the whole question is how much compute can be produced from it."},"transformers":[{"id":"TX-A/B","unit_rating_MVA":5,"units":3,"redundancy":"N+1","derating_factor":0.9,"replacement_lead_time_weeks":160}],"ups":[{"id":"UPS-1","unit_rating_kW":1200,"units":6,"redundancy":"N+1","step_load_capability":0.5}],"lv":{"voltage_V":400,"phases":3,"busway_ampacity_A":{"value":400,"note":"Legacy 400 A busway; modern AI halls use 800-1000 A"},"busway_runs":8,"busway_utilisation_limit":0.8,"tapoff_max_A":63},"thermal":{"plant":{"id":"CH-PLANT","chilled_water_capacity_kW":6800,"design_supply_C":{"value":6,"note":"Legacy low-temperature plant"},"design_return_C":12,"pump_flow_capacity_l_per_min":9000,"available_head_kPa":250,"free_cooling_hours_per_year":2600},"residual_air_capacity_kW_per_rack":{"value":9,"evidence":"E3","note":"Derived from hall design density and containment; confirm by measurement"},"cdus":[]},"compute":{"platform":"gb300_nvl72","utilisation":0.75,"default_architecture":"hybrid_dlc"},"btm_options":[{"id":"BESS-2MW-8MWh","kind":"bess","capacity_MW":2,"capex_eur_per_kW":900,"lead_time_weeks":30,"firm":true,"firm_capacity_factor":0.5,"permitting_note":"No combustion consent required; grid-code compliance and fire separation govern the programme."},{"id":"GEN-5MW","kind":"gas_engine","capacity_MW":5,"capex_eur_per_kW":800,"lead_time_weeks":44,"firm":true,"opex_eur_per_MWh":95,"annual_run_hours":5000,"fixed_om_eur_per_kW_year":18,"permitting_note":"Emissions consent and fuel supply are the schedule risk, not the equipment."}],"economics":{"horizon_years":10},"scenarios":["retained_air","rdhx","hybrid_dlc","full_dlc","full_dlc_btm"]}],"objective":"max_compute","format":"json"}'import { GridForgeClient } from "@timetopower/gridforge-sdk";
const client = new GridForgeClient({ apiKey: process.env.GRIDFORGE_API_KEY });
const result = await client.portfolio({
"intakes": [
{
"project": {
"client": "Reference Project (synthetic)",
"reference": "REF-EU-01/DH-02",
"objective": "max_compute",
"note": "SYNTHETIC REFERENCE DATA — not a customer asset. Used to demonstrate the deliverable."
},
"site": {
"id": "REF-EU-01",
"name": "Reference Colocation Campus",
"country": "DE",
"metro": "Frankfurt",
"design_drybulb_C": 34,
"design_wetbulb_C": 21
},
"hall": {
"id": "DH-02",
"build_year": 2015,
"floor_type": "raised_floor",
"net_white_space_m2": 2400,
"floor_loading_kPa": {
"value": 12,
"note": "Design value from the building record, not a survey"
},
"clear_height_m": 3.2,
"aisle_pitch_m": 2.4,
"rack_positions": 560,
"positions_available": 180,
"design_density_kW_per_rack": 8,
"containment": "cold_aisle"
},
"grid": {
"dso": "Reference DSO",
"firm_capacity_MVA": 14,
"power_factor": 0.97,
"contracted_MW": 12,
"current_site_peak_MW": {
"value": 7.4,
"note": "12 months of half-hourly metered data"
},
"current_it_load_MW": 4.9,
"queue_note": "Assumed for this synthetic hall: no increase in connection capacity is available inside the study horizon. The existing firm capacity is therefore the asset, and the whole question is how much compute can be produced from it."
},
"transformers": [
{
"id": "TX-A/B",
"unit_rating_MVA": 5,
"units": 3,
"redundancy": "N+1",
"derating_factor": 0.9,
"replacement_lead_time_weeks": 160
}
],
"ups": [
{
"id": "UPS-1",
"unit_rating_kW": 1200,
"units": 6,
"redundancy": "N+1",
"step_load_capability": 0.5
}
],
"lv": {
"voltage_V": 400,
"phases": 3,
"busway_ampacity_A": {
"value": 400,
"note": "Legacy 400 A busway; modern AI halls use 800-1000 A"
},
"busway_runs": 8,
"busway_utilisation_limit": 0.8,
"tapoff_max_A": 63
},
"thermal": {
"plant": {
"id": "CH-PLANT",
"chilled_water_capacity_kW": 6800,
"design_supply_C": {
"value": 6,
"note": "Legacy low-temperature plant"
},
"design_return_C": 12,
"pump_flow_capacity_l_per_min": 9000,
"available_head_kPa": 250,
"free_cooling_hours_per_year": 2600
},
"residual_air_capacity_kW_per_rack": {
"value": 9,
"evidence": "E3",
"note": "Derived from hall design density and containment; confirm by measurement"
},
"cdus": []
},
"compute": {
"platform": "gb300_nvl72",
"utilisation": 0.75,
"default_architecture": "hybrid_dlc"
},
"btm_options": [
{
"id": "BESS-2MW-8MWh",
"kind": "bess",
"capacity_MW": 2,
"capex_eur_per_kW": 900,
"lead_time_weeks": 30,
"firm": true,
"firm_capacity_factor": 0.5,
"permitting_note": "No combustion consent required; grid-code compliance and fire separation govern the programme."
},
{
"id": "GEN-5MW",
"kind": "gas_engine",
"capacity_MW": 5,
"capex_eur_per_kW": 800,
"lead_time_weeks": 44,
"firm": true,
"opex_eur_per_MWh": 95,
"annual_run_hours": 5000,
"fixed_om_eur_per_kW_year": 18,
"permitting_note": "Emissions consent and fuel supply are the schedule risk, not the equipment."
}
],
"economics": {
"horizon_years": 10
},
"scenarios": [
"retained_air",
"rdhx",
"hybrid_dlc",
"full_dlc",
"full_dlc_btm"
]
}
],
"objective": "max_compute",
"format": "json"
}, { idempotencyKey: "run-001" });
console.log(result);gridforge portfolio examples/intake/reference_hall.json --remoteRequest Contract & Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
| intakes | array | required | The halls to rank, one intake each: at most 50 per request (more is refused with 422 and nothing is charged; send the rest as further requests). |
| objective | string | optional | What the recommendation optimises for. |
| format | string | optional | json: the ranking rows. md or html: also the rendered Portfolio Screen document and one model pack per hall, from the same solve. |
| client | string | optional | the name printed on the rendered document (format md or html) |
{
"type": "object",
"required": [
"intakes"
],
"properties": {
"intakes": {
"type": "array",
"items": {
"type": "object",
"description": "A GridForge intake document. GET /v1/intake/template for the blank form with every field, or supply a sparse one — anything absent is filled from library defaults and reported as an assumption. Optional hall.occupied_positions (a non-negative whole number, or {value, evidence, note, source}; E5 when you supply it, never higher) is the number of rack positions already occupied. Omitted, the engine does not know it: it is listed as an optional gap, and the busway check against the load already in the hall reads every position that is not free as occupied and says so as an assumption (E0). Declare 0 to confirm that nothing is occupied. It changes no rack count, cost or date.",
"additionalProperties": true
},
"minItems": 1,
"maxItems": 50,
"description": "The halls to rank, one intake each: at most 50 per request (more is refused with 422 and nothing is charged; send the rest as further requests)."
},
"objective": {
"type": "string",
"enum": [
"max_compute",
"min_cost",
"fastest"
],
"default": "max_compute",
"description": "What the recommendation optimises for."
},
"format": {
"type": "string",
"enum": [
"json",
"md",
"html"
],
"default": "json",
"description": "json: the ranking rows. md or html: also the rendered Portfolio Screen document and one model pack per hall, from the same solve."
},
"client": {
"type": "string",
"maxLength": 120,
"description": "the name printed on the rendered document (format md or html)"
}
},
"additionalProperties": false
}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"
}| 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.
{
"intakes": [
{
"project": {
"client": "Reference Project (synthetic)",
"reference": "REF-EU-01/DH-02",
"objective": "max_compute",
"note": "SYNTHETIC REFERENCE DATA — not a customer asset. Used to demonstrate the deliverable."
},
"site": {
"id": "REF-EU-01",
"name": "Reference Colocation Campus",
"country": "DE",
"metro": "Frankfurt",
"design_drybulb_C": 34,
"design_wetbulb_C": 21
},
"hall": {
"id": "DH-02",
"build_year": 2015,
"floor_type": "raised_floor",
"net_white_space_m2": 2400,
"floor_loading_kPa": {
"value": 12,
"note": "Design value from the building record, not a survey"
},
"clear_height_m": 3.2,
"aisle_pitch_m": 2.4,
"rack_positions": 560,
"positions_available": 180,
"design_density_kW_per_rack": 8,
"containment": "cold_aisle"
},
"grid": {
"dso": "Reference DSO",
"firm_capacity_MVA": 14,
"power_factor": 0.97,
"contracted_MW": 12,
"current_site_peak_MW": {
"value": 7.4,
"note": "12 months of half-hourly metered data"
},
"current_it_load_MW": 4.9,
"queue_note": "Assumed for this synthetic hall: no increase in connection capacity is available inside the study horizon. The existing firm capacity is therefore the asset, and the whole question is how much compute can be produced from it."
},
"transformers": [
{
"id": "TX-A/B",
"unit_rating_MVA": 5,
"units": 3,
"redundancy": "N+1",
"derating_factor": 0.9,
"replacement_lead_time_weeks": 160
}
],
"ups": [
{
"id": "UPS-1",
"unit_rating_kW": 1200,
"units": 6,
"redundancy": "N+1",
"step_load_capability": 0.5
}
],
"lv": {
"voltage_V": 400,
"phases": 3,
"busway_ampacity_A": {
"value": 400,
"note": "Legacy 400 A busway; modern AI halls use 800-1000 A"
},
"busway_runs": 8,
"busway_utilisation_limit": 0.8,
"tapoff_max_A": 63
},
"thermal": {
"plant": {
"id": "CH-PLANT",
"chilled_water_capacity_kW": 6800,
"design_supply_C": {
"value": 6,
"note": "Legacy low-temperature plant"
},
"design_return_C": 12,
"pump_flow_capacity_l_per_min": 9000,
"available_head_kPa": 250,
"free_cooling_hours_per_year": 2600
},
"residual_air_capacity_kW_per_rack": {
"value": 9,
"evidence": "E3",
"note": "Derived from hall design density and containment; confirm by measurement"
},
"cdus": []
},
"compute": {
"platform": "gb300_nvl72",
"utilisation": 0.75,
"default_architecture": "hybrid_dlc"
},
"btm_options": [
{
"id": "BESS-2MW-8MWh",
"kind": "bess",
"capacity_MW": 2,
"capex_eur_per_kW": 900,
"lead_time_weeks": 30,
"firm": true,
"firm_capacity_factor": 0.5,
"permitting_note": "No combustion consent required; grid-code compliance and fire separation govern the programme."
},
{
"id": "GEN-5MW",
"kind": "gas_engine",
"capacity_MW": 5,
"capex_eur_per_kW": 800,
"lead_time_weeks": 44,
"firm": true,
"opex_eur_per_MWh": 95,
"annual_run_hours": 5000,
"fixed_om_eur_per_kW_year": 18,
"permitting_note": "Emissions consent and fuel supply are the schedule risk, not the equipment."
}
],
"economics": {
"horizon_years": 10
},
"scenarios": [
"retained_air",
"rdhx",
"hybrid_dlc",
"full_dlc",
"full_dlc_btm"
]
}
],
"objective": "max_compute",
"format": "json"
}{
"schema_version": "gridforge/api/1",
"objective": "max_compute",
"halls": [
{
"rank": 1,
"site": "Reference Colocation Campus",
"hall": "DH-02",
"metro": "Frankfurt",
"racks": 62,
"racks_evidence": "E0_ASSUMPTION",
"weeks_to_full": 160,
"weeks_band": [
104,
216
],
"weeks_evidence": "E0_ASSUMPTION",
"schedule_complete": true,
"date_basis": "assumed",
"date_evidence_class": "E0",
"date_binding_item": "Transformer capacity",
"date_label": "assumed lead time, not a date (E0; set by transformer capacity)",
"capex_eur": 18842000,
"capex_band_eur": [
9421000,
37684000
],
"capex_evidence": "E0_ASSUMPTION",
"capex_complete": false,
"decision_grade": false,
"economics_limitations": [
"the capex total is a LOWER BOUND: no price exists for CDU commissioning and flushing (7 x unit, needed in 5 places); CDU hydraulic integration and controls (7 x unit, needed in 5 places); dedicated heat-rejection loop (dry coolers, pumps, pipework) (1 x loop, needed in 1 place)",
"the weakest priced line is class E0, below E3: a decision needs every priced line at an engineering estimate or better",
"the capex total inherits class E0 from its inputs, below E3",
"8 of 8 priced lines are library placeholders, not prices",
"the grid electricity price is a placeholder (140 EUR/MWh), not the site's tariff",
"installed behind-the-meter generation has no usable operating cost: BESS-2MW-8MWh: annual_run_hours not declared; BESS-2MW-8MWh: no energy cost basis (declare opex_eur_per_MWh, or fuel_price_eur_per_MWh with electrical_efficiency); BESS-2MW-8MWh: variable_om_eur_per_MWh not declared (0 if the fuel route already includes it); BESS-2MW-8MWh: fixed_om_eur_per_kW_year not declared (0 if carried elsewhere). The energy cost prices all energy at the grid tariff"
],
"capex_per_rack_eur": 303903.22580645164,
"capex_per_rack_band_eur": [
151951.61290322582,
607806.4516129033
],
"binds_first": "Rack feed / tap-off rating",
"intake_completeness": 0.839,
"rank_note": "capex is a lower bound; unpriced: CDU commissioning and flushing; CDU hydraulic integration and controls; dedicated heat-rejection loop (dry coolers, pumps, pipework)",
"required_gaps": [],
"unassessed_banks": [],
"rankable": true,
"rankable_reason": "all required inputs supplied, every equipment bank declared and no supplied inputs contradicting each other",
"evidence_floor": "E0_ASSUMPTION",
"shares_site_connection": [],
"likely_shares_connection_with": [],
"position": 1
}
],
"total_racks": 62,
"total_racks_evidence": "E0_ASSUMPTION",
"calibration": {
"state": "uncalibrated",
"statement": "Model accuracy against instrumented sites has not been established: 0 reconciled observations across 0 sites, covering 0 of 3 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": 3,
"keys_with_site_observations": 0,
"keys_calibrated": 0,
"coverage": 0,
"keys": [],
"uncalibrated_keys": [
"constraint.rack_feed_tapoff.racks",
"envelope.racks",
"envelope.it_load_kW"
]
},
"total_racks_upper_bound": 62,
"total_racks_by_site_max": 62,
"comparable_total_racks": 62,
"comparable_total_racks_by_site_max": 62,
"comparable_total_racks_evidence": "E0_ASSUMPTION",
"incomparable_halls": [],
"constraint_rollup": {
"as_found": [
{
"constraint": "Rack feed / tap-off rating",
"halls": 1,
"incomparable_halls": 0,
"members": [
"Reference Colocation Campus / DH-02"
]
}
],
"after_relief": [
{
"constraint": "Firm supply (grid import + behind-the-meter)",
"halls": 1,
"incomparable_halls": 0,
"members": [
"Reference Colocation Campus / DH-02"
]
}
]
},
"totals_note": "Every total sums, for each hall, the figure of the architecture the objective 'max_compute' selects for it; another objective selects other architectures and gives other totals. total_racks and total_racks_upper_bound add every hall's own figure, an upper bound while a grid connection is shared between halls or a hall has constraints that were not evaluated. comparable_total_racks adds only the halls that are rankable; total_racks_by_site_max and comparable_total_racks_by_site_max count only the largest hall at each declared site."
}