curl --request POST \
--url 'https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=' \
--header 'Content-Type: application/json' \
--data '
{
"taskContext": "Open example.com and report the page title.",
"waitSeconds": 60
}
'import requests
url = "https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token="
payload = {
"taskContext": "Open example.com and report the page title.",
"waitSeconds": 60
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({taskContext: 'Open example.com and report the page title.', waitSeconds: 60})
};
fetch('https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=', 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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=",
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([
'taskContext' => 'Open example.com and report the page title.',
'waitSeconds' => 60
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token="
payload := strings.NewReader("{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=")
.header("Content-Type", "application/json")
.body("{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"taskId": "<string>",
"state": "pending",
"resultStatus": "pending",
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"code": "task_failed",
"message": "<string>"
},
"resultRef": {
"href": "<string>"
}
}{
"success": true,
"taskId": "<string>",
"state": "pending",
"resultStatus": "pending",
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"code": "task_failed",
"message": "<string>"
},
"resultRef": {
"href": "<string>"
}
}Execute a Computer Task and wait for its result
Creates one ordinary, immediate Computer Task for the account in the path. The selected account must be a provisioned Computer Agent accessible to the authenticated requester, including any member account restrictions. Do not send type or accountId in the body. Communication Tasks, schedules, and registered helper execution are not supported by this operation. After creation, waits up to waitSeconds (0-60, default 60) for completion and replication of the assistant reply into Vida room messages. A five-second grace period after the stored Task update allows replication to settle. Returns the latest assistant text in the Task execution window; tool, reasoning, system, and user entries are not returned as answers. Replicated messages do not contain a definitive final-answer marker, so readiness uses Task completion and that grace period. No direct computer-session lookup, result cache, or additional persistent execution state is used. HTTP 200 means a reply is ready or the Task errored/was canceled; inspect state, resultStatus, and error. HTTP 202 means execution or reply replication is still pending. Save taskId and check resultRef.href rather than creating another Task. A finished Task can still have pending output. waitSeconds=0 performs one inspection with a maximum 10-second read budget, without polling. Normal request setup and Task creation time are additional to the result-wait budget. A timeout or client disconnect never cancels the Task. Use the existing Task API to inspect or cancel it. This POST is not idempotent. Retrying it can create another Task, even with the same externalTaskId. Reconcile existing Tasks before retrying an uncertain create. Missing or expired replicated messages remain pending; this endpoint does not fabricate an answer or recover deleted history.
curl --request POST \
--url 'https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=' \
--header 'Content-Type: application/json' \
--data '
{
"taskContext": "Open example.com and report the page title.",
"waitSeconds": 60
}
'import requests
url = "https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token="
payload = {
"taskContext": "Open example.com and report the page title.",
"waitSeconds": 60
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({taskContext: 'Open example.com and report the page title.', waitSeconds: 60})
};
fetch('https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=', 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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=",
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([
'taskContext' => 'Open example.com and report the page title.',
'waitSeconds' => 60
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token="
payload := strings.NewReader("{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=")
.header("Content-Type", "application/json")
.body("{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vida.dev/api/v2/computer/accounts/{targetAccountId}/tasks/execute?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"taskContext\": \"Open example.com and report the page title.\",\n \"waitSeconds\": 60\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"taskId": "<string>",
"state": "pending",
"resultStatus": "pending",
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"code": "task_failed",
"message": "<string>"
},
"resultRef": {
"href": "<string>"
}
}{
"success": true,
"taskId": "<string>",
"state": "pending",
"resultStatus": "pending",
"output": {
"text": "<string>",
"truncated": true
},
"error": {
"code": "task_failed",
"message": "<string>"
},
"resultRef": {
"href": "<string>"
}
}Body
Response
Reply ready, or Task errored or canceled