This post uses the community’s open-source promotion format and complies with the promotion requirements. I declare that I will follow the following community requirements:
- My post has been tagged with the #开源推广::tag tag: Yes
- My open-source project is fully open source, with no closed-source components: Yes
- Screenshots of the AI-generated and AI-polished portions of the project description in my post have been provided: Yes
- I promise that the above selections will remain permanently valid and accept supervision from the community and fellow members: Yes
Project link:
[Open Source] MUSE2API: Reverse-engineering Muse (muse.ai) into an OpenAI-compatible API, supporting text-to-image/image generation, text-to-video + multi-account pool rotation + automatic 48-hour keep-alive
Hello everyone!
I’ve been using muse.ai a lot recently and found that its web version offers excellent multimodal capabilities (very high-quality image generation, free 2K high-definition images, and native support for 5-second/10-second text-to-video and first-frame image-to-video generation). Its free quota is also quite generous.
For information on registering a MUSE AI account, search the forum.
However, the pain points are obvious:
- The official service does not provide an API, so it cannot be integrated into the NextChat, LobeChat, One API, New API, or self-hosted workflows we use every day;
- Meta Cookies only last about 48 hours. Manually capturing packets is not only annoying, but also has to be repeated every couple of days—extremely frustrating;
- A single account’s quota is easily used up, and there is no multi-account rotation or keep-alive mechanism.
Inspired by the various *2api projects on the forum, I spent time reverse-engineering and wrapping Muse’s web version into a complete OpenAI-compatible API service — MUSE2API. The code has been thoroughly sanitized and open-sourced!
Project Highlights
Standard conversation interface (Chat Completions)
- Fully compatible with
/v1/chat/completions, supporting streaming SSE typewriter output and non-streaming responses. - Built-in intelligent routing for common model names (supporting aliases such as
gpt-4oandclaude-3-5-sonnet).
- Fully compatible with
High-quality image generation (Images Generations)
- Integrates with
/v1/images/generations, supporting aspect ratios such as1:1,16:9, and9:16, with direct URL or Base64 responses.
- Integrates with
Text-to-video / first-frame image-to-video (Videos)
- Natively supports 5-second/10-second high-definition video generation and first-frame image-to-video generation.
- Asynchronous task architecture (
/v1/videosfor creation +/v1/videos/{task_id}for polling); once generation is complete, results are automatically persisted and made available via a direct link.
Multi-account pool and intelligent load balancing
- Supports batch importing any number of accounts and automatically rotates them using LRU (least recently used), making full use of each account’s quota.
- Invalid accounts or accounts with exhausted quotas are automatically isolated and failed over.
Exclusive automatic 48-hour session keep-alive and renewal
- Includes a background heartbeat engine that regularly checks session activity and extends the expiration time of Meta Cookies, eliminating the need for frequent logins!
Matching Chrome one-click account-import extension (zero setup required)
- No need to capture packets with F12! Install the companion extension in your browser, open the webpage, click once, and push your login session directly to the service.
Dark-mode operations console (Web Console)
- Comes with a modern, standalone single-file Web UI with no external CDN dependencies. It provides intuitive monitoring of account health, quotas, and generation history, along with an online testing tool.
Launch with one line of Docker Compose
- The image includes headless Chromium, Chinese fonts (to prevent garbled text), and automatic cleanup of leftover locks—ready to use out of the box.

