Overview
OpenAI / Anthropic-compatible HTTP proxy for MuleRun's multimodal generation.
cli2api wraps MuleRun's text, image, video, speech and
music generation behind OpenAI- and Anthropic-compatible HTTP endpoints.
Point your existing openai / anthropic SDK at it via base_url — no business
code changes.
A single Go binary (~12 MB), distroless-image ready, zero CGO.
What it does
Text
/v1/chat/completions, /v1/messages, /v1/responses — thin proxies with SSE streaming.
Image
/v1/images/generations + /v1/images/edits — synchronous, OpenAI shape.
Video
/v1/videos submit + poll — async jobs (Sora, Veo, Kling, Seedance, Wan).
Speech & Music
/v1/audio/speech (sync bytes) + /v1/audio/music (async job).
Why a proxy?
MuleRun's /v1/chat/completions and /v1/messages are already OpenAI/Anthropic
compatible — you can call them directly. But image/video/audio go through a
/vendors/{vendor}/... async job shape that looks nothing like the OpenAI
API. cli2api hides that difference so your existing SDK code runs unchanged:
- synchronous image & speech endpoints internally poll MuleRun until done
- asynchronous video & music endpoints expose a clean submit + poll job API
- 70+ models registered:
gpt-image-2,nano-bananafamily,sora-2,veo,kling-v3-omni,wan2.6-*,midjourney,seedance-2.0-*,speech-2.8-hd,music-2.5, …