Skip to main content
GET
Get a task (with steps)

Authorizations

Authorization
string
header
required

Session token from POST /auth/login, sent as Authorization: Bearer <token>.

Headers

X-Pinecone-Api-Version
string
default:2026-07

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.

Path Parameters

id
string
required

Task id.

Query Parameters

steps_limit
integer

Return only this many trailing steps. Absent returns them all.

Required range: x >= 0

Response

The task

One task record — a single run of a workflow, owned by the project.

id
string
required

Task id.

project_id
string
required

The Pinecone project that owns the task.

created_by
string
required

Principal that started the run.

workflow
string
required

The canonical workflow name.

state
string
required

Where the run has got to. scheduled waits for its due time; starting and provisioning are a container being claimed and built; running is the work happening; stopping is a termination in progress. completed, cancelled and failed are terminal.

input
Search / search_cc / search_rag / work · object
required

A task's per-workflow input. It carries no discriminant of its own — the sibling workflow field selects the shape.

steps
object[]
required

Populated only on GET /tasks/{id}. May be a trailing window when steps_limit was given, so read the count from steps_total rather than this array's length.

tokens_prompt
integer<int64>
required

Input tokens the run has billed so far.

tokens_completion
integer<int64>
required

Output tokens the run has billed so far.

runtime_seconds
integer<int64>
required

Seconds the container has been running.

created_at
string<date-time>
required

When the task row was created.

context_id
string | null

The context the run acts on. Null for a task that belongs to no context.

agent_id
string | null

Reserved. Null on every task this version serves.

session_id
string | null

Set for query turns

error
string | null

Failure detail. Set on a failed task.

output
Search / search_rag completed · object

A task's reported output. Every workflow reports a different per-state shape, matched to a named variant only when its key set is exactly that variant's; anything else is preserved as stored. Treat this union as open. Null until the run reports anything.

steps_total
integer<int64>

True number of recorded steps. Absent on a read that carries no steps.

running_from
string<date-time> | null

When the container started. Null before it does.

timeout_seconds
integer | null

Runtime budget for this task. Null when it runs uncapped.

timeout_at
string<date-time> | null

When the budget expires and the run is terminated.

archived_at
string<date-time> | null

When the task's files were archived. Null while they are still live.

last_activity_at
string<date-time> | null

When the runtime last reported anything. Drives stall detection.

schedule
string | null

Cron expression this run was scheduled from. Null for an on-demand run.

scheduled_at
string<date-time> | null

When a scheduled task is due to start.

parent_task_id
string | null

The task that spawned this one, as an optimize spawns its curates.

progress
object

Coarse run progress, written by the runtime. Absent on a task that reports none.