You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix: image download fails — API returns HTTP URLs but OSS CDN requires HTTPS #93
The mmx image generate command fails with Network request failed when trying to download generated images.
Root Cause
The MiniMax Image Generation API returns image URLs using HTTP (e.g. http://hailuo-image-*.oss-us-east-1.aliyuncs.com/...), but the Alibaba Cloud OSS US East CDN blocks HTTP traffic from many regions, causing fetch() to fail with Network request failed.
The API supports response_format: base64 which returns base64-encoded images directly, completely bypassing the CDN download step. This is useful as a fallback when CDN URLs are unreachable.
Files Changed
File
Change
src/files/download.ts
Force HTTPS + retry logic (3 attempts, exponential backoff)
src/commands/image/generate.ts
Add `--response-format <url
src/types/api.ts
Add response_format to ImageRequest, image_base64 to ImageResponse
Both modes produce valid JPEG images successfully.
Note
This is an infrastructure-side issue (OSS CDN blocking HTTP) that the CLI can work around on the client side. The ideal long-term fix would be for MiniMax to return HTTPS URLs directly from the API.
Activity