curl --request POST \
--url https://agent.tinyfish.ai/v1/automation/run-batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"runs": [
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": true,
"snapshots": true,
"screenshots": true,
"recording": true,
"html": true
},
"webhook_url": "<string>",
"use_vault": true,
"use_profile": true,
"credential_item_ids": [
"cred:conn-abc:Work:item-123",
"cred:conn-def:Personal:item-456"
]
}
],
"profile_id": "prof_abc123def4567890",
"output_schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
}
}
'import requests
url = "https://agent.tinyfish.ai/v1/automation/run-batch"
payload = {
"runs": [
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": True,
"snapshots": True,
"screenshots": True,
"recording": True,
"html": True
},
"webhook_url": "<string>",
"use_vault": True,
"use_profile": True,
"credential_item_ids": ["cred:conn-abc:Work:item-123", "cred:conn-def:Personal:item-456"]
}
],
"profile_id": "prof_abc123def4567890",
"output_schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runs: [
{
url: 'https://example.com',
goal: 'Find the pricing page and extract all plan details',
browser_profile: 'lite',
api_integration: 'dify',
agent_config: {
mode: 'strict',
cursor_style: 'standard',
max_steps: 50,
max_duration_seconds: 300
},
capture_config: {
elements: true,
snapshots: true,
screenshots: true,
recording: true,
html: true
},
webhook_url: '<string>',
use_vault: true,
use_profile: true,
credential_item_ids: ['cred:conn-abc:Work:item-123', 'cred:conn-def:Personal:item-456']
}
],
profile_id: 'prof_abc123def4567890',
output_schema: {
type: 'object',
properties: {title: {type: 'string'}, price: {type: 'number'}},
required: ['title', 'price']
}
})
};
fetch('https://agent.tinyfish.ai/v1/automation/run-batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent.tinyfish.ai/v1/automation/run-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'runs' => [
[
'url' => 'https://example.com',
'goal' => 'Find the pricing page and extract all plan details',
'browser_profile' => 'lite',
'api_integration' => 'dify',
'agent_config' => [
'mode' => 'strict',
'cursor_style' => 'standard',
'max_steps' => 50,
'max_duration_seconds' => 300
],
'capture_config' => [
'elements' => true,
'snapshots' => true,
'screenshots' => true,
'recording' => true,
'html' => true
],
'webhook_url' => '<string>',
'use_vault' => true,
'use_profile' => true,
'credential_item_ids' => [
'cred:conn-abc:Work:item-123',
'cred:conn-def:Personal:item-456'
]
]
],
'profile_id' => 'prof_abc123def4567890',
'output_schema' => [
'type' => 'object',
'properties' => [
'title' => [
'type' => 'string'
],
'price' => [
'type' => 'number'
]
],
'required' => [
'title',
'price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agent.tinyfish.ai/v1/automation/run-batch"
payload := strings.NewReader("{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agent.tinyfish.ai/v1/automation/run-batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/automation/run-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_ids": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f23456789012"
],
"error": null
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}Start multiple automations asynchronously
Creates and enqueues multiple automation runs in a single request, returning run_ids immediately without waiting for completion. Maximum 100 runs per request.
Atomic creation: Run creation is all-or-nothing. Either all runs are created successfully, or none are (returns error).
Idempotency: This endpoint does not currently support idempotency keys. Retrying a failed request may create duplicate runs.
curl --request POST \
--url https://agent.tinyfish.ai/v1/automation/run-batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"runs": [
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": true,
"snapshots": true,
"screenshots": true,
"recording": true,
"html": true
},
"webhook_url": "<string>",
"use_vault": true,
"use_profile": true,
"credential_item_ids": [
"cred:conn-abc:Work:item-123",
"cred:conn-def:Personal:item-456"
]
}
],
"profile_id": "prof_abc123def4567890",
"output_schema": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"price": {
"type": "number"
}
},
"required": [
"title",
"price"
]
}
}
'import requests
url = "https://agent.tinyfish.ai/v1/automation/run-batch"
payload = {
"runs": [
{
"url": "https://example.com",
"goal": "Find the pricing page and extract all plan details",
"browser_profile": "lite",
"api_integration": "dify",
"agent_config": {
"mode": "strict",
"cursor_style": "standard",
"max_steps": 50,
"max_duration_seconds": 300
},
"capture_config": {
"elements": True,
"snapshots": True,
"screenshots": True,
"recording": True,
"html": True
},
"webhook_url": "<string>",
"use_vault": True,
"use_profile": True,
"credential_item_ids": ["cred:conn-abc:Work:item-123", "cred:conn-def:Personal:item-456"]
}
],
"profile_id": "prof_abc123def4567890",
"output_schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runs: [
{
url: 'https://example.com',
goal: 'Find the pricing page and extract all plan details',
browser_profile: 'lite',
api_integration: 'dify',
agent_config: {
mode: 'strict',
cursor_style: 'standard',
max_steps: 50,
max_duration_seconds: 300
},
capture_config: {
elements: true,
snapshots: true,
screenshots: true,
recording: true,
html: true
},
webhook_url: '<string>',
use_vault: true,
use_profile: true,
credential_item_ids: ['cred:conn-abc:Work:item-123', 'cred:conn-def:Personal:item-456']
}
],
profile_id: 'prof_abc123def4567890',
output_schema: {
type: 'object',
properties: {title: {type: 'string'}, price: {type: 'number'}},
required: ['title', 'price']
}
})
};
fetch('https://agent.tinyfish.ai/v1/automation/run-batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://agent.tinyfish.ai/v1/automation/run-batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'runs' => [
[
'url' => 'https://example.com',
'goal' => 'Find the pricing page and extract all plan details',
'browser_profile' => 'lite',
'api_integration' => 'dify',
'agent_config' => [
'mode' => 'strict',
'cursor_style' => 'standard',
'max_steps' => 50,
'max_duration_seconds' => 300
],
'capture_config' => [
'elements' => true,
'snapshots' => true,
'screenshots' => true,
'recording' => true,
'html' => true
],
'webhook_url' => '<string>',
'use_vault' => true,
'use_profile' => true,
'credential_item_ids' => [
'cred:conn-abc:Work:item-123',
'cred:conn-def:Personal:item-456'
]
]
],
'profile_id' => 'prof_abc123def4567890',
'output_schema' => [
'type' => 'object',
'properties' => [
'title' => [
'type' => 'string'
],
'price' => [
'type' => 'number'
]
],
'required' => [
'title',
'price'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agent.tinyfish.ai/v1/automation/run-batch"
payload := strings.NewReader("{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agent.tinyfish.ai/v1/automation/run-batch")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agent.tinyfish.ai/v1/automation/run-batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runs\": [\n {\n \"url\": \"https://example.com\",\n \"goal\": \"Find the pricing page and extract all plan details\",\n \"browser_profile\": \"lite\",\n \"api_integration\": \"dify\",\n \"agent_config\": {\n \"mode\": \"strict\",\n \"cursor_style\": \"standard\",\n \"max_steps\": 50,\n \"max_duration_seconds\": 300\n },\n \"capture_config\": {\n \"elements\": true,\n \"snapshots\": true,\n \"screenshots\": true,\n \"recording\": true,\n \"html\": true\n },\n \"webhook_url\": \"<string>\",\n \"use_vault\": true,\n \"use_profile\": true,\n \"credential_item_ids\": [\n \"cred:conn-abc:Work:item-123\",\n \"cred:conn-def:Personal:item-456\"\n ]\n }\n ],\n \"profile_id\": \"prof_abc123def4567890\",\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"price\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"title\",\n \"price\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"run_ids": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f23456789012"
],
"error": null
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}{
"error": {
"code": "INVALID_INPUT",
"message": "Field \"url\" is required and must be a string",
"details": "<unknown>"
},
"request_id": "8f9dba20-e37b-4749-a919-2269e28b4a2c"
}Authorizations
API key for authentication. Get your key from the API Keys page.
Body
Batch of automation task configurations
Array of run configurations (1-100)
1 - 100 elementsShow child attributes
Show child attributes
Browser Context Profile ID to use when use_profile is true.
1"prof_abc123def4567890"
Optional provider-supported structured-output schema subset applied to every run in the batch. Unsupported fields are rejected before the request is accepted.
Show child attributes
Show child attributes
{
"type": "object",
"properties": {
"title": { "type": "string" },
"price": { "type": "number" }
},
"required": ["title", "price"]
}
Response
All runs created and enqueued successfully.
Batch async run response. Run creation is atomic. Returns run_ids on success, error on failure.
Was this page helpful?