AI Task Planning
Describe what you want in natural language and let the AI plan and execute browser actions.
POST
/api/tasks/from-textCreate an AI task plan from a natural language description. The AI breaks it into executable steps.
Body Parameters
textstringrequiredNatural language task descriptionsessionIdstringrequiredSession to execute onurlstringStarting URL (if not already navigated)Response
{
"success": true,
"planId": "plan-abc123",
"tasks": [
{ "order": 1, "description": "Navigate to login page" },
{ "order": 2, "description": "Fill email field" },
{ "order": 3, "description": "Click submit button" }
],
"estimatedTimeSeconds": 25,
"estimatedCostUsd": 0.02
}POST
/api/tasks/from-audioCreate a task plan from an audio recording. Upload the audio file as multipart form data.
Body Parameters
audiofilerequiredAudio file (multipart upload)Response
{
"success": true,
"planId": "plan-def456",
"tasks": [...]
}POST
/api/tasks/from-recordingCreate a task plan from a browser recording. The AI analyzes the recording to generate executable steps.
Body Parameters
recordingIdstringrequiredRecording ID to analyzeobjectIdstringStorage object ID (resolved from recording if not provided)sessionIdstringAssociated session IDResponse
{
"success": true,
"planId": "plan-ghi789",
"tasks": [...]
}POST
/api/tasks/:planId/executeExecute a task plan. The AI controls the browser step by step.
Body Parameters
sessionIdstringOverride the session (optional if set in plan)Response
{
"success": true,
"planId": "plan-abc123",
"status": "executing"
}GET
/api/tasks/:planIdGet the status of a task plan including per-task results.
Response
{
"planId": "plan-abc123",
"status": "completed",
"tasks": [
{ "order": 1, "description": "Navigate to login page", "status": "completed" },
{ "order": 2, "description": "Fill email field", "status": "completed" },
{ "order": 3, "description": "Click submit button", "status": "completed" }
],
"totalCostUsd": 0.018
}POST
/api/tasks/:planId/pausePause a running task plan. Can be resumed later.
Response
{
"success": true,
"status": "paused"
}POST
/api/tasks/:planId/resumeResume a paused task plan from where it left off.
Response
{
"success": true,
"status": "executing"
}POST
/api/tasks/:planId/cancelCancel a task plan. Completed steps are preserved.
Response
{
"success": true,
"status": "cancelled"
}