Runs
Look up past calls and async runs made with your account, and stop async runs that are still going.
Two kinds of runs share these endpoints:
- Calls: every call made with your keys through
/gw,/cap,/ai/v1or a synchronous/v1/run. The run id is the call'sX-Pikeway-Call-Id. - Async runs: started with
/v1/runand"async": true. Ids start withrun_; kept for 7 days with their output.
Authentication
All three endpoints require Authorization: Bearer pk-… and only return runs of the key's account (any key of the account works).
List runs
limitintegercursorstringproviderstringasync1 | truestatusstringcurl "https://gw.pikeway.ai/v1/runs?limit=20" -H "Authorization: Bearer $PIKEWAY_API_KEY" curl "https://gw.pikeway.ai/v1/runs?async=1&status=RUNNING" -H "Authorization: Bearer $PIKEWAY_API_KEY"
{
"items": [
{
"runId": "0192f6b0-5e2a-7d40-b1c3-8f9e2a4d6c11",
"provider": "birdeye",
"method": "GET",
"path": "/defi/price",
"status": "COMPLETED",
"providerResponse": { "httpStatus": 200 },
"cost": { "value": 0.001, "currency": "USD" },
"durationMs": 214,
"createdAt": "2026-10-24T09:12:03Z"
},
{
"runId": "0192f6af-11c4-7a0e-9b52-3d7e8f1a2c64",
"provider": "coingecko",
"method": "GET",
"path": "/simple/price",
"status": "FAILED",
"providerResponse": { "httpStatus": 502 },
"cost": { "value": 0, "currency": "USD" },
"durationMs": 10012,
"createdAt": "2026-10-24T09:10:47Z",
"errorOrigin": "UPSTREAM"
}
],
"cursor": "MjAyNi0xMC0yNFQwOToxMDo0Ny4…"
}statusCOMPLETED | FAILEDpathstringerrorOriginUPSTREAM | USER | GATEWAYWith async=1, items have runId, async: true, provider, method, endpoint (the template), status, cost, createdAt and, once done, finishedAt.
Get a run
runIdstringrequiredX-Pikeway-Call-Id or a sync run) or an async run id (run_…).curl https://gw.pikeway.ai/v1/runs/run_5f0c2b7e9a4d4e1b8c3a6f2d1e0b9a87 \ -H "Authorization: Bearer $PIKEWAY_API_KEY"
Async run
{
"runId": "run_5f0c2b7e9a4d4e1b8c3a6f2d1e0b9a87",
"async": true,
"provider": "birdeye",
"method": "GET",
"endpoint": "/defi/price",
"status": "COMPLETED",
"input": { "address": "So11111111111111111111111111111111111111112" },
"providerResponse": { "httpStatus": 200 },
"output": { "success": true, "data": { "value": 172.41 } },
"callId": "0192f6b3-7a10-7e22-a4c5-1b2d3e4f5a6b",
"cost": { "value": 0.001, "currency": "USD" },
"timeoutSeconds": 120,
"createdAt": "2026-10-24T09:20:00Z",
"startedAt": "2026-10-24T09:20:00Z",
"finishedAt": "2026-10-24T09:20:01Z",
"durationMs": 640,
"pollUrl": "https://gw.pikeway.ai/v1/runs/run_5f0c2b7e9a4d4e1b8c3a6f2d1e0b9a87"
}statusstringoutputanyerrorstringcallIdstringCall
For a call id you get the same fields as in the list. Response bodies are only kept when the provider enabled detailed logs; then output holds the first 4 KB, otherwise outputRetained is false. Save the output when you make the call if you need it later.
{
"runId": "0192f6b0-5e2a-7d40-b1c3-8f9e2a4d6c11",
"provider": "birdeye",
"method": "GET",
"path": "/defi/price",
"status": "COMPLETED",
"providerResponse": { "httpStatus": 200 },
"cost": { "value": 0.001, "currency": "USD" },
"durationMs": 214,
"createdAt": "2026-10-24T09:12:03Z",
"outputRetained": false
}Stop a run
Stops a queued or running async run. The upstream request is cancelled and nothing is charged. Returns 202 with the run's resulting status (normally STOPPED).
curl -X POST https://gw.pikeway.ai/v1/runs/run_5f0c2b7e9a4d4e1b8c3a6f2d1e0b9a87/stop \ -H "Authorization: Bearer $PIKEWAY_API_KEY"
{ "runId": "run_5f0c2b7e9a4d4e1b8c3a6f2d1e0b9a87", "status": "STOPPED" }Errors
401missing API key (Authorization: Bearer pk-...)·invalid or revoked API key·403key restrictions404run not found·run not found (only async runs can be stopped)405use GET (or POST /v1/runs/<id>/stop)409{"code": 409, "message": "run already finished", "status": "COMPLETED"}when stopping a finished run