Runs
List runs
Authorization
BearerAuth AuthorizationBearer <token>
API key (csk_live_…)
In: header
Query Parameters
page?integer
Page number
Default
1Range
1 <= value <= 10000limit?integer
Items per page
Default
20Range
1 <= value <= 100status?|
Filter by run status (comma-separated)
search?string
Search runs by prompt text
Length
length <= 200template?string
Filter by template slug
Length
length <= 50model?string
Filter by AI model
Value in
"sonnet" | "opus" | "haiku"outputTypes?string
Filter by output type (comma-separated)
sortBy?string
Sort field
Default
"createdAt"Value in
"createdAt" | "costUsd"order?string
Sort order
Default
"desc"Value in
"asc" | "desc"Response Body
application/json
application/json
curl -X GET "https://api.cospec.io/v1/runs"{
"data": [
{
"id": "string",
"repo": "string",
"branch": "string",
"prompt": "string",
"model": "sonnet",
"status": "pending",
"failReason": "error",
"templateSlug": "string",
"createdAt": "2019-08-24T14:15:22Z",
"completedAt": "2019-08-24T14:15:22Z",
"outputs": [
{
"type": "text",
"eventId": "string"
}
],
"usage": {
"totalCostUsd": 0
}
}
],
"pagination": {
"page": 0,
"limit": 0,
"total": 0,
"totalPages": 0
},
"meta": {
"activeCount": 0,
"hasEverRun": true
}
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"requestId": "string"
}