Download a workspace file
October 12, 2026
Table of contents
Download any file from the Muse workspace of an account: code, documents, data or media, for example a report or a script the agent wrote. The response body is the file itself, streamed from the workspace, with its Content-Type.
Files and assets are two views of the same workspace. Assets are the images, videos and audio files, each with an assetId for jobs and chats. /files covers the whole workspace, including the code, documents and data the agent writes. A media file listed here also carries its assetId.
Paths always start with workspace/, for example workspace/your_files/report.pdf. Find a path with GET /files or GET /files/search.
https://api.useapi.net/v1/muse/files/content?email=
path
Request Headers
Authorization: Bearer {API token}
API tokenis required, see Setup useapi.net for details.
Query Parameters
emailis optional when the API token has one Muse account, and required when it has more. URL-encode it.pathis required, the file’s path in the workspace.
Responses
-
200 OK — the raw file bytes (not JSON), for example:
Content-Type: text/plain; charset=utf-8 Content-Length: 769 -
400 Bad Request —
pathis a folder, or not a path in the workspace.{ "error": "Path is a folder: list it with GET /files", "code": 400 } -
401 Unauthorized — Invalid API token.
{ "error": "useapi.net ⁝ Unauthorized", "code": 401 } -
404 Not Found — the path is not in the workspace, or the account named by
emailis not added.{ "error": "File not found", "code": 404 } -
503 Service Unavailable — Muse could not be reached. Retry shortly.
{ "error": "Muse could not do it right now (…), please retry", "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
A successful response is the file itself (not JSON). Errors return:
{ // TypeScript, all fields are optional
error: string
code: number
}
Examples
-
curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/muse/files/content?email=example%40gmail.com&path=workspace%2Fyour_files%2Fsunkissed-lyrics.txt" \ --output sunkissed-lyrics.txt -
const token = "API token"; const params = new URLSearchParams({ email: "[email protected]", path: "workspace/your_files/sunkissed-lyrics.txt" }); const response = await fetch(`https://api.useapi.net/v1/muse/files/content?${params}`, { method: "GET", headers: { "Authorization": `Bearer ${token}`, } }); const file = await response.arrayBuffer(); console.log("downloaded", response.status, file.byteLength, response.headers.get("content-type")); -
import requests token = "API token" apiUrl = "https://api.useapi.net/v1/muse/files/content" headers = { "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers, params={"email": "[email protected]", "path": "workspace/your_files/sunkissed-lyrics.txt"}) with open("lyrics.txt", "wb") as f: f.write(response.content) print(response, len(response.content))