# Get a task (with steps)

`GET /tasks/{id}`

:::code-group
```bash title="cURL"
curl --request GET \
  --url https://{host}/api/tasks/{id} \
  --header 'Authorization: Bearer <token>'
```

```json title="200"
{
  "id": "<string>",
  "project_id": "<string>",
  "context_id": "<string>",
  "agent_id": "<string>",
  "session_id": "<string>",
  "created_by": "<string>",
  "workflow": "<string>",
  "state": "<string>",
  "error": "<string>",
  "input": {
    "session_id": "<string>",
    "query_id": "<string>",
    "ask": "<string>",
    "messages": [
      {
        "role": null,
        "content": null
      }
    ],
    "models": [
      "<string>"
    ],
    "tools": [
      "<string>"
    ],
    "shape": {},
    "instructions": "<string>",
    "scope": [
      "<string>"
    ],
    "turn_timeout_seconds": 123,
    "retrieval": {
      "retrieval_only": true,
      "pointers_only": true,
      "chunks_only": true,
      "artifacts_only": true,
      "max_retrieved": 123,
      "max_retrieved_chars": 123,
      "compose": true,
      "max_steps": 123,
      "thinking_level": "<string>"
    },
    "comparison_group": "<string>"
  },
  "output": {
    "status": "<string>",
    "query_id": "<string>",
    "answer": "<string>",
    "output_json": {},
    "citations": [
      "<string>"
    ],
    "latency_ms": 123,
    "unknown_models": [
      "<string>"
    ]
  },
  "steps": [
    {
      "step_id": "<string>",
      "status": "<string>",
      "type": "<string>",
      "content": "<string>",
      "commentary": "<string>",
      "code": "<string>",
      "result": "<string>",
      "cum_input_tokens": 123,
      "cum_output_tokens": 123,
      "job_id": "<string>",
      "path": "<string>"
    }
  ],
  "steps_total": 123,
  "tokens_prompt": 123,
  "tokens_completion": 123,
  "runtime_seconds": 123,
  "running_from": "<string>",
  "timeout_seconds": 123,
  "timeout_at": "<string>",
  "archived_at": "<string>",
  "created_at": "<string>",
  "last_activity_at": "<string>",
  "schedule": "<string>",
  "scheduled_at": "<string>"
}
```
:::

## Authorizations

- `Authorization` (header, string, required) — Bearer authentication header of the form `Bearer <token>`.

## Path Parameters

- `id` (path, string, required) — Task id.

## Query Parameters

- `steps_limit` (query, integer) — Return only this many trailing steps. Absent returns them all.

## Headers

- `X-Pinecone-Api-Version` (header, string) — Date-based contract version, echoed back on the same header. Omit for the default (`2026-07`); send `unstable` for the in-development surface. An unrecognized value is rejected with `400 unsupported_api_version`.

## Response

- `200` — The task
- `404` — Not found

## Related pages

- [List tasks (project-wide, paginated)](./data-plane-tasks-list-tasks-project-wide-paginated.md)
- [Cancel/terminate a task](./data-plane-tasks-cancelterminate-a-task.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
