v65

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0386234904.1 KB
Agents

Run a task

Run a task

post/v1/run/tasks

Headers

x-api-keystring nullable

Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

x-user-agentstring nullable

Request body

promptstring required

The goal or task description for Skyvern to accomplish

urlstring nullable

The starting URL for the task. If not provided, Skyvern will attempt to determine an appropriate URL

engine'skyvern-1.0' | 'skyvern-2.0' | 'openai-cua' | 'anthropic-cua' | 'ui-tars' | 'yutori-navigator'
titlestring nullable

The title for the task

error_code_mappingobject nullable

Custom mapping of error codes to error messages if Skyvern encounters an error.

max_stepsinteger nullable

Maximum number of steps the task can take. Task will fail if it exceeds this number. Cautions: you are charged per step so please set this number to a reasonable value. Contact sales@skyvern.com for custom pricing.

webhook_urlstring nullable

After a run is finished, send an update to this URL. Refer to https://www.skyvern.com/docs/running-tasks/webhooks-faq for more details.

totp_identifierstring nullable

Identifier for the TOTP/2FA/MFA code when the code is pushed to Skyvern. Refer to https://www.skyvern.com/docs/credentials/totp#option-3-push-code-to-skyvern for more details.

totp_urlstring nullable

URL that serves TOTP/2FA/MFA codes for Skyvern to use during the workflow run. Refer to https://www.skyvern.com/docs/credentials/totp#option-2-get-code-from-your-endpoint for more details.

browser_session_idstring nullable

Run the task or workflow in the specific Skyvern browser session. Having a browser session can persist the real-time state of the browser, so that the next run can continue from where the previous run left off.

browser_profile_idstring nullable

ID of a browser profile to reuse for this task

start_fresh_browserboolean

When true, start this run from a fresh, empty browser and ignore any saved browser memory — no memory is read or written. A verified sign-in during the run still updates the credential's saved login.

modelobject nullable

Optional model configuration.

extra_http_headersobject nullable

The extra HTTP headers for the requests in browser.

cdp_connect_headersobject nullable

HTTP headers attached ONLY to the CDP WebSocket handshake when connecting to a remote browser via browser_address. Use this for browser-provider auth (e.g., x-api-key for Skyvern Cloud, Browserless, or similar). These headers are NEVER forwarded to target websites.

publish_workflowboolean

Deprecated. Whether to publish a skyvern-2.0 task as a reusable workflow. For backwards compatibility, this routes the request through the legacy skyvern-2.0 publish path. Prefer creating reusable workflows through the workflow APIs.

include_action_history_in_verificationboolean nullable

Whether to include action history when verifying that the task is complete

max_screenshot_scrollsinteger nullable

The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot.

browser_addressstring nullable

The CDP address for the task.

run_withstring nullable

Whether to run the task with agent or code. Null means use the default.

Example request

{
  "prompt": "Find the top 3 posts on Hacker News.",
  "url": "https://www.hackernews.com",
  "title": "The title of my first skyvern task",
  "proxy_location": {
    "country": "US",
    "subdivision": "CA",
    "city": "New York"
  },
  "error_code_mapping": {
    "login_failed": "The login credentials are incorrect or the account is locked"
  },
  "max_steps": 10,
  "webhook_url": "https://my-site.com/webhook",
  "totp_identifier": "john.doe@example.com",
  "totp_url": "https://my-totp-service.com/totp",
  "browser_session_id": "pbs_123",
  "browser_address": "http://127.0.0.1:9222",
  "run_with": "agent"
}

Response

Successfully run task

run_idstring required

Unique identifier for this run. Run ID starts with tsk_ for task runs and wr_ for workflow runs.

status'created' | 'queued' | 'running' | 'paused' | 'timed_out' | 'failed' | 'terminated' | 'completed' | 'canceled' required
recording_urlstring nullable

URL to the recording of the run

recording_archivedboolean

True when the recording exists but has been archived to cold storage and is not currently accessible.

screenshot_urlsstring[] nullable

List of last n screenshot URLs in reverse chronological order - the first one the list is the latest screenshot.

failure_reasonstring nullable

Reason for failure if the run failed or terminated

created_atstring date-time required

Timestamp when this run was created

modified_atstring date-time required

Timestamp when this run was last modified

queued_atstring date-time nullable

Timestamp when this run was queued

started_atstring date-time nullable

Timestamp when this run started execution

finished_atstring date-time nullable

Timestamp when this run finished

app_urlstring nullable

URL to the application UI where the run can be viewed

browser_session_idstring nullable

ID of the Skyvern persistent browser session used for this run

browser_profile_idstring nullable

ID of the browser profile used for this run

max_screenshot_scrollsinteger nullable

The maximum number of scrolls for the post action screenshot. When it's None or 0, it takes the current viewpoint screenshot

errorsobject[] nullable

The errors for the run

step_countinteger nullable

Total number of steps executed in this run

run_type'task_v1' | 'task_v2' | 'openai_cua' | 'anthropic_cua' | 'ui_tars' | 'yutori_navigator' required

Types of a task run - task_v1, task_v2, openai_cua, anthropic_cua, ui_tars

Example response

{
  "run_id": "tsk_123",
  "created_at": "2025-01-01T00:00:00Z",
  "modified_at": "2025-01-01T00:05:00Z",
  "app_url": "https://app.skyvern.com/tasks/tsk_123",
  "browser_session_id": "pbs_123",
  "browser_profile_id": "bp_123",
  "run_request": {
    "prompt": "Find the top 3 posts on Hacker News.",
    "url": "https://www.hackernews.com",
    "title": "The title of my first skyvern task",
    "proxy_location": {
      "country": "US",
      "subdivision": "CA",
      "city": "New York"
    },
    "error_code_mapping": {
      "login_failed": "The login credentials are incorrect or the account is locked"
    },
    "max_steps": 10,
    "webhook_url": "https://my-site.com/webhook",
    "totp_identifier": "john.doe@example.com",
    "totp_url": "https://my-totp-service.com/totp",
    "browser_session_id": "pbs_123",
    "browser_address": "http://127.0.0.1:9222",
    "run_with": "agent"
  }
}
All 86 operations