Skip to main content
POST
Create Task

Authorizations

X-Browser-Use-API-Key
string
header
required

Body

application/json

Request model for creating a task

task
string
required

The task prompt/instruction for the agent.

Required string length: 1 - 50000
llm
enum<string>
default:browser-use-2.0

The LLM model to use for the agent.

Available options:
browser-use-llm,
browser-use-2.0,
gpt-4.1,
gpt-4.1-mini,
o4-mini,
o3,
gemini-2.5-flash,
gemini-2.5-pro,
gemini-3-pro-preview,
gemini-3-flash-preview,
gemini-flash-latest,
gemini-flash-lite-latest,
claude-sonnet-4-20250514,
claude-sonnet-4-5-20250929,
claude-sonnet-4-6,
claude-opus-4-5-20251101,
gpt-4o,
gpt-4o-mini,
llama-4-maverick-17b-128e-instruct,
claude-3-7-sonnet-20250219
startUrl
string | null

The URL to start the task from.

maxSteps
integer
default:100

Maximum number of steps the agent can take before stopping.

Required range: 1 <= x <= 10000
structuredOutput
string | null

The stringified JSON schema for the structured output.

sessionId
string<uuid> | null

The ID of the session where the task will run.

metadata
Metadata · object | null

The metadata for the task. Up to 10 key-value pairs.

secrets
Secrets · object | null

The secrets for the task. Allowed domains are not required for secrets to be injected, but are recommended.

allowedDomains
string[] | null

The allowed domains for the task.

opVaultId
string | null

The ID of the 1Password vault to use for the task. This is used to inject secrets into the task.

sessionSettings
SessionSettings · object | null

Session configuration for auto-created sessions. These settings only apply when no session_id is provided.

highlightElements
boolean
default:false

Tells the agent to highlight interactive elements on the page.

flashMode
boolean
default:false

Whether agent flash mode is enabled.

thinking
boolean
default:false

Whether agent thinking mode is enabled.

vision
default:true

Whether agent vision capabilities are enabled. Set to 'auto' to let the agent decide based on the model capabilities.

systemPromptExtension
string
default:""

Optional extension to the agent system prompt.

Maximum string length: 2000
judge
boolean
default:false

Enable judge mode to evaluate task completion against ground truth.

judgeGroundTruth
string | null

Expected answer for judge evaluation.

Maximum string length: 10000
judgeLlm
enum<string> | null

The LLM model to use for judging. If not provided, uses the default judge LLM.

Available options:
browser-use-llm,
browser-use-2.0,
gpt-4.1,
gpt-4.1-mini,
o4-mini,
o3,
gemini-2.5-flash,
gemini-2.5-pro,
gemini-3-pro-preview,
gemini-3-flash-preview,
gemini-flash-latest,
gemini-flash-lite-latest,
claude-sonnet-4-20250514,
claude-sonnet-4-5-20250929,
claude-sonnet-4-6,
claude-opus-4-5-20251101,
gpt-4o,
gpt-4o-mini,
llama-4-maverick-17b-128e-instruct,
claude-3-7-sonnet-20250219
skillIds
string[] | null

List of skill IDs to enable for this task. Use ['*'] to enable all available skills for the project.

Response

Successful Response

Response model for creating a task

id
string<uuid>
required

Unique identifier for the created task

sessionId
string<uuid>
required

Session ID where the task was created