# Get a call log (/docs/api/logs/logs_get)

One call with timings, its redacted request/response body (audit-logged), the other attempts in its routed run or list, and its ledger entries.

`GET /v1/logs/{id}`

```json
{
  "operationId": "logs_get",
  "summary": "Get a call log",
  "description": "One call with timings, its redacted request/response body (audit-logged), the other attempts in its routed run or list, and its ledger entries.",
  "tags": [
    "logs"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_-]{3,128}$"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "log": {
                "type": "object",
                "properties": {
                  "call_id": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 128
                  },
                  "parent_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 128
                  },
                  "attempt": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "workspace_id": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "app_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "app_name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 80
                  },
                  "key_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "agent_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "run_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 128
                  },
                  "supply_mode": {
                    "type": "string",
                    "enum": [
                      "byok",
                      "managed",
                      "connected"
                    ]
                  },
                  "capability": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "endpoint_id": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "provider": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "mode": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "client_mode": {
                    "type": "string",
                    "enum": [
                      "sync",
                      "wait",
                      "async",
                      "batch",
                      "list",
                      "mcp"
                    ]
                  },
                  "credential": {
                    "type": "string",
                    "enum": [
                      "managed",
                      "byok",
                      "none"
                    ]
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "hit",
                      "miss",
                      "failed"
                    ]
                  },
                  "error_code": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "http_status": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "upstream_status": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "total_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "overhead_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "upstream_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "ttfb_ms": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "queue_wait_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "bytes_in": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "bytes_out": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "cost_micro": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "cache": {
                    "type": "string",
                    "enum": [
                      "hit",
                      "partial",
                      "miss",
                      "stale",
                      "bypass"
                    ]
                  },
                  "saved_micro": {
                    "type": "integer",
                    "minimum": 0,
                    "default": 0
                  },
                  "user_agent": {
                    "type": "string",
                    "maxLength": 512
                  },
                  "client_name": {
                    "type": "string",
                    "maxLength": 64
                  },
                  "client_version": {
                    "type": "string",
                    "maxLength": 32
                  },
                  "client_kind": {
                    "type": "string",
                    "enum": [
                      "sdk",
                      "mcp",
                      "cli",
                      "browser",
                      "server",
                      "unknown"
                    ]
                  },
                  "ip": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "asn": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0
                  },
                  "country": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 8
                  },
                  "colo": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 8
                  },
                  "meta": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 500
                    }
                  },
                  "request_hash": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 64
                  },
                  "effective_options": {
                    "type": "string",
                    "maxLength": 4000,
                    "default": ""
                  },
                  "billing_verdict": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "charged_for_miss",
                      "double_charged_retry",
                      "price_mismatch",
                      "unverifiable",
                      "none",
                      "managed"
                    ]
                  },
                  "billing_billable": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "default": null
                  },
                  "vendor_expected_credits": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "vendor_reported_credits": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "vendor_balance_after": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "default": null
                  },
                  "vendor_expected_micro": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "vendor_reported_micro": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "minimum": 0,
                    "default": null
                  },
                  "ts": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "has_body": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "call_id",
                  "parent_id",
                  "attempt",
                  "workspace_id",
                  "app_id",
                  "app_name",
                  "key_id",
                  "agent_id",
                  "run_id",
                  "supply_mode",
                  "capability",
                  "endpoint_id",
                  "provider",
                  "mode",
                  "client_mode",
                  "credential",
                  "outcome",
                  "error_code",
                  "http_status",
                  "upstream_status",
                  "total_ms",
                  "overhead_ms",
                  "upstream_ms",
                  "ttfb_ms",
                  "queue_wait_ms",
                  "bytes_in",
                  "bytes_out",
                  "cost_micro",
                  "cache",
                  "user_agent",
                  "client_name",
                  "client_version",
                  "client_kind",
                  "ip",
                  "asn",
                  "country",
                  "colo",
                  "meta",
                  "request_hash",
                  "billing_verdict",
                  "ts",
                  "has_body"
                ]
              },
              "body": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "request": {
                    "type": "object",
                    "properties": {
                      "endpoint_id": {
                        "type": "string"
                      },
                      "input": {}
                    },
                    "required": [
                      "endpoint_id"
                    ]
                  },
                  "response": {
                    "type": "object",
                    "properties": {
                      "status": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "body": {}
                    },
                    "required": [
                      "status"
                    ]
                  }
                },
                "required": [
                  "request",
                  "response"
                ]
              },
              "body_status": {
                "type": "string",
                "enum": [
                  "stored",
                  "not_stored",
                  "unavailable"
                ]
              },
              "attempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "call_id": {
                      "type": "string",
                      "minLength": 3,
                      "maxLength": 128
                    },
                    "parent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "attempt": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "workspace_id": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "app_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "app_name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 80
                    },
                    "key_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "agent_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "run_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 128
                    },
                    "supply_mode": {
                      "type": "string",
                      "enum": [
                        "byok",
                        "managed",
                        "connected"
                      ]
                    },
                    "capability": {
                      "type": "string",
                      "maxLength": 120
                    },
                    "endpoint_id": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "provider": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "mode": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "client_mode": {
                      "type": "string",
                      "enum": [
                        "sync",
                        "wait",
                        "async",
                        "batch",
                        "list",
                        "mcp"
                      ]
                    },
                    "credential": {
                      "type": "string",
                      "enum": [
                        "managed",
                        "byok",
                        "none"
                      ]
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "hit",
                        "miss",
                        "failed"
                      ]
                    },
                    "error_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "http_status": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "upstream_status": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "total_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "overhead_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "upstream_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "ttfb_ms": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "queue_wait_ms": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "bytes_in": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "bytes_out": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cost_micro": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "cache": {
                      "type": "string",
                      "enum": [
                        "hit",
                        "partial",
                        "miss",
                        "stale",
                        "bypass"
                      ]
                    },
                    "saved_micro": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "user_agent": {
                      "type": "string",
                      "maxLength": 512
                    },
                    "client_name": {
                      "type": "string",
                      "maxLength": 64
                    },
                    "client_version": {
                      "type": "string",
                      "maxLength": 32
                    },
                    "client_kind": {
                      "type": "string",
                      "enum": [
                        "sdk",
                        "mcp",
                        "cli",
                        "browser",
                        "server",
                        "unknown"
                      ]
                    },
                    "ip": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "asn": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "country": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 8
                    },
                    "colo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 8
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "request_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "maxLength": 64
                    },
                    "effective_options": {
                      "type": "string",
                      "maxLength": 4000,
                      "default": ""
                    },
                    "billing_verdict": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "charged_for_miss",
                        "double_charged_retry",
                        "price_mismatch",
                        "unverifiable",
                        "none",
                        "managed"
                      ]
                    },
                    "billing_billable": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "default": null
                    },
                    "vendor_expected_credits": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_reported_credits": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_balance_after": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "default": null
                    },
                    "vendor_expected_micro": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "vendor_reported_micro": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0,
                      "default": null
                    },
                    "ts": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "has_body": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "call_id",
                    "parent_id",
                    "attempt",
                    "workspace_id",
                    "app_id",
                    "app_name",
                    "key_id",
                    "agent_id",
                    "run_id",
                    "supply_mode",
                    "capability",
                    "endpoint_id",
                    "provider",
                    "mode",
                    "client_mode",
                    "credential",
                    "outcome",
                    "error_code",
                    "http_status",
                    "upstream_status",
                    "total_ms",
                    "overhead_ms",
                    "upstream_ms",
                    "ttfb_ms",
                    "queue_wait_ms",
                    "bytes_in",
                    "bytes_out",
                    "cost_micro",
                    "cache",
                    "user_agent",
                    "client_name",
                    "client_version",
                    "client_kind",
                    "ip",
                    "asn",
                    "country",
                    "colo",
                    "meta",
                    "request_hash",
                    "billing_verdict",
                    "ts",
                    "has_body"
                  ]
                }
              },
              "ledger": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "seq": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "ts": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "topup",
                        "grant",
                        "charge",
                        "refund",
                        "adjustment"
                      ]
                    },
                    "amount_micro": {
                      "type": "integer"
                    },
                    "balance_after_micro": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "seq",
                    "ts",
                    "kind",
                    "amount_micro",
                    "balance_after_micro"
                  ]
                }
              },
              "hold": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "amount_micro": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "charged_micro": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "state": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "amount_micro",
                  "charged_micro",
                  "state",
                  "created_at"
                ]
              },
              "billing": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "gridrouter": {
                    "type": "string"
                  },
                  "vendor": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "rule": {
                        "type": "string"
                      },
                      "charge_on": {
                        "type": "string"
                      },
                      "unit": {
                        "type": "string"
                      },
                      "unit_price_micro": {
                        "type": [
                          "integer",
                          "null"
                        ],
                        "minimum": 0
                      },
                      "plan": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "source_url": {
                        "type": "string"
                      },
                      "checked_at": {
                        "type": "string"
                      },
                      "reports_usage": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "rule",
                      "charge_on",
                      "unit",
                      "unit_price_micro",
                      "plan",
                      "source_url",
                      "checked_at",
                      "reports_usage"
                    ]
                  },
                  "verdict": {
                    "type": "string"
                  }
                },
                "default": null,
                "required": [
                  "gridrouter",
                  "vendor",
                  "verdict"
                ]
              }
            },
            "required": [
              "log",
              "body",
              "body_status",
              "attempts",
              "ledger",
              "hold"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
