POST /api/chat
Starts a new conversation with your AI browser agent. This creates both a conversation record and sends the initial user message to begin the automation task.Headers
Your workspace ID from Browsepilot Settings → Advanced
Must be
application/jsonRequest Body
The initial instruction for your AI browser agent. Be specific about what you
want to accomplish. Examples: -
"Go to Amazon and find the best-rated wireless headphones under $100" - "Fill out the contact form on example.com with my business information" - "Search for software engineer jobs in San Francisco on LinkedIn"ID of the browser profile to use for this conversation. If not provided, uses
the default profile.
AI model to use for this conversation. Defaults to
"gemini-2.5-flash" if not
specified. Supported models: - "gpt-4.1-2025-04-14" - GPT-4.1 (OpenAI) -
"gpt-5-2025-08-07" - GPT-5 (OpenAI) - "claude-sonnet-4-20250514" - Claude
Sonnet 4 (Anthropic) - "grok-4-0709" - Grok 4 (xAI) - "gemini-2.5-flash" -
Gemini 2.5 Flash (Google) Default - "gemini-2.5-pro" - Gemini 2.5 Pro
(Google)Response
Indicates if the conversation was created successfully
Unique ID of the created conversation. Use this to track the conversation
status or send additional messages.
Human-readable confirmation message
What Happens Next?
After creating a conversation:- AI Agent Activation: Your browser agent receives the prompt and begins planning the task
- Browser Session: A new browser session starts (or uses your specified profile)
- Real-time Execution: The agent begins navigating and interacting with websites
- Conversation Updates: You can monitor progress through the Browsepilot dashboard
Best Practices: - Be specific in your prompts for better results - Use
browser profiles for tasks requiring login or specific settings - Include
desired output format (“save as CSV”, “create a summary”, etc.)
Error Handling
| Status Code | Error | Description |
|---|---|---|
400 | Invalid request | Missing or invalid parameters in request body |
401 | Unauthorized | Missing or invalid x-api-key header |
404 | Unauthorized | Workspace not found for provided API key |
500 | Internal server error | Unexpected server error occurred |
