将强大的 AI 生成能力集成到您的应用中。通过简单的 REST API 调用,以编程方式生成图片、视频和音乐。
告诉我们您的使用场景,我们将为您开通 API 权限。
通过统一的 API 访问 Nano Banana、Seedream、GPT Image、Veo 等多种 AI 模型。
RESTful API,Bearer 令牌认证,只需两个接口即可快速上手。
无月度最低消费,使用灵活的积分系统,按实际生成量付费。
提交生成任务后轮询结果,支持自动重试和状态追踪,适合生产环境。
| 1 | curl -X POST https://piooy.com/api/v1/generate \ |
| 2 | -H "Authorization: Bearer sk-xxxxx" \ |
| 3 | -H "Content-Type: application/json" \ |
| 4 | -d '{ |
| 5 | "mediaType": "image", |
| 6 | "model": "nano-banana-2", |
| 7 | "prompt": "a cute cat sitting on a cloud", |
| 8 | "scene": "text-to-image", |
| 9 | "options": { |
| 10 | "aspect_ratio": "1:1", |
| 11 | "resolution": "2K" |
| 12 | } |
| 13 | }' |
| 14 | |
| 15 | # Response: |
| 16 | # { "code": 0, "data": { "taskId": "xxx-xxx" } } |
| 17 | |
| 18 | curl https://piooy.com/api/v1/task/{taskId}?refresh=1 \ |
| 19 | -H "Authorization: Bearer sk-xxxxx" |