Skip to main content
POST
/
tasks
/
{task_id}
/
run
Run a task
curl --request POST \
  --url https://api.deck.co/v2/tasks/{task_id}/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credential_id": "<string>",
  "source_id": "<string>",
  "session_id": "<string>",
  "input": "<unknown>",
  "request_id": "<string>"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "status": "<string>",
  "result": "<string>",
  "task_id": "<string>",
  "credential_id": "<string>",
  "session_id": "<string>",
  "agent_id": "<string>",
  "source_id": "<string>",
  "runtime_ms": 123,
  "output": "<unknown>",
  "errors": [
    {
      "type": "<string>",
      "code": "<string>",
      "message": "<string>",
      "field": "<string>"
    }
  ],
  "interaction": "<unknown>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "request_id": "<string>",
  "input": "<unknown>",
  "storage": [
    {
      "id": "<string>",
      "object": "<string>",
      "file_name": "<string>",
      "file_type": "<string>",
      "file_size": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "url": "<string>",
      "extraction": "<unknown>"
    }
  ],
  "artifacts": {
    "screenshots": [
      {
        "file_name": "<string>",
        "file_type": "<string>",
        "file_size": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "url": "<string>",
        "reasoning": "<string>"
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.deck.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Path Parameters

task_id
string
required

Unique identifier for the task (prefixed with task_).

Body

Request body for running a task.

credential_id
null | string

The credential to authenticate with. Prefixed with cred_.

source_id
null | string

The source to run the task against. Prefixed with src_.

session_id
null | string

An existing session to reuse for this run. Prefixed with sess_.

input
any

Input data matching the task's input_schema.

request_id
null | string

Client-specified request identifier for tracing.

Response

Created

A task run object representing a single execution of a task.

id
string
required

Unique identifier for the task run, prefixed with trun_.

object
string
required

Always task_run.

status
string
required

Run status: queued, running, cancelling, interaction_required, review_required, completed, canceled, or failed.

result
null | string
required

Run result after completion: success, failure, or unknown. Null while running.

task_id
string
required

The task that was executed. Prefixed with task_.

credential_id
null | string
required

The credential used for authentication, if any. Prefixed with cred_.

session_id
null | string
required

The session this run executed within, if any. Prefixed with sess_.

agent_id
string
required

The agent that executed this run. Prefixed with agt_.

source_id
null | string
required

The source this run connected to, if any. Prefixed with src_.

runtime_ms
required

Execution time in milliseconds.

output
null | any
required

Output data produced by the task execution.

errors
null | object[]
required

Error details if the run failed. Same structure as API-level errors.

interaction
null | any
required

Interaction details when the run is paused waiting for user input (e.g. MFA code, security question).

created_at
string<date-time>
required

ISO 8601 timestamp of when the resource was created.

updated_at
string<date-time>
required

ISO 8601 timestamp of when the resource was last updated.

request_id
string
required

Unique identifier for the API request. Include this when contacting support.

input
null | any

Input data provided when the run was created.

storage
null | object[]

Files captured during the run, each with inline extraction (if any). Returned only when include=storage is requested.

artifacts
object

Run-level visibility artifacts (screenshots). Returned only when include=artifacts is requested.