@@ -21,16 +21,14 @@ batch generation, and one-click deployment to Cloudflare Pages.
2121## Features
2222
2323- ** Multiple AI Providers** - Gitee AI, HuggingFace Spaces, ModelScope
24- - ** Image-to-Video** - Generate videos from images (Gitee AI)
2524- ** Dark Mode UI** - Gradio-style with frosted glass effects
2625- ** Flexible Sizing** - Multiple aspect ratios (1:1, 16:9, 9:16, 4:3, etc.)
27- - ** 4x Upscaling** - RealESRGAN integration
2826- ** Secure Storage** - API keys encrypted with AES-256-GCM
2927- ** Token Rotation** - Multiple API keys with automatic failover on rate limits
3028- ** History (Lightweight)** - Stores metadata (URL + params) in localStorage with 24h TTL
3129- ** Flow Mode** - Visual canvas for batch generation (experimental)
3230 - Images are referenced by remote URLs (no blob caching)
33- - Flow state is persisted locally; downloads use a proxy endpoint for CORS-safe fetches
31+ - Flow state is persisted locally
3432
3533## Token Rotation
3634
@@ -92,20 +90,30 @@ Open `http://localhost:5173`
9290
9391## API Usage
9492
95- After deployment, you can call the API directly:
93+ After deployment, you can call the OpenAI-format API directly:
9694
9795``` bash
98- curl -X POST https://your-project.pages.dev/api/generate \
96+ curl -X POST https://your-project.pages.dev/v1/images/generations \
9997 -H " Content-Type: application/json" \
100- -H " X-API-Key: your-gitee-api-key" \
101- -d ' {"prompt": "a cute cat", "width": 1024, "height": 1024}'
98+ -H " Authorization: Bearer gitee:your-gitee-api-key" \
99+ -d ' {
100+ "model": "gitee/z-image-turbo",
101+ "prompt": "a cute cat",
102+ "size": "1024x1024",
103+ "steps": 9,
104+ "n": 1,
105+ "response_format": "url"
106+ }'
102107```
103108
104109Notes:
105110
106111- The API returns the ** raw provider image URL** (e.g. HuggingFace Space ` gradio_api/file=... ` ).
107112- Some provider URLs are ** temporary** (HF Space files often expire around 24 hours).
108- - For CORS-safe downloads, use the built-in proxy endpoint: ` GET /api/proxy-image?url=... ` .
113+ - Provider routing is via the ` model ` prefix:
114+ - ` gitee/... ` -> Gitee AI (` Authorization: Bearer gitee:... ` )
115+ - ` ms/... ` -> ModelScope (` Authorization: Bearer ms:... ` )
116+ - no prefix -> HuggingFace (token optional; ` Authorization: Bearer <token> ` or ` Authorization: Bearer hf:<token> ` )
109117
110118📖 ** [ Full API Reference] ( ./docs/en/API.md ) ** - Providers, parameters, code examples
111119
0 commit comments