Run a Task
POST /v2/tasks/{taskId}/run — runTask
import { client, Tasks } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Tasks.runTask({
path: {
taskId: 'your-taskId'
},
body: {
input_params: {}
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks.run_task(
"your-task-id",
input_params={},
)
print(result)
Get Task Run Status
GET /v2/tasks/runs/{runId}/status — getTaskRunStatus
import { client, Tasks } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Tasks.getTaskRunStatus({
path: {
runId: 'your-runId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks.get_task_run_status(
"your-run-id",
)
print(result)
Generate a Task
POST /v2/tasks/generate — generateTask
import { client, Tasks } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Tasks.generateTask({
body: {
taskName: 'string',
taskPrompt: 'string'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks.generate_task(
task_name="string",
task_prompt="string",
)
print(result)
Get Task Generation Status
GET /v2/tasks/{taskId}/generation-status — getTaskGenerationStatus
import { client, Tasks } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await Tasks.getTaskGenerationStatus({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks.get_task_generation_status(
"your-task-id",
)
print(result)
Legacy task methods
The methods below call the legacy v1 task API and are exposed through theTasksLegacy class. Prefer the Tasks methods above for new integrations.
Create Task (Legacy)
POST /v1/task — createTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.createTask({
body: {
name: 'string',
language: 'typescript'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.create_task(
name="string",
language="typescript",
)
print(result)
List Tasks (Legacy)
GET /v1/task — listTasks
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.listTasks();
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.list_tasks()
print(result)
Run Task (Legacy)
POST /v1/task/run — runAdhocTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.runAdhocTask({
body: {
taskId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.run_adhoc_task(
task_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(result)
Run Task by Name (Legacy)
POST /v1/task/run/{taskName} — runTaskByName
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.runTaskByName({
path: {
taskName: 'your-taskName'
},
body: {}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.run_task_by_name(
"your-task-name",
)
print(result)
Get Task Metadata (Legacy)
GET /v1/task/{taskId} — getTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.getTask({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.get_task(
"your-task-id",
)
print(result)
Update Task Metadata (Legacy)
PUT /v1/task/{taskId} — updateTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.updateTask({
path: {
taskId: 'your-taskId'
},
body: {}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.update_task(
"your-task-id",
)
print(result)
Delete Task (Legacy)
DELETE /v1/task/{taskId} — deleteTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.deleteTask({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.delete_task(
"your-task-id",
)
print(result)
List Task Versions (Legacy)
GET /v1/task/{taskId}/versions — listTaskVersions
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.listTaskVersions({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.list_task_versions(
"your-task-id",
)
print(result)
Get Latest Task Version (Legacy)
GET /v1/task/{taskId}/latest — getLatestTaskVersion
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.getLatestTaskVersion({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.get_latest_task_version(
"your-task-id",
)
print(result)
Get Task Draft (Legacy)
GET /v1/task/{taskId}/draft — getTaskDraft
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.getTaskDraft({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.get_task_draft(
"your-task-id",
)
print(result)
Create or Update Task Draft (Legacy)
POST /v1/task/{taskId}/draft — saveTaskDraft
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.saveTaskDraft({
path: {
taskId: 'your-taskId'
},
body: {
code: 'string'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.save_task_draft(
"your-task-id",
code="string",
)
print(result)
Deploy Task (Legacy)
POST /v1/task/{taskId}/deploy — deployTask
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.deployTask({
path: {
taskId: 'your-taskId'
},
body: {}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.deploy_task(
"your-task-id",
)
print(result)
List Task Executions (Legacy)
GET /v1/task/{taskId}/executions — listTaskExecutions
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.listTaskExecutions({
path: {
taskId: 'your-taskId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.list_task_executions(
"your-task-id",
)
print(result)
Get Task Execution Result (Legacy)
GET /v1/task/{taskId}/executions/{executionId} — getTaskExecution
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.getTaskExecution({
path: {
taskId: 'your-taskId',
executionId: 'your-executionId'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.get_task_execution(
"your-task-id",
"your-execution-id",
)
print(result)
Get Task Version (Legacy)
GET /v1/task/{taskId}/{taskVersion} — getTaskVersion
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.getTaskVersion({
path: {
taskId: 'your-taskId',
taskVersion: 'your-taskVersion'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.get_task_version(
"your-task-id",
"your-task-version",
)
print(result)
Publish Task Version (Legacy)
POST /v1/task/{taskId}/{taskVersion} — publishTaskVersion
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.publishTaskVersion({
path: {
taskId: 'your-taskId',
taskVersion: 'your-taskVersion'
},
body: {}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.publish_task_version(
"your-task-id",
"your-task-version",
)
print(result)
Delete Task Version (Legacy)
DELETE /v1/task/{taskId}/{taskVersion} — deleteTaskVersion
import { client, TasksLegacy } from 'anchorbrowser';
// ANCHORBROWSER_API_KEY is read from the environment by default;
// set it explicitly like this:
client.setConfig({ auth: () => 'your-api-key' });
const result = await TasksLegacy.deleteTaskVersion({
path: {
taskId: 'your-taskId',
taskVersion: 'your-taskVersion'
}
});
console.log(result);
from anchorbrowser import Anchorbrowser
# ANCHORBROWSER_API_KEY is read from the environment by default;
# set it explicitly with Anchorbrowser(api_key="your-api-key")
client = Anchorbrowser()
result = client.tasks_legacy.delete_task_version(
"your-task-id",
"your-task-version",
)
print(result)

