A lightweight OpenAI-compatible bridge for the Manus IM agent.
English • 中文 • 日本語 • Español • Français
manusIM-proxy is a high-performance HTTP bridge that translates OpenAI-style chat completion requests into Manus v2 API operations. It seamlessly converts Manus task events into standard OpenAI JSON or Server-Sent Events (SSE), enabling you to use Manus with your favorite AI tools like 9router, OpenCode, Claude Code, or any OpenAI-compatible SDK.
Important
This project uses the official Manus API. Keep your API keys secure, follow Manus usage terms, and never expose this service to the public internet without proper authentication.
- OpenAI Compatibility: Drop-in replacement for OpenAI endpoints (
/v1/chat/completions,/v1/models). - Streaming Support: Real-time task event streaming via SSE.
- Token Pooling: Intelligent round-robin token leasing with failover and cooldown mechanisms.
- Agent Registry: Automatically discovers and maps Manus agents to OpenAI models.
- Container Ready: Optimized Docker and Docker Compose support for easy deployment.
-
Clone and Setup
git clone https://github.com/0xgetz/manusIM-proxy.git cd manusIM-proxy python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure Environment
cp .env.example .env # Add your Manus API keys to AUTH_TOKENS in .env -
Launch
python -m app.main
docker compose up -d --build| Variable | Description | Default |
|---|---|---|
AUTH_TOKENS |
Comma-separated Manus API keys | Required |
PORT |
Service listening port | 3457 |
MANUS_API_BASE |
Upstream Manus API URL | https://api.manus.ai |
REGISTRY_REFRESH |
Interval to refresh agent list (e.g., 6h) |
6h |
SESSION_TIMEOUT |
Max polling time for a task (e.g., 30m) |
30m |
TASK_ROTATION |
Max reuse time for a created task | 10m |
DEFAULT_TASK_ID |
Pin agent-default-main_task to a specific ID |
Optional |
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:3457/v1",
api_key="proxy-key" # Any string works
)
response = client.chat.completions.create(
model="agent-default-main_task",
messages=[{"role": "user", "content": "Hello Manus!"}]
)
print(response.choices[0].message.content)curl http://localhost:3457/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "manus-1.6",
"messages": [{"role": "user", "content": "Explain the task lifecycle."}],
"stream": true
}'- Go to Providers → Custom Providers → Add OpenAI Compatible.
- Base URL:
http://127.0.0.1:3457/v1 - Model:
agent-default-main_task - Click Create and start using Manus through the 9router gateway!
Run the local test suite to verify functionality:
python3 test_pool.py
python3 test_endpoints.pyThis project is licensed under the MIT License. See the LICENSE file for details.

