{"skill":{"slug":"openclaw-aisa-llm-image-video-qwen-wan26-gemini-3-pro-image","displayName":"Generate images & videos with: Gemini 3 Pro Image + Qwen Wan 2.6 (video) via one API key","summary":"Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.","description":"---\nname: openclaw-media-gen\ndescription: \"Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.\"\nhomepage: https://openclaw.ai\nmetadata: {\"openclaw\":{\"emoji\":\"🎬\",\"requires\":{\"bins\":[\"python3\",\"curl\"],\"env\":[\"AISA_API_KEY\"]},\"primaryEnv\":\"AISA_API_KEY\"}}\n---\n\n# OpenClaw Media Gen 🎬\n\nGenerate **images** and **videos** with one AIsa API key:\n\n- **Image**: `gemini-3-pro-image-preview` (Gemini GenerateContent)\n- **Video**: `wan2.6-t2v` (Qwen Wan 2.6 / Tongyi Wanxiang, async task)\n\nAPI Reference: [AIsa API Reference](https://aisa.mintlify.app/api-reference/introduction) (all pages available at `https://aisa.mintlify.app/llms.txt`)\n\n## 🎯 Pricing Advantage\n\n### Video Generation (WAN) - Cost Comparison\n\n| Resolution | AIsa (Contract) | AIsa (Official) | Bailian (Official) | OpenRouter |\n|------------|-----------------|-----------------|-------------------|------------|\n| 720P | **$0.06/sec** | ~$0.08 | ~$0.10 | ❌ |\n| 1080P | **$0.09/sec** | ~$0.12 | ~$0.15 | ❌ |\n| Pro/Animate | **$0.108–0.156** | ~$0.18 | ~$0.25 | ❌ |\n\n**Key Benefits**:\n- **25-40% cheaper** than Bailian official pricing\n- **OpenRouter doesn't support video** - AIsa is the only unified API with video generation\n- Contract pricing available for production workloads\n- Single API key for both image and video generation\n\n## 🔥 What You Can Do\n\n### Image Generation (Gemini)\n```\n\"Generate a cyberpunk cityscape at night, neon lights, rainy, cinematic\"\n```\n\n### Video Generation (Wan 2.6)\n```\n\"Use a reference image to generate a 5-second shot: slow camera push-in, wind blowing hair, cinematic, shallow depth of field\"\n```\n\n## Quick Start\n\n```bash\nexport AISA_API_KEY=\"your-key\"\n```\n\n---\n\n## 🖼️ Image Generation (Gemini)\n\n### Endpoint\n\n- Base URL: `https://api.aisa.one/v1`\n- `POST /models/{model}:generateContent`\n\nDocumentation: `google-gemini-chat` (GenerateContent) at `https://aisa.mintlify.app/api-reference/chat/chat-api/google-gemini-chat.md`\n\n### curl Example (returns inline_data for images)\n\n```bash\ncurl -X POST \"https://api.aisa.one/v1/models/gemini-3-pro-image-preview:generateContent\" \\\n  -H \"Authorization: Bearer $AISA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"contents\":[\n      {\"role\":\"user\",\"parts\":[{\"text\":\"A cute red panda, ultra-detailed, cinematic lighting\"}]}\n    ]\n  }'\n```\n\n> Note: Response may contain `candidates[].parts[].inline_data` (typically with base64 data and mime type); client script automatically parses and saves the file.\n\n---\n\n## 🎞️ Video Generation (Qwen Wan 2.6 / Tongyi Wanxiang)\n\n### Create Task\n\n- Base URL: `https://api.aisa.one/apis/v1`\n- `POST /services/aigc/video-generation/video-synthesis`\n- Header: `X-DashScope-Async: enable` (required for async)\n\nDocumentation: `video-generation` at `https://aisa.mintlify.app/api-reference/aliyun/video/video-generation.md`\n\n```bash\ncurl -X POST \"https://api.aisa.one/apis/v1/services/aigc/video-generation/video-synthesis\" \\\n  -H \"Authorization: Bearer $AISA_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-DashScope-Async: enable\" \\\n  -d '{\n    \"model\":\"wan2.6-t2v\",\n    \"input\":{\n      \"prompt\":\"cinematic close-up, slow push-in, shallow depth of field\",\n      \"img_url\":\"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/320px-Cat03.jpg\"\n    },\n    \"parameters\":{\n      \"resolution\":\"720P\",\n      \"duration\":5,\n      \"shot_type\":\"single\",\n      \"watermark\":false\n    }\n  }'\n```\n\n### Poll Task Status\n\n- `GET /services/aigc/tasks?task_id=...`\n\nDocumentation: `task` at `https://aisa.mintlify.app/api-reference/aliyun/video/task.md`\n\n```bash\ncurl \"https://api.aisa.one/apis/v1/services/aigc/tasks?task_id=YOUR_TASK_ID\" \\\n  -H \"Authorization: Bearer $AISA_API_KEY\"\n```\n\n---\n\n## Python Client\n\n```bash\n# Generate image (save to local file)\npython3 {baseDir}/scripts/media_gen_client.py image \\\n  --prompt \"A cute red panda, cinematic lighting\" \\\n  --out \"out.png\"\n\n# Create video task (requires img_url)\npython3 {baseDir}/scripts/media_gen_client.py video-create \\\n  --prompt \"cinematic close-up, slow push-in\" \\\n  --img-url \"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/320px-Cat03.jpg\" \\\n  --duration 5\n\n# Poll task status\npython3 {baseDir}/scripts/media_gen_client.py video-status --task-id YOUR_TASK_ID\n\n# Wait until success (optional: print video_url on success)\npython3 {baseDir}/scripts/media_gen_client.py video-wait --task-id YOUR_TASK_ID --poll 10 --timeout 600\n\n# Wait until success and auto-download mp4\npython3 {baseDir}/scripts/media_gen_client.py video-wait --task-id YOUR_TASK_ID --download --out out.mp4\n```\n\n## 💡 Use Cases\n\n- **AI Agents**: Automate visual content generation for social media, marketing materials\n- **Content Creators**: Generate custom images and videos programmatically\n- **Developers**: Build apps with multimodal generation capabilities\n- **Businesses**: Cost-effective alternative to Bailian with better pricing\n\n## 🚀 Why AIsa for Media Generation?\n\n1. **Unified API**: Single key for both images (Gemini) and videos (WAN)\n2. **Best Pricing**: 25-40% cheaper than alternatives\n3. **Production Ready**: Contract pricing and enterprise support available\n4. **No Competition**: OpenRouter doesn't support video generation\n5. **Simple Integration**: Python client with async task management built-in\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":1397,"installsAllTime":52,"installsCurrent":0,"stars":2,"versions":1},"createdAt":1770562943290,"updatedAt":1778486086401},"latestVersion":{"version":"1.0.0","createdAt":1770562943290,"changelog":"**Major update: Introduced pricing details, clarified use cases, and emphasized unique advantages of the API.**\n\n- Added comprehensive pricing comparisons and highlighted cost savings over competitors.\n- Introduced a new \"Use Cases\" section for various audiences (AI agents, content creators, developers, businesses).\n- Added a \"Why AIsa for Media Generation?\" section listing unique benefits.\n- Python client example references remain unchanged in usage, but relocation of the script file: moved `media_gen_client.py` out of the `scripts/` folder to the root directory.\n- All content/instructions now in English; legacy Chinese content removed for clarity and consistency.","license":null},"metadata":{"setup":[{"key":"AISA_API_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"aisadocs","userId":"s172yz541n4361fw0sapygg0r583eghk","displayName":"AIsa","image":"https://avatars.githubusercontent.com/u/245991925?v=4"},"moderation":null}