Service β€” Account β€” Browser β€” Automatic refresh API Key

Connection details For your apps and API clients

Use this base URL and API key in your client. Keep the key on your server.
Models: muse-spark for chat and code, muse-image for images, and muse-video for video. See API docs for examples.
Accounts
0
Available
0
Issues
0
Disabled
0
Media files
0

Add accounts Bulk import supported

Paste your muse.ai cookie string. Required cookies include hatch_sess, hatch_gw, and hatch_vml. For bulk import, enter one account per line as label | cookie string. The label is optional.

Account list 0

● Automatic keepalive
Background keepalive checks sessions periodically. Accounts are rotated by recent usage. Test opens muse.ai to verify a session.
LabelAccount IDStatusExpiresQuotaEnabledCookies Last usedNotesActions
Loading…

Generation tasks 0

Video tasks progress from queued to processing, then succeeded or failed.
Task IDTypePromptStatus DurationCreatedResult / error
Loading…

Media Library 0

Generated images and videos stored on this server. Download them or use their links in your apps.
Loading…

Online image generation test POST /v1/images/generations

This sends a real request to muse.ai. Image generation can take several minutes.

Online video generation test POST /v1/videos

Video generation runs as a task. This page polls for progress.

API integration

OpenAI-compatible clients can use this service by setting base_url and api_key.
Base URL: β€”

1. Available models

Model IDPurposeInterface
muse-sparkText/code conversation (supports streaming)POST /v1/chat/completions
POST /v1/responses
muse-imageImage generation and editingPOST /v1/images/generations
muse-videoText-to-video and image-to-videoPOST /v1/videos β†’ GET /v1/videos/{id}
These model IDs represent chat, image, and video capabilities. The muse.ai web interface routes requests automatically; it does not offer a model selector. Common aliases such as gpt-4o, claude-sonnet-4, and dall-e-3 are mapped to the corresponding capability for client compatibility.

2. Chat and code

Copy# Non-streaming
curl -X POST "BASE/v1/chat/completions" \
  -H "Authorization: Bearer $MUSE2API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"muse-spark","messages":[{"role":"user","content":"Write a Python quicksort function"}]}'

# For streaming, add "stream":true. The response uses SSE.

3. Generate an image (curl)

Copycurl -X POST "BASE/v1/images/generations" \
  -H "Authorization: Bearer $MUSE2API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A Shiba Inu wearing an astronautical helmet","size":"1:1","response_format":"url"}'

# Return
{"created":1790148495,"data":[{
  "revised_prompt":"A Shiba Inu wearing an astronautical helmet",
  "url":"http://your-server:18610/v1/media/xxxx.webp",
  "kind":"image","bytes":23860}]}

# The media URL can be rendered or downloaded directly. /v1/media/* does not require authentication.
# If you want base64, pass "response_format":"b64_json".

4. Generate video (curl, asynchronous)

Copy# β‘  Create task
curl -X POST "BASE/v1/videos" \
  -H "Authorization: Bearer $MUSE2API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A kitten walking on the grass","duration":5,"size":"16:9"}'
# β†’ {"id":"task_xxx","status":"queued"}

# β‘‘ Polling results
curl "BASE/v1/videos/task_xxx" -H "Authorization: Bearer $MUSE2API_KEY"
# β†’ {"status":"succeeded","result":{"url":"/v1/media/xxx.mp4"}}

5. Python (OpenAI SDK compatible)

Copyfrom openai import OpenAI
import time

client = OpenAI(base_url="BASE/v1", api_key="m2a_...")

# Generate an image
r = client.images.generate(model="muse-image", prompt="A Shiba Inu wearing an astronautical helmet")
print(r.data[0].url)

# Generate a video (asynchronous task)
import requests
t = requests.post("BASE/v1/videos", json={"prompt":"Kitten walking","duration":5},
                  headers={"Authorization":"Bearer m2a_..."}).json()
while True:
    s = requests.get(f"BASE/v1/videos/{t['id']}",
                     headers={"Authorization":"Bearer m2a_..."}).json()
    if s["status"] in ("succeeded","failed"): break
    time.sleep(5)
print(s)

6. Admin endpoints

MethodPathDescription
GET/admin/statusService overview + account pool + recent tasks
GET/admin/accountsAccount list
POST/admin/accountsAdd one or more accounts
PATCH/admin/accounts/{id}Change label/enable/disable
DELETE/admin/accounts/{id}Delete account
POST/admin/accounts/{id}/testVerify session and refresh quota
POST/admin/accounts/{id}/quotaRead the remaining balance of the account in real time
POST/admin/accounts/{id}/cookiesUpdate the account cookie
GET/admin/tasksTask Record
GET/admin/mediaMedia library list
POST/admin/media/deleteDelete media files in batches

7. Authentication

All endpoints except /healthz, /readyz, and /v1/media/* require Authorization: Bearer <API Key>. Set the key with MUSE2API_KEY in .env.

8. Connect an API client

Enter these values in a client that supports a custom OpenAI-compatible endpoint:
Configuration itemWhat to fill in
Base URL / API addresshttp://<your-server-IP-or-domain>:18610/v1
API keym2a_... (shown in Connection details)
Model namemuse-spark
Common model aliases such as gpt-4o, gpt-5, claude-sonnet-4, deepseek-chat, and gemini-2.5-pro map to Muse capabilities. Use muse-spark for chat unless your client requires an alias.

Client compatibility

Client typeDependency capabilityStatus
Dialog/Chat type (desktop, Web UI, browser plug-in)POST /v1/chat/completionsβœ… Available
Streaming output (typewriter effect)stream:true (standard SSE)βœ… Available
Code completion / inline completion plug-inPOST /v1/chat/completionsβœ… Available
Translation / summary / explanation toolsPOST /v1/chat/completionsβœ… Available
Drawing clientPOST /v1/images/generationsβœ… Available
Video generation clientPOST /v1/videos (asynchronous polling)βœ… Available
Autonomous Agent mode that requires "tool call"tool_calls / function calling⚠️ Not available
Tool calling is not supported. The muse.ai web assistant does not return structured tool_calls. Autonomous agents that require tool execution will not work reliably. If a client sends a tools field, this service accepts the request but handles it as an ordinary chat response.