Stop the agent’s browser

October 14, 2026 (November 16, 2026)

Table of contents

  1. Request Headers
  2. Responses
  3. Model
  4. Examples
  5. Try It

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

  • chatId is URL-encoded in the path (it contains : and @).
  • taskId is the taskId of the chat’s browser event.
Request Headers
Authorization: Bearer {API token}
Responses
  • 200 OK

    {
      "chatId": "c-u12345-email:example@gmail.com-chat:8e0bf21e-a3b5-4a1e-a05a-65d160469bfb-bot:muse",
      "taskId": "423bc12e-db16-4921-8670-08b5f3f5a5d6",
      "stopped": true
    }
    
  • 400 Bad Request — the path holds no valid chatId or taskId.

    {
      "error": "Path parameter taskId (not-a-task) is not a valid browser task id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden — the chatId was 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 example@gmail.com (…), 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 three 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 example@gmail.com: Meta asks for a security check on account example@gmail.com (\"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 example@gmail.com: Muse refused to sign in account example@gmail.com (…). Update its password with POST /accounts, or sign in at https://muse.ai to clear the block, then re-add it",
      "code": 596
    }
    

    Or Muse disabled the account’s computer and refuses to start it again. Sign in at muse.ai in a browser to see why, and ask Muse support to restore it with the form Muse shows there. Add the account again only after Muse has restored it.

    {
      "error": "Account example@gmail.com: Muse has disabled the computer of account example@gmail.com (\"VM wake unavailable\"). Sign in at https://muse.ai in a browser to see why and contact Muse support there, then add the account again with POST /accounts",
      "code": 596
    }
    
Model

The answer names the chat and the browser (chatId, taskId) with stopped: true.

The stopped browser, field by field
{ // TypeScript, all fields are optional
  chatId: string
  taskId: string
  stopped: true
  error?: string         // errors only
  code?: number          // errors only
}
Examples
  • CHATID="c-u12345-email:example@gmail.com-chat: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())
    
Try It