Send a message

October 12, 2026

Table of contents

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

Send a message into a chat started with POST /chats, or into any chat from GET /chats. No stream needs to be open. Watch the reply live with GET /chats/chatId/stream, or read it afterwards with GET /chats/chatId.

You can send at any time, also while Muse is still answering. Muse then takes the new message into the answer it is working on, the way it does in the muse.ai app. A message to a chat that is not answering starts a new answer. Chat does not use the account’s maxJobs.

https://api.useapi.net/v1/muse/chats/chatId/messages

  • chatId is URL-encoded in the path (it contains : and @).
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Request Body
{
  "message": "Also add one sentence about the moon.",
  "files": []
}
  • message is required, what you say to Muse.
    Maximum length: 5000 characters.
  • files is optional, an array of asset ids (up to 9 images, 3 videos and 3 audio files) and workspace paths of other files (up to 10, for example workspace/your_files/report.pdf), named image_1, video_1, audio_1, file_1… in the order you list them. They must be on the chat’s account. See POST /chats.
Responses
  • 202 Accepted — the message was sent. It shows on the stream as a message event with this messageId.

    {
      "chatId": "c-u12345-email:[email protected]:272b73f4-6fcb-42c2-9ec7-75cc0c020940-bot:muse",
      "email": "[email protected]",
      "messageId": "962c0d79-61d7-4aaa-8f4a-8b3194146c79"
    }
    
  • 400 Bad Request — a parameter is missing or invalid, the path value is not a Muse chatId, or a file is on another account.

    {
      "error": "Path parameter chatId (not-a-chat-id) is not a valid Muse chat id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden — the chatId or a file’s asset id was issued to a different API token.

    {
      "error": "This chat id does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found — the account that holds the chat is not added.

    {
      "error": "Account [email protected] (from the chat id) is not configured",
      "code": 404
    }
    
  • 412 Precondition Failed — the account’s weekly Muse allowance is used up.

  • 429 Too Many Requests — Muse is limiting requests on the account. Retry in about a minute.

    {
      "error": "Muse is limiting requests on account [email protected] right now. Retry in about a minute",
      "code": 429
    }
    
  • 502 Bad Gateway — Muse did not accept the message. Retry.

  • 503 Service Unavailable — Muse could not be reached, and nothing was sent. Retry shortly.

    {
      "error": "Could not read the chat on Muse, nothing was sent. Please retry",
      "code": 503
    }
    
  • 504 Gateway Timeout — the connection to Muse dropped while the message was being sent. It may have arrived: check GET /chats/chatId before you send it again.

    {
      "error": "The connection to Muse dropped while sending (…). The message may have arrived: check GET /chats/{chatId} before sending it again",
      "code": 504
    }
    
  • 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
  email: string             // the account the chat runs on
  messageId: string | null  // Muse's id of your message, as the stream's `message` event shows it
  error?: string            // errors only
  code?: number             // errors only
}
Examples
  • CHATID="c-u12345-email:[email protected]:272b73f4-6fcb-42c2-9ec7-75cc0c020940-bot:muse"
    curl -X POST "https://api.useapi.net/v1/muse/chats/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$CHATID")/messages" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{"message": "Also add one sentence about the moon."}'
    
  • const token = "API token";
    const chatId = "chatId from POST /chats";
    const apiUrl = `https://api.useapi.net/v1/muse/chats/${encodeURIComponent(chatId)}/messages`;
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`,
      },
      body: JSON.stringify({ message: "Also add one sentence about the moon." })
    });
    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"
    apiUrl = f"https://api.useapi.net/v1/muse/chats/{quote(chatId, safe='')}/messages"
    headers = {
        "Content-Type": "application/json",
        "Authorization" : f"Bearer {token}"
    }
    response = requests.post(apiUrl, headers=headers, json={"message": "Also add one sentence about the moon."})
    print(response, response.json())
    
Try It