Stop the agent’s browser
October 14, 2026
Table of contents
Close a browser the agent opened, for good, like closing it in the muse.ai app. Open viewers end, and the stream’s browser event then shows ended: true. The chat stays.
A Muse account runs at most 2 browsers at a time, and a new one waits with status Queued while both are busy. Stop a browser you no longer need, and always before you delete its chat: a browser of a deleted chat can no longer be reached. See the Live Browser Guide for the whole flow.
https://api.useapi.net/v1/muse/chats/
chatId/browser/taskId/stop
chatIdis URL-encoded in the path (it contains:and@).taskIdis thetaskIdof the chat’sbrowserevent.
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Responses
-
{ "chatId": "c-u12345-email:[email protected]:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse", "taskId": "423bc12e-db16-4921-8670-08b5f3f5a5d6", "stopped": true } -
400 Bad Request — the path holds no valid
chatIdortaskId.{ "error": "Path parameter taskId (not-a-task) is not a valid browser task id", "code": 400 } -
Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
403 Forbidden — the
chatIdwas issued to a different API token.{ "error": "This chat id does not belong to this API token", "code": 403 } -
404 Not Found — the chat or the browser was not found, or the account that holds the chat is not added.
{ "error": "Browser task not found in this chat", "code": 404 } -
409 Conflict — the browser is already closed, or Muse refused to close it.
{ "error": "This browser is already closed", "code": 409 } -
502 Bad Gateway — Muse did not close the browser. Retry shortly.
{ "error": "Muse refused the stop (HTTP 500)", "code": 502 } -
503 Service Unavailable — Muse could not be reached. Retry shortly.
{ "error": "Could not connect to the Muse workspace of account [email protected] (…), please retry shortly", "code": 503 } -
596 Account Error
The account needs your attention, and it is paused until you add it again. You receive an email when this happens. There are two causes.
Meta asks for a security check on the account. Sign in once at muse.ai in a browser, complete the check, then add the account again with POST /accounts using the same email and password. The API keeps using its session, so no new sign-in is needed.
{ "error": "Account [email protected]: Meta asks for a security check on account [email protected] (\"This account must complete a security checkpoint on the web\"). Sign in once at https://muse.ai in a browser, complete the check, then add the account again with POST /accounts", "code": 596 }Or Muse refused to sign the account in again when its session needed renewing, most often because the password was changed. Add the account again with the current password.
{ "error": "Account [email protected]: Muse refused to sign in account [email protected] (…). Update its password with POST /accounts, or sign in at https://muse.ai to clear the block, then re-add it", "code": 596 }
Model
{ // TypeScript, all fields are optional
chatId: string
taskId: string
stopped: true
error?: string // errors only
code?: number // errors only
}
Examples
-
CHATID="c-u12345-email:[email protected]:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse" TASKID="423bc12e-db16-4921-8670-08b5f3f5a5d6" curl -X POST -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/muse/chats/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$CHATID")/browser/$TASKID/stop" -
const token = "API token"; const chatId = "chatId from POST /chats"; const taskId = "taskId from the stream's browser event"; const apiUrl = `https://api.useapi.net/v1/muse/chats/${encodeURIComponent(chatId)}/browser/${encodeURIComponent(taskId)}/stop`; const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", response.status, result); -
import requests from urllib.parse import quote token = "API token" chatId = "chatId from POST /chats" taskId = "taskId from the stream's browser event" apiUrl = f"https://api.useapi.net/v1/muse/chats/{quote(chatId, safe='')}/browser/{quote(taskId, safe='')}/stop" headers = { "Authorization" : f"Bearer {token}" } response = requests.post(apiUrl, headers=headers) print(response, response.json())