Product shots, blog illustrations, campaign assets: more teams now generate images from their own systems instead of clicking through a web UI one picture at a time. The catch is that every image model has its own API shape, pricing and response format, so supporting two or three vendors means maintaining several integrations. This guide shows how to call GPT Image, Nano Banana Pro, Gemini Flash Image and Doubao Seedream through a single Zivv key — how to choose a model, how pricing works, how to generate and edit images, and the pitfalls worth avoiding.
Available Image Models
| Model | Positioning |
|---|---|
| gpt-image-2 | OpenAI image generation and editing |
| gpt-image-2.5-sunburst / gpt-image-2.5-flare | Two variants of OpenAI GPT Image 2.5 |
| nano-banana-pro | Google Nano Banana Pro (Gemini 3 Pro Image), high-quality generation and editing |
| gemini-3.1-flash-image | Google Gemini 3.1 Flash Image, fast generation and editing |
| doubao-seedream-5-0-pro-260628 | Doubao Seedream 5.0 Pro, built for precise image editing |
All of them accept text plus reference images and return images. For the current list, filter the Model Hub by image output.
Choosing a Model
- Best visual quality and detail: nano-banana-pro or the two GPT Image 2.5 variants — generate a few samples on each and compare styles
- High volume, speed, cost control: gemini-3.1-flash-image or gpt-image-2
- Targeted edits to an existing image: doubao-seedream-5-0-pro-260628 is positioned for precise editing, and the gpt-image models work with the edit endpoint below
- Text rendered inside the image, or region-specific styles: test several models; results vary a lot between them
Spec sheets say little about how images will actually look. The reliable method is to take five to ten of your own typical prompts, run them on a few models, compare the output by eye, and only then pick a default.
Pricing: Per Image, by Size Tier
Image models are not billed per token. Each image is priced by its output size tier — 1K, 2K or 4K — with larger tiers costing more. Every model page lists its tier prices, and they differ a lot: some models charge the same for 1K and 2K, others charge more than double for 4K.
Two ways to keep costs down:
- Iterate on prompts at 1K, and render the final version at 2K or 4K
- When you need many images, generate a small batch first and scale up only once the direction is right
Generating Images: /v1/images/generations
The endpoint is compatible with the OpenAI Images API. With cURL:
curl https://zivv.pro/v1/images/generations \
-H "Authorization: Bearer sk-your-key-here" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-image-2", "prompt": "An orange cat in a spacesuit standing on the moon, cinematic lighting", "size": "1024x1024"}'With the OpenAI Python SDK the image comes back as base64 by default; decode it and save:
import base64
from openai import OpenAI
client = OpenAI(base_url="https://zivv.pro/v1", api_key="sk-your-key-here")
result = client.images.generate(
model="nano-banana-pro",
prompt="Minimalist coffee shop poster, warm tones, space at the top for a headline",
size="1024x1024",
)
with open("poster.png", "wb") as f:
f.write(base64.b64decode(result.data[0].b64_json))Switching models means changing the model field and nothing else.
Editing Images: /v1/images/edits
The edit endpoint takes the source image as a multipart upload together with a description of the change:
from openai import OpenAI
client = OpenAI(base_url="https://zivv.pro/v1", api_key="sk-your-key-here")
result = client.images.edit(
model="gpt-image-2",
image=open("product.png", "rb"),
prompt="Replace the background with plain white and keep the product unchanged",
)The response has the same shape as the generation endpoint. Larger uploads make requests slower, so downscale source images to the resolution you actually need first.
base64 or URL?
By default the images endpoints return base64 in b64_json. A 2K image is several megabytes once encoded, and on a poor connection the response can drop halfway through: the image was generated (and billed), yet your client sees a network error.
Add "response_format": "url" to the request and Zivv stores the image on a CDN and returns a link instead. The API response shrinks to a few hundred bytes, and the image download happens separately — if it fails you retry the download, not the generation:
curl https://zivv.pro/v1/images/generations \
-H "Authorization: Bearer sk-your-key-here" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-image-2", "prompt": "Watercolor city skyline at night", "size": "1024x1024", "response_format": "url"}'Two things to handle: if storing the image fails, the response falls back to b64_json, so your code should accept either field; and download the image into your own storage rather than treating the link as permanent hosting.
What About Video?
The Model Hub also lists video models such as Doubao Seedance 2.0 and HappyHorse 1.1, covering text-to-video, image-to-video and reference-to-video. Video generation uses asynchronous task APIs whose parameters and polling differ by model, and it is billed per second or per token. Check the specific model page before integrating.
FAQ
Q: Which size values can I use? A: Standard sizes such as 1024x1024 are the common choice; supported sizes vary by model. Billing follows the tier (1K, 2K or 4K) that the generated image falls into.
Q: Do prompts have to be in English? A: No — the major models understand other languages. When you need specific text rendered in the image, put that text in quotes for more reliable results.
Q: My request was blocked by content moderation. What now? A: Every upstream image model enforces content policies; real people's likenesses, trademarks and explicit content may be refused. Rephrase the prompt rather than retrying the same one.
Q: How do I see what a single image cost? A: The usage page in the console lists every request, and you can query a single request's cost via /v1/generation using the request ID from the response headers — see model fallback and per-request cost lookup.
Wrapping Up
Image models evolve quickly and differ a lot in style, so making the model a configurable setting is safer than betting on one vendor. Sign up for Zivv, and one key gives you every image model — compare them with the same code, then choose a default per use case.