One API contract
Use consistent authentication, task states, errors, and output formats across model providers.
One API for leading image and video models. See the credit cost before every request—no token guesswork.
curl https://api.pixapi.ai/v1/images/generations \ -H "Authorization: Bearer $PIXAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-image-2", "prompt": "A cinematic product hero shot", "n": 1, "size": "1024x1024" }'No token guesswork. Estimate costs before sending a request, run all models from one balance, and pay nothing for eligible failed tasks.
Choose model, target resolution, quality tier, or video duration. Each parameter follows clear catalog rules and unit rates.
Images are billed per output, video per second. At 1 credit = $0.01, quickly convert credit estimates into budget projections.
Credits deduct against your shared key ledger on task completion. Eligible failed requests are not charged or are automatically refunded per model policy.
4 credits/image × 10 images = 40 credits
= $0.40
13 credits/sec × 5s = 65 credits
= $0.65
Curated image and video generation models with a unified account, consistent request style, and transparent credit costs.
Save 40%Gemini 3.1 Flash Lite Image generation and editing for high-volume products where speed and low cost matter most.
Price
2 Credits/image
Save 20-34%OpenAI image generation and editing model with quality tiers, custom sizes, and strong prompt adherence.
Price
from 1 Credit/image
Save ≤20%FLUX.2 Pro image generation and editing with 1MP through 4MP resolution controls.
Price
from 3 Credits/image
Save ≤22%Seedream 5.0 Pro image generation and editing through Pixapi's OpenAI-compatible image endpoints.
Price
from 4 Credits/image

Qwen Image 3.0 image generation and editing through Pixapi's OpenAI-compatible image endpoints.
Price
3 Credits/image

Grok Imagine text-to-image generation through Pixapi.
Price
2 Credits/image

Wan 2.7 Image image generation and editing through Pixapi's OpenAI-compatible image endpoints.
Price
3 Credits/image

Fast Stable Diffusion 3.5 Large image generation and editing.
Price
4 Credits/image
Copy a single prompt to Codex, Cursor, or any coding agent so it understands Pixapi's models and endpoint patterns before writing code.
Please read Pixapi's AI documentation and write production-ready code based only on the current Pixapi API docs.
Primary reference:
https://pixapi.ai/llms-full.txt
Also check these pages if needed:
https://pixapi.ai/docs/api-reference/
https://pixapi.ai/docs/guides/async-tasks/
https://pixapi.ai/docs/models/gemini-2.5-flash-image/
https://pixapi.ai/docs/models/seedance/
About Pixapi: Pixapi is a unified visual AI API gateway. It uses one account, one API key, usage-based credits, and separate endpoints for image and video workflows.
My task:
Write Node.js code that:
1. Generates an image with gemini-2.5-flash-image using POST /v1/images/generations.
2. Reads the generated image URL from response.data[0].url.
3. Creates a short image-to-video task with model seedance-2-fast using POST /v1/async/videos/generations.
4. Passes the generated image URL as image.
5. Uses seconds for video length (4 to 15 for Seedance 2 Fast) and resolution such as 720p.
6. Polls GET /v1/tasks/{id} until the task is completed.
7. Returns the final video URL from result.data[0].url.
Important constraints:
- Do not use async=true or "async": true.
- Do not use /v1/videos/generations.
- For Seedance 2 Fast, seconds must be between 4 and 15. Use resolution for clarity (for example 720p). Do not use size or duration.
- Do not use image_url or input_image; use image for image-to-video.
- Keep the API key server-side and read it from process.env.PIXAPI_KEY.A familiar REST interface and predictable response format keep integration work small—even when the underlying model changes.
Open the developer console, create a scoped key, and keep it safely in your server environment.
Use the same endpoint for supported image and video models. Change models with one request field.
Monitor credits and requests from one account while Pixapi handles provider routing and availability.
curl --request POST \
--url https://api.pixapi.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-2.5-flash-image",
"prompt": "A cinematic product shot",
"size": "1:1"
}'One platform, clear usage records, and production-minded support so you can focus on shipping image and video features.
Use consistent authentication, task states, errors, and output formats across model providers.
Estimate model costs before launch and monitor every request from the same developer console.
Access selected provider channels without maintaining separate accounts, SDKs, and invoices.
If upstream providers time out or fail, credits for eligible tasks are refunded or never billed according to the model policy.
Create, rotate, and revoke API keys while keeping secret credentials on your server.
Open support tickets with request IDs and model details when an integration needs help.
Visual AI API platform
Pixapi keeps model access, API keys, credits, usage records, and async task handling in one developer workflow.
Everything you need to know before routing production image and video workloads through Pixapi.
Create an API key, choose a model, and send your first image or video request in minutes.