Connect image and video models through one interface. Pay with credits based on the model and parameters, and track long-running tasks asynchronously.
Text to image / Image to image
Text to image / Image to image
Text to image / Image to image
Ask Codex or another coding agent to create images and videos, upload local references, and save the results. No skill or MCP installation required.
Read /openapi.md and follow its workflow for this task: [describe the image or video]. Reuse saved PixZoo credentials; if none exist, start browser authorization and show me the authorization link and code. Never show secrets, automatically retry an ambiguous generation submission, or lose the original outputs; save them locally.
Requires network access and Python 3.9+. On first use, sign in and approve tool access; credentials are saved in the tool environment and renewed automatically. Developer API keys remain supported.
Choose a model and parameters for your task. See the current directory for supported capabilities and pricing rules.
gpt-image-2Text to image / Image to image
gpt-image-2.5-flareText to image / Image to image
gpt-image-2.5-sunburstText to image / Image to image
z-image-turboText to image
seedream-5.0Text to image / Image to image
seedream-5.0-flashText to image / Image to image
seedream-5.0-proText to image / Image to image
wan2.5-text-to-imageText to image
qwen-image-edit-plusImage to image
nano-banana-2Text to image / Image to image
nano-banana-2.1Text to image / Image to image
nano-banana-proText to image / Image to image
seedance-2.0Text to video / Image to video
seedance-2.0-fastText to video / Image to video
seedance-2.0-miniText to video / Image to video
seedance-2.5Text to video / Image to video
veo3.1-fast-officialText to video / Image to video
veo3.1-quality-officialText to video / Image to video
veo3.1-fastText to video / Image to video
veo3.1-qualityText to video / Image to video
kling-v3Text to video / Image to video
wan3.0-videoText to video / Image to video
grok-imagine-imageText to image / Image to image
grok-imagine-videoText to video / Image to video
gemini-omni-flashText to video / Image to video
gpt-image-2-officialText to image / Image to image
nano-banana-2-officialText to image / Image to image
nano-banana-pro-officialText to image / Image to image
Submit once with generate, then query the saved site task ID every 10 seconds. Upload local references first. Do not resubmit when a request times out.
API keys allow uploads, generation (including image processing), and querying your own tasks only. They cannot purchase credits, change account settings, or manage keys. Generation spends existing account credits. Use this request header:
Authorization: Bearer sk-<your-api-key>
Content-Type: application/json| model | Name | Supported Scenes |
|---|---|---|
| gpt-image-2 | GPT Image 2 | Text to image / Image to image |
| gpt-image-2.5-flare | GPT Image 2.5 Flare | Text to image / Image to image |
| gpt-image-2.5-sunburst | GPT Image 2.5 Sunburst | Text to image / Image to image |
| z-image-turbo | Z Image Turbo | Text to image |
| seedream-5.0 | Seedream 5.0 | Text to image / Image to image |
| seedream-5.0-flash | Seedream 5.0 Flash | Text to image / Image to image |
| seedream-5.0-pro | Seedream 5.0 Pro | Text to image / Image to image |
| wan2.5-text-to-image | wan2.5-text-to-image | Text to image |
| qwen-image-edit-plus | Qwen Image | Image to image |
| nano-banana-2 | Nano Banana 2 | Text to image / Image to image |
| nano-banana-2.1 | Nano Banana 2.1 | Text to image / Image to image |
| nano-banana-pro | Nano Banana Pro | Text to image / Image to image |
| seedance-2.0 | Seedance 2.0 | Text to video / Image to video |
| seedance-2.0-fast | Seedance 2.0 Fast | Text to video / Image to video |
| seedance-2.0-mini | Seedance 2.0 Mini | Text to video / Image to video |
| seedance-2.5 | Seedance 2.5 | Text to video / Image to video |
| veo3.1-fast-official | Veo3.1 Fast | Text to video / Image to video |
| veo3.1-quality-official | Veo3.1 Quality | Text to video / Image to video |
| veo3.1-fast | Veo3.1 Fast Lite | Text to video / Image to video |
| veo3.1-quality | Veo3.1 Quality Lite | Text to video / Image to video |
| kling-v3 | Kling V3 | Text to video / Image to video |
| wan3.0-video | Wan 3.0 Video | Text to video / Image to video |
| grok-imagine-image | Grok Imagine Image | Text to image / Image to image |
| grok-imagine-video | Grok Imagine Video | Text to video / Image to video |
| gemini-omni-flash | Gemini Omni Flash | Text to video / Image to video |
| gpt-image-2-official | gpt-image-2-official | Text to image / Image to image |
| nano-banana-2-official | nano-banana-2-official | Text to image / Image to image |
| nano-banana-pro-official | nano-banana-pro-official | Text to image / Image to image |
Image and video models and full capabilities: /openapi/models.json
/api/ai/generate/Submit one image or video task. Save data.id and query it for results. Submission is not idempotent.| Field | Type | Required | Description |
|---|---|---|---|
| mediaType | string | ✓ | image or video |
| model | string | ✓ | Model identifier — see available models above |
| prompt | string | ✓ | Text prompt for generation |
| scene | string | Use a scene supported by the selected model: text-to-image, image-to-image, text-to-video or image-to-video | |
| options.aspectRatio | string | Aspect ratio, e.g. "1:1", "16:9", "9:16" | |
| options.resolution | string | Resolution tier, e.g. "1K", "2K", "4K" | |
| options.referenceImages | {url, role?}[] | Ordered reference objects with url and optional role: firstFrame, lastFrame or reference |
import json, os
from urllib.request import Request, build_opener, HTTPRedirectHandler
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, *args):
return None
body = {
"schemaVersion": 1,
"mediaType": "image",
"model": "nano-banana-2",
"prompt": "A red panda reading a book, soft natural light",
"scene": "text-to-image",
"options": {
"aspectRatio": "1:1"
}
}
request = Request(
"https://pixzoo.ai/api/ai/generate/",
data=json.dumps(body).encode(),
headers={"Authorization": "Bearer " + os.environ["PIXZOO_API_KEY"],
"Content-Type": "application/json"},
)
# One attempt. Never retry an ambiguous generation submission.
with build_opener(NoRedirect()).open(request, timeout=180) as response:
result = json.load(response)
if result.get("code") != 0:
raise RuntimeError("PixZoo API rejected the request")
from pathlib import Path
Path("pixzoo-task-id.txt").write_text(result["data"]["id"])
print("Task ID saved; query the same ID for results")
# Full resumable upload/wait/download workflow: https://pixzoo.ai/openapi.md{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "queuing"
}
}{
"schemaVersion": 1,
"mediaType": "video",
"model": "seedance-2.0",
"prompt": "A red panda reading a book, slow camera dolly, soft natural light",
"scene": "text-to-video",
"options": {
"aspectRatio": "16:9"
}
}Use the current model directory for supported scenes, reference limits, durations and resolutions. Upload references before passing canonical referenceImages/referenceVideos/referenceAudios.
Reserve and complete accept Authorization: Bearer API_KEY with application/json. PUT file bytes directly to the returned storage URL. Existing reachable URLs can be passed to generation without uploading again.
/api/storage/presign/| Field | Type | Required | Description |
|---|---|---|---|
| filename | string | ✓ | Original filename, 1–255 characters. |
| contentType | string | ✓ | Actual MIME type from the supported list below. |
| size | integer | ✓ | Actual original file length in bytes, as a positive integer; not MB. |
| purpose | "media" | Use media for ordinary reference uploads without creating a material-library record. |
Request JSON
{
"filename": "reference.png",
"contentType": "image/png",
"size": 1024,
"purpose": "media"
}Response example (domains, signatures, IDs and times are placeholders)
{
"code": 0,
"message": "ok",
"data": {
"uploadId": "11111111-1111-4111-8111-111111111111",
"uploadUrl": "https://storage.example.test/pending/reference.png?signature=example",
"headers": {
"Content-Type": "image/png"
},
"expiresAt": "2030-01-01T00:05:00.000Z"
}
}Use the original file bytes as the entire request body with data.headers. Do not send JSON, multipart, cookies or the PixZoo API key to storage. Check the PUT HTTP status before completion.
/api/storage/complete/| Field | Type | Required | Description |
|---|---|---|---|
| uploadId | UUID | ✓ | The UUID uploadId returned by presign. The same user must complete it. |
Request JSON
{
"uploadId": "11111111-1111-4111-8111-111111111111"
}Response example (domains, signatures, IDs and times are placeholders)
{
"code": 0,
"message": "ok",
"data": {
"uploadId": "11111111-1111-4111-8111-111111111111",
"key": "uploads/example/reference.png",
"url": "https://media.example.test/uploads/reference.png",
"filename": "reference.png",
"size": 1024,
"materialId": null
}
}The signed URL expires after 5 minutes; completion has a 1-hour window. Completion is idempotent for the same uploadId: retry only completion after a lost response. Use the final data.url as a reference, never the temporary uploadUrl. Models may have tighter reference limits.
| MIME type | Maximum size |
|---|---|
| image/jpeg | 25 MiB |
| image/png | 25 MiB |
| image/webp | 25 MiB |
| image/gif | 25 MiB |
| image/svg+xml | 5 MiB |
| video/mp4 | 100 MiB |
| video/webm | 100 MiB |
| video/quicktime | 100 MiB |
| audio/mpeg | 25 MiB |
| audio/wav | 25 MiB |
| audio/x-wav | 25 MiB |
| audio/mp4 | 25 MiB |
| audio/aac | 25 MiB |
| audio/ogg | 25 MiB |
/api/ai/query/Query an owned site task ID every 10 seconds. Success, failed and canceled are terminal; a timeout is not task failure.| Field | Type | Required | Description |
|---|---|---|---|
| taskId | string | ✓ | Task ID returned by /api/ai/generate/ |
import json, os
from urllib.request import Request, build_opener, HTTPRedirectHandler
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, *args):
return None
body = {
"taskId": "replace-with-site-task-id"
}
request = Request(
"https://pixzoo.ai/api/ai/query/",
data=json.dumps(body).encode(),
headers={"Authorization": "Bearer " + os.environ["PIXZOO_API_KEY"],
"Content-Type": "application/json"},
)
# One attempt. Never retry an ambiguous generation submission.
with build_opener(NoRedirect()).open(request, timeout=180) as response:
result = json.load(response)
if result.get("code") != 0:
raise RuntimeError("PixZoo API rejected the request")
print("Task status:", result["data"]["status"])
# Full resumable upload/wait/download workflow: https://pixzoo.ai/openapi.md{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "processing",
"outputImages": null
}
}{
"code": 0,
"message": "ok",
"data": {
"id": "3f2a1b4c-...",
"status": "success",
"outputImages": [
"https://gempix.cn/outputs/xxx.png"
]
}
}| status | Description |
|---|---|
| queuing | Queued, waiting to be processed |
| pending | Submitted to AI provider, awaiting response |
| processing | Being processed by AI provider |
| success | Generation succeeded; outputImages contains original image or video URLs |
| failed | Generation failed — credits have been automatically refunded |
| canceled | Task canceled; stop querying |
Check HTTP status and JSON code. HTTP 200 with code -1 is a business error. Stop on invalid credentials or insufficient credits; do not automatically resubmit generation.
{
"code": -1,
"message": "insufficient credits"
}no authAPI Key is invalid or missinginsufficient creditsInsufficient creditstask not foundTask does not existno permissionNot authorized to access this task (belongs to another user)Create and copy a key on this page. Each account can have up to 10 keys for separate projects.
Loading API keys…
Authentication, local uploads, billing and task recovery.
Choose a model and authorize your AI tool to start generating images or videos.
Image and video generation · Asynchronous tasks · Original results