Delete an asset

October 12, 2026

Table of contents

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

Delete a file from the Muse workspace of the account that holds it: an upload, a file Muse generated, or a file the agent made. Find asset ids with GET /assets. The file is gone from the muse.ai app too, and its assetId stops working in downloads, jobs and chats.

https://api.useapi.net/v1/muse/assets/assetId

  • assetId is URL-encoded in the path (it contains :).
Request Headers
Authorization: Bearer {API token}
Responses
  • 200 OK

    {
      "assetId": "user:12345-email:6578616d706c6540676d61696c2e636f6d-image:1e562575130e2f0117ff824ed55876343fcb9f8ed6513f35f121d79958a78afc.png",
      "deleted": true
    }
    
  • 400 Bad Request — the path value is not a Muse assetId.

    {
      "error": "Path parameter assetId (…) is not a valid Muse asset id (from POST /assets or a job result)",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden — the assetId was issued to a different API token.

    {
      "error": "This asset id does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found — the file is not there (already deleted), or the account that holds it is not added.

    {
      "error": "Asset not found",
      "code": 404
    }
    
  • 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
  assetId: string
  deleted: true
  error?: string    // errors only
  code?: number     // errors only
}
Examples
  • ASSETID="user:12345-email:6578616d706c6540676d61696c2e636f6d-image:1e562575130e2f0117ff824ed55876343fcb9f8ed6513f35f121d79958a78afc.png"
    curl -X DELETE -H "Authorization: Bearer …" \
         "https://api.useapi.net/v1/muse/assets/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$ASSETID")"
    
  • const token = "API token";
    const assetId = "assetId from GET /assets";
    const apiUrl = `https://api.useapi.net/v1/muse/assets/${encodeURIComponent(assetId)}`;
    const response = await fetch(apiUrl, {
      method: "DELETE",
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    console.log("response", response.status, await response.json());
    
  • import requests
    from urllib.parse import quote
    token = "API token"
    assetId = "assetId from GET /assets"
    apiUrl = "https://api.useapi.net/v1/muse/assets/" + quote(assetId, safe="")
    headers = {
        "Authorization" : f"Bearer {token}"
    }
    response = requests.delete(apiUrl, headers=headers)
    print(response, response.json())
    
Try It