API Stock
/IMAGE/z-image
Image
Alibaba

Z-Image API

Generate and edit images from text with optional reference images and safety control.

  • Text to image
  • Image editing

Starting at

$0.01

per generation

4 parameters · 1 price options

Z-Image playground

Input

0/1000

Text description for image generation

Optional reference image for editing (exactly one URL). Providing it switches the request to image editing.

Sign in to run

Runs are charged to your balance.

Output

Output will appear here.

Check the price and run the model. Your result will appear here; browser use does not need an API key.

Z-Image API pricing

OptionPrice per generation
Standard$0.01
1curl -X POST https://api.api-stock.com/api/v1/generation/create \
2 -H "Authorization: Bearer $API_STOCK_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "z-image",
6 "input": {
7 "prompt": "A cinematic shot of a city at dusk",
8 "size": "1:1"
9 }
10 }'

Parameters

NameTypeRequiredDefaultDescription
promptstringYes—Text description for image generation
urlsstring[]No—Optional reference image for editing (exactly one URL). Providing it switches the request to image editing.
sizestringNo1:1Image aspect ratio. Required for text-to-image; optional for image editing (defaults to following the reference image).One of: 1:1, 4:3, 3:4, 16:9, 9:16
enableSafetyCheckerbooleanNo—Enable the model's safety checker (defaults to true)

Frequently asked questions

How much does Z-Image cost?

Z-Image starts at $0.01 per generation on API Stock. The final charge depends on the selected settings.

When was Z-Image released?

Z-Image was released on November 26, 2025 and is available through API Stock.

How do I get an API key for Z-Image?

Create an account and API key on API Stock, then fund your balance. The same key works with Z-Image and other catalog models.

How do I call the Z-Image API?

POST to https://api.api-stock.com/api/v1/generation/create with your API key and model "z-image". Use the returned task id for polling or receive a webhook.

What input parameters does Z-Image accept?

Z-Image accepts 4 input parameters, including the required field(s) prompt. See their types, defaults and allowed values above.

What happens if a Z-Image request fails?

API Stock automatically retries the request on a reserve provider. If every provider fails, the charge is refunded to your balance.

Can I use Z-Image with the same API key as other models?

Yes. Use your API Stock API key and balance for Z-Image and other catalog models.