Problem / 问题
CLIProxyAPI currently cannot forward requests to Agnes AI's image and video models (by Sapiens AI, Singapore — top-10 global AI lab). Agnes provides free, unlimited multimodal API:
| Modality |
Model |
Endpoint |
| Text |
agnes-2.0-flash |
/v1/chat/completions ✅ (works via openai-compatibility) |
| Image |
agnes-image-2.1-flash |
/v1/images/generations ❌ |
| Video |
agnes-video-v2.0 |
/v1/videos (async) + polling ❌ |
When you try model: agnes-image-2.1-flash on /v1/images/generations, it either 404s or routes to Codex. /v1/videos doesn't exist at all.
Root Causes / 根因
- CLI-first architecture — CLIProxyAPI wraps CLI tools via executors. Agnes is a pure REST API with no CLI → no
AgnesExecutor.
- Image gen hardwired to Codex —
openai_images_handlers.go injects image_generation tool into Codex requests, not a generic passthrough.
- No
/v1/videos endpoint — video support only exists for Google Veo via Gemini-specific paths.
- Async mismatch — Agnes video is async (create → poll), while handlers are primarily sync/stream.
openai-compatibility only routes chat — image/video requests are silently dropped.
Proposed Solution / 方案建议
Option A (Recommended): Dedicated agnes provider
Add an agnes provider section in config.yaml (similar to xAI/Grok pattern):
agnes:
api-key-entries:
- api-key: "sk-agnes-xxx"
models:
- name: "agnes-image-2.1-flash"
- name: "agnes-video-v2.0"
Changes needed:
- New
internal/provider/agnes/ — executor implementing auth.ProviderExecutor
- Modify
openai_images_handlers.go — add generic image routing (not just Codex)
- New
openai_videos_handlers.go — async video create + poll endpoints
- Modify
internal/config/ — add Agnes config schema
- Modify
cmd/server/main.go — register routes
Image forwarding is nearly zero-translation (Agnes uses OpenAI-compatible /v1/images/generations). Video requires async handling with remixed_from_video_id → video_url normalization.
Option B (Lighter): Extend openai-compatibility
openai-compatibility:
- name: "agnes"
base-url: "https://apihub.agnes-ai.com/v1"
api-key-entries:
- api-key: "sk-agnes-xxx"
forward-images: true
forward-videos: true
Harder to implement cleanly — image/video fundamentally differ from chat completions in endpoint/response patterns.
Why This Matters / 为什么重要
- Cost: Agnes models are free, unlimited, indefinitely — zero API cost for image/video gen
- Convenience: Use any OpenAI-compatible client (Cursor, Cline) with a single proxy endpoint
- Multi-modal pipeline: Text → Image → Video through one unified config
- Community demand: Agnes recently announced indefinite free API, gaining rapid adoption
Reference / 参考
- Agnes API docs: https://agnes-ai.com/doc/overview
- Video params:
POST /v1/videos with width, height, num_frames (8n+1), frame_rate, image, mode, seed
- CLIProxyAPI SDK:
docs/sdk-advanced.md (custom providers), examples/custom-provider/
Written 2026-06-15, info verified against CLIProxyAPI v7.2.5 and Agnes AI public docs.
Problem / 问题
CLIProxyAPI currently cannot forward requests to Agnes AI's image and video models (by Sapiens AI, Singapore — top-10 global AI lab). Agnes provides free, unlimited multimodal API:
agnes-2.0-flash/v1/chat/completions✅ (works viaopenai-compatibility)agnes-image-2.1-flash/v1/images/generations❌agnes-video-v2.0/v1/videos(async) + polling ❌When you try
model: agnes-image-2.1-flashon/v1/images/generations, it either 404s or routes to Codex./v1/videosdoesn't exist at all.Root Causes / 根因
AgnesExecutor.openai_images_handlers.goinjectsimage_generationtool into Codex requests, not a generic passthrough./v1/videosendpoint — video support only exists for Google Veo via Gemini-specific paths.openai-compatibilityonly routes chat — image/video requests are silently dropped.Proposed Solution / 方案建议
Option A (Recommended): Dedicated
agnesproviderAdd an
agnesprovider section in config.yaml (similar to xAI/Grok pattern):Changes needed:
internal/provider/agnes/— executor implementingauth.ProviderExecutoropenai_images_handlers.go— add generic image routing (not just Codex)openai_videos_handlers.go— async video create + poll endpointsinternal/config/— add Agnes config schemacmd/server/main.go— register routesImage forwarding is nearly zero-translation (Agnes uses OpenAI-compatible
/v1/images/generations). Video requires async handling withremixed_from_video_id→video_urlnormalization.Option B (Lighter): Extend
openai-compatibilityHarder to implement cleanly — image/video fundamentally differ from chat completions in endpoint/response patterns.
Why This Matters / 为什么重要
Reference / 参考
POST /v1/videoswithwidth,height,num_frames(8n+1),frame_rate,image,mode,seeddocs/sdk-advanced.md(custom providers),examples/custom-provider/Written 2026-06-15, info verified against CLIProxyAPI v7.2.5 and Agnes AI public docs.