GreenPT Docs

Get a run

GET /v1/agents/runs/{agentId}: a run's status, answer and timestamps.

GET
GET https://api.greenpt.ai/v1/agents/runs/{agentId}
FieldTypeDescription
agentIdstringThe run's ID.
statusstringqueued, running, succeeded, failed, or awaiting_input.
resultstringPresent on succeeded (Mangrove's answer) and awaiting_input (what it needs from you).
errorstringPresent on failed. When Mangrove reported it could not do the task, this is its reason, addressed to you.
createdAt / updatedAtstring (ISO 8601)Timestamps for the run.
expiresAtstring (ISO 8601)When the run and its events are deleted — 24 hours after creation, or after greenShift.plannedStart for a held run.
greenShiftobjectPresent when the run was created with greenShiftWindowHours; see Running when the grid is cleanest.
impactobjectWhat the run's model calls consumed so far: energyWms (watt-milliseconds), emissionsUgCO2e (micrograms CO₂e) and unmeasuredCalls. Grows while the run works and is final once it is terminal. Absent until the first model call returns.

impact adds up the impact object of every chat completion the run made, in the same units. A model call that returned no measurement is counted in unmeasuredCalls instead; when that is above zero, read the totals as a lower bound.

succeeded, failed, and awaiting_input are all terminal — a run in any of them is finished for good, and stays readable until expiresAt without being resumable (One run, one exchange). For awaiting_input specifically, start a new run that includes the field named in result, or in the streamed input_required event.

curl https://api.greenpt.ai/v1/agents/runs/3fa2b1e4-8c5d-4a2e-9f1b-7d6e2c9a91cd \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "agentId": "3fa2b1e4-8c5d-4a2e-9f1b-7d6e2c9a91cd",
  "status": "succeeded",
  "result": "GreenPT offers sustainable AI inference hosted on EU infrastructure, including chat completions, document processing, web search, and autonomous agents.",
  "createdAt": "2026-07-27T10:00:00.000Z",
  "updatedAt": "2026-07-27T10:00:04.000Z",
  "expiresAt": "2026-07-28T10:00:00.000Z",
  "impact": { "energyWms": 18600000, "emissionsUgCO2e": 1040000, "unmeasuredCalls": 0 }
}

A run ID that does not exist, or belongs to a different API key, returns a 404 with the same body either way — existence of another caller's run is never revealed:

{ "error": "Not found" }