Skip to main content
POST
/
v1
/
automation
/
run-sse
Run browser automation with SSE streaming
curl --request POST \
  --url https://agent.tinyfish.ai/v1/automation/run-sse \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "url": "https://example.com",
  "goal": "Find the pricing page and extract all plan details",
  "browser_profile": "lite",
  "proxy_config": {
    "enabled": true,
    "country_code": "US"
  },
  "api_integration": "dify",
  "feature_flags": {
    "enable_agent_memory": true
  },
  "use_vault": true,
  "credential_item_ids": [
    "item_abc123",
    "item_def456"
  ]
}
'
"data: {\"type\":\"STARTED\",\"run_id\":\"run_123\",\"timestamp\":\"2025-01-01T00:00:00Z\"}\n\ndata: {\"type\":\"STREAMING_URL\",\"run_id\":\"run_123\",\"streaming_url\":\"https://...\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"PROGRESS\",\"run_id\":\"run_123\",\"purpose\":\"Clicking submit button\",\"timestamp\":\"...\"}\n\ndata: {\"type\":\"COMPLETE\",\"run_id\":\"run_123\",\"status\":\"COMPLETED\",\"result\":{...},\"timestamp\":\"...\"}"

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key from the API Keys page.

Body

application/json

Automation task parameters

url
string<uri>
required

Target website URL to automate

Example:

"https://example.com"

goal
string
required

Natural language description of what to accomplish on the website

Minimum string length: 1
Example:

"Find the pricing page and extract all plan details"

browser_profile
enum<string>

Browser profile for execution. LITE uses standard browser, STEALTH uses anti-detection browser.

Available options:
lite,
stealth
Example:

"lite"

proxy_config
object

Proxy configuration

api_integration
string

Name of the integration making this API call (e.g., "dify", "zapier", "n8n"). Used for analytics.

Example:

"dify"

feature_flags
object

Feature flags to enable for this run

use_vault
boolean

Opt-in to vault credentials for this run. When true, enabled vault items are included. Defaults to false.

Example:

true

credential_item_ids
string[]

Scope vault credentials to specific item IDs. Requires use_vault to be true. If omitted with use_vault: true, all enabled items are used.

Minimum array length: 1
Minimum string length: 1
Example:
["item_abc123", "item_def456"]

Response

Server-Sent Events stream. Stream sends STARTED, STREAMING_URL (optional), PROGRESS (intermediate events with purpose), COMPLETE events, plus periodic HEARTBEAT messages.

type
enum<string>
required
Available options:
STARTED
run_id
string
required
timestamp
string
required