media-generation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMedia Generation with StableStudio
借助StableStudio生成媒体内容
Generate images and videos via x402 payments at .
https://stablestudio.dev在上通过x402支付方式生成图片和视频。
https://stablestudio.devSetup
准备工作
If the agentcash CLI is not yet installed, see rules/getting-started.md for installation and wallet setup.
如果尚未安装agentcash CLI,请查看rules/getting-started.md了解安装和钱包设置方法。
Quick Reference
快速参考
| Task | Endpoint | Cost | Time |
|---|---|---|---|
| Image (default) | | $0.13-0.24 | ~10s |
| Image (budget) | | $0.039 | ~5s |
| Video (default) | | $1.60-3.20 | 1-2min |
| Video (budget) | | $0.34-1.02 | 2-5min |
| Image edit | | $0.13-0.24 | ~10s |
| 任务 | 接口地址 | 费用 | 耗时 |
|---|---|---|---|
| 图片(默认) | | $0.13-0.24 | ~10秒 |
| 图片(经济型) | | $0.039 | ~5秒 |
| 视频(默认) | | $1.60-3.20 | 1-2分钟 |
| 视频(经济型) | | $0.34-1.02 | 2-5分钟 |
| 图片编辑 | | $0.13-0.24 | ~10秒 |
Image Generation
图片生成
Recommended: nano-banana-pro (best quality/cost)
bash
npx agentcash fetch https://stablestudio.dev/api/x402/nano-banana-pro/generate -m POST -b '{
"prompt": "a cat wearing a space helmet, photorealistic",
"aspectRatio": "16:9",
"imageSize": "2K"
}'Options:
- : "1:1", "16:9", "9:16"
aspectRatio - : "1K", "2K", "4K" (nano-banana-pro only)
imageSize
推荐使用:nano-banana-pro(性价比最高)
bash
npx agentcash fetch https://stablestudio.dev/api/x402/nano-banana-pro/generate -m POST -b '{
"prompt": "a cat wearing a space helmet, photorealistic",
"aspectRatio": "16:9",
"imageSize": "2K"
}'可选参数:
- : "1:1", "16:9", "9:16"
aspectRatio - : "1K", "2K", "4K"(仅nano-banana-pro支持)
imageSize
Video Generation
视频生成
Recommended: veo-3.1 (best quality/cost)
bash
npx agentcash fetch https://stablestudio.dev/api/x402/veo-3.1/generate -m POST -b '{
"prompt": "a timelapse of clouds moving over mountains",
"durationSeconds": "6",
"aspectRatio": "16:9"
}'Options:
- : "4", "6", "8"
durationSeconds - : "16:9", "9:16"
aspectRatio
推荐使用:veo-3.1(性价比最高)
bash
npx agentcash fetch https://stablestudio.dev/api/x402/veo-3.1/generate -m POST -b '{
"prompt": "a timelapse of clouds moving over mountains",
"durationSeconds": "6",
"aspectRatio": "16:9"
}'可选参数:
- : "4", "6", "8"
durationSeconds - : "16:9", "9:16"
aspectRatio
Job Polling
任务轮询
Generation returns a . Poll until complete:
jobIdbash
npx agentcash fetch-auth https://stablestudio.dev/api/x402/jobs/{jobId}Poll images every 3s, videos every 10s. Result contains or .
imageUrlvideoUrl生成请求会返回一个。需要轮询直到任务完成:
jobIdbash
npx agentcash fetch-auth https://stablestudio.dev/api/x402/jobs/{jobId}图片任务每3秒轮询一次,视频任务每10秒轮询一次。结果中会包含或。
imageUrlvideoUrlImage Editing
图片编辑
Requires uploading the source image first. See rules/uploads.md.
bash
npx agentcash fetch https://stablestudio.dev/api/x402/nano-banana-pro/edit -m POST -b '{
"prompt": "change the background to a beach sunset",
"images": ["https://...blob-url..."]
}'需要先上传源图片。请查看rules/uploads.md。
bash
npx agentcash fetch https://stablestudio.dev/api/x402/nano-banana-pro/edit -m POST -b '{
"prompt": "change the background to a beach sunset",
"images": ["https://...blob-url..."]
}'Model Comparison
模型对比
| Model | Type | Best For |
|---|---|---|
| nano-banana-pro | Image | General purpose, up to 4K |
| nano-banana | Image | Quick drafts, budget |
| gpt-image-1.5 | Image | Fast, variable quality |
| veo-3.1 | Video | High quality, 1080p |
| wan-2.5 | Video | Budget, text or image input |
| sora-2 | Video | Premium quality |
| 模型 | 类型 | 最佳适用场景 |
|---|---|---|
| nano-banana-pro | 图片 | 通用场景,最高支持4K |
| nano-banana | 图片 | 快速草稿,经济型 |
| gpt-image-1.5 | 图片 | 速度快,质量可变 |
| veo-3.1 | 视频 | 高质量,1080p |
| wan-2.5 | 视频 | 经济型,支持文本或图片输入 |
| sora-2 | 视频 | 高品质旗舰款 |