Create Task
Create and start a new task.
You can either:
1. Start a new task without a sessionId (auto-creates a session with US proxy by default).
Note: Tasks without a sessionId are one-off tasks that automatically close the session
upon completion (keep_alive=false). Use sessionSettings to configure the auto-created
session (e.g. proxyCountryCode, profileId, screen dimensions).
2. Start a new task in an existing session (reuse for follow-up tasks or custom configuration)
Note: Without sessionSettings, a US proxy is enabled by default. Providing sessionSettings
overrides defaults — proxy is only enabled if proxyCountryCode is set. For full control over
session configuration (e.g. keep_alive), create a session first via POST /sessions with your
desired settings, then pass that sessionId when creating tasks.
Authentication
X-Browser-Use-API-Keystring
API Key authentication via header
Request
This endpoint expects an object.
task
The task prompt/instruction for the agent.
llm
The LLM model to use for the agent.
startUrl
The URL to start the task from.
maxSteps
Maximum number of steps the agent can take before stopping.
structuredOutput
The stringified JSON schema for the structured output.
sessionId
The ID of the session where the task will run.
metadata
The metadata for the task. Up to 10 key-value pairs.
secrets
The secrets for the task. Allowed domains are not required for secrets to be injected, but are recommended.
allowedDomains
The allowed domains for the task.
opVaultId
The ID of the 1Password vault to use for the task. This is used to inject secrets into the task.
sessionSettings
Session configuration for auto-created sessions. Only applies when session_id is not provided. Ignored when using an existing session.
highlightElements
Tells the agent to highlight interactive elements on the page.
flashMode
Whether agent flash mode is enabled.
thinking
Whether agent thinking mode is enabled.
vision
Whether agent vision capabilities are enabled. Set to 'auto' to let the agent decide based on the model capabilities.
systemPromptExtension
Optional extension to the agent system prompt.
judge
Enable judge mode to evaluate task completion against ground truth.
judgeGroundTruth
Expected answer for judge evaluation.
judgeLlm
The LLM model to use for judging. If not provided, uses the default judge LLM.
skillIds
List of skill IDs to enable for this task. Use [’*’] to enable all available skills for the project.
Response
Successful Response
id
Unique identifier for the created task
sessionId
Session ID where the task was created