---
title: "Run an SDK action"
method: POST
path: "/v1/sdk/run_action"
tags: ["SDK"]
---

# Run an SDK action

`POST /v1/sdk/run_action`

Execute a single SDK action with the specified parameters

## Headers

- `x-api-key` string, nullable — Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

## Request body

- RunSdkActionRequest — Request to run a single SDK action.
  - `url` string, required — The URL where the action should be executed
  - `browser_session_id` string, nullable — The browser session ID
  - `browser_address` string, nullable — The browser address
  - `workflow_run_id` string, nullable — Optional workflow run ID to continue an existing workflow run
  - `action` union, required — The action to execute with its specific parameters
    - ClickAction — Click action parameters.
      - `type` 'ai_click'
      - `selector` string, nullable — CSS selector for the element
      - `intention` string — The intention or goal of the click
      - `data` union — Additional context data
        - string
        - object
      - `timeout` number — Timeout in milliseconds
    - InputTextAction — Input text action parameters.
      - `type` 'ai_input_text'
      - `selector` string, nullable — CSS selector for the element
      - `value` string, nullable — Value to input
      - `intention` string — The intention or goal of the input
      - `data` union — Additional context data
        - string
        - object
      - `totp_identifier` string, nullable — TOTP identifier for input_text actions
      - `totp_url` string, nullable — TOTP URL for input_text actions
      - `timeout` number — Timeout in milliseconds
    - SelectOptionAction — Select option action parameters.
      - `type` 'ai_select_option'
      - `selector` string, nullable — CSS selector for the element
      - `value` string, nullable — Value to select
      - `intention` string — The intention or goal of the selection
      - `data` union — Additional context data
        - string
        - object
      - `timeout` number — Timeout in milliseconds
    - UploadFileAction — Upload file action parameters.
      - `type` 'ai_upload_file'
      - `selector` string, nullable — CSS selector for the element
      - `file_url` string, nullable — File URL for upload
      - `intention` string — The intention or goal of the upload
      - `data` union — Additional context data
        - string
        - object
      - `timeout` number — Timeout in milliseconds
    - ActAction — AI act action parameters.
      - `type` 'ai_act'
      - `intention` string — Natural language prompt for the action
      - `data` union — Additional context data
        - string
        - object
    - ExtractAction — Extract data action parameters.
      - `type` 'extract'
      - `prompt` string — Extraction prompt
      - `extract_schema` union — Schema for extraction
        - object
        - unknown[]
          - unknown
        - string
      - `error_code_mapping` object, nullable — Error code mapping for extraction
      - `intention` string, nullable — The intention or goal of the extraction
      - `data` union — Additional context data
        - string
        - object
    - LocateElementAction — Locate element action parameters.
      - `type` 'locate_element'
      - `prompt` string — Natural language prompt to locate an element
    - ValidateAction — Validate action parameters.
      - `type` 'validate'
      - `prompt` string, required — Validation criteria or condition to check
      - `model` object, nullable — Optional model configuration
    - PromptAction — Prompt action parameters.
      - `type` 'prompt'
      - `prompt` string, required — The prompt to send to the LLM
      - `response_schema` object, nullable — Optional JSON schema to structure the response
      - `model` object, nullable — Optional model configuration

## Response `200`

Successful Response

- RunSdkActionResponse — Response from running an SDK action.
  - `workflow_run_id` string, required — The workflow run ID used for this action
  - `result` unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/skyvern-ai/apis/skyvern-api-2.md) · [All operations](https://skmtc.net/skyvern-ai/apis/skyvern-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyvern-ai/skyvern-api-2/revisions/0e47a2ae6398/schema)
