Skip to main content
GET
/
agent
/
v1
/
run
/
{id}
/
details
Get run details
curl --request GET \
  --url https://api.case.dev/agent/v1/run/{id}/details \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "agentId": "<string>",
  "status": "queued",
  "prompt": "<string>",
  "guidance": "<string>",
  "model": "<string>",
  "workflowId": "<string>",
  "modalSandboxId": "<string>",
  "result": {
    "output": "<string>",
    "outputObjectIds": [
      "<string>"
    ],
    "finalResponse": {
      "summary": "<string>",
      "createdObjectIds": [
        "<string>"
      ],
      "issues": [
        "<string>"
      ]
    },
    "logs": {
      "opencode": "<string>",
      "runner": "<string>"
    }
  },
  "usage": {
    "model": "<string>",
    "inputTokens": 123,
    "outputTokens": 123,
    "toolCalls": 123,
    "durationMs": 123,
    "summary": {
      "costMicros": 123,
      "totalInputTokens": 123,
      "totalOutputTokens": 123,
      "totalTokens": 123
    },
    "entries": [
      {
        "id": "<string>",
        "kind": "llm",
        "service": "<string>",
        "endpoint": "<string>",
        "method": "<string>",
        "statusCode": 123,
        "costMicros": 123,
        "promptTokens": 123,
        "completionTokens": 123,
        "totalTokens": 123,
        "model": "<string>",
        "timestamp": "2023-11-07T05:31:56Z",
        "metadata": null
      }
    ]
  },
  "steps": [
    {
      "id": "<string>",
      "type": "output",
      "content": "<string>",
      "toolName": "<string>",
      "toolInput": null,
      "toolOutput": null,
      "durationMs": 123,
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "startedAt": "2023-11-07T05:31:56Z",
  "completedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

Run ID

Response

Run details with full step trace

id
string
agentId
string
status
enum<string>
Available options:
queued,
running,
completed,
failed,
cancelled
prompt
string
guidance
string | null
model
string | null
workflowId
string | null

Durable workflow run ID

modalSandboxId
string | null

Modal sandbox ID (available once sandbox is created)

result
object

Final output from the agent

usage
object

Token usage statistics

steps
object[]
createdAt
string<date-time>
startedAt
string<date-time> | null
completedAt
string<date-time> | null