---
title: "Get AI task logs"
method: GET
path: "/api/v2/tasks/{user}/{task}/logs"
tags: ["Tasks"]
---

# Get AI task logs

`GET /api/v2/tasks/{user}/{task}/logs`

## Path parameters

- `user` string, required
- `task` string, required

## Response `200`

OK

- CodersdkTaskLogsResponse
  - `logs` CodersdkTaskLogEntry[]
    - `content` string
    - `id` integer
    - `time` string, date-time
    - `type` 'input' | 'output'
  - `snapshot` boolean
  - `snapshot_at` string

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/versions/56b6e9f08540/schema)
