rreAPI Docs
rreAPI Docs
HomepageWelcome

Image

flux-2z-imageqwen-image-2midjourney-v7wan-2-7-imagegpt-image-2gpt-image-2-officialgemini-2.5-flash-image-previewgemini-3-pro-image-previewgemini-3.1-flash-image-previewdoubao-seedream-5-0-liteimagen-4-0

Audio

Mureka V9 Song APIVocal Remover APIMusic Extractor APIVoice Cleaner APIMultistem Splitter APIVoice Changer API

Video

kling-3-0music-video-1-0wan-2-7-videokling-motion-controlpixverse-v6doubao-seedance-2.0doubao-seedance-2.0-officialdoubao-seedance-2.0-betahappyhorse-1.0happyhorse-1.0-officialviduq3grok-imagine-video-1.5-betagrok-imagine-1.0-videoVeo 3.1gemini-omni

Chat

minimax-m3deepseek-v4gpt-5.5gpt-5.4claude-opus-4-8claude-opus-4-7claude-sonnet-4-6

Text

ai-essay-writerhumanizeai-text-detector

Tools

enhance-video-1.0
X (Twitter)

z-image

Alibaba Tongyi Z-Image-Turbo on reAPI — async, fast, low-cost text-to-image with accurate bilingual (English + Chinese) text rendering, on one OpenAI-compatible endpoint.

Alibaba's Tongyi Z-Image-Turbo on reAPI — fast, low-cost text-to-image with accurate bilingual (English + Chinese) text rendering and photorealistic output. Submit returns a task_id; poll until ready. See current pricing on the model page.

Quick example

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "z-image",
    "prompt": "a poster that reads OPENING SOON in bold type, warm tones",
    "aspect_ratio": "3:4"
  }'
import requests

resp = requests.post(
    "https://reapi.ai/api/v1/images/generations",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "z-image",
        "prompt": "a poster that reads OPENING SOON in bold type, warm tones",
        "aspect_ratio": "3:4",
    },
    timeout=30,
)
print(resp.json())
const r = await fetch("https://reapi.ai/api/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "z-image",
    prompt: "a poster that reads OPENING SOON in bold type, warm tones",
    aspect_ratio: "3:4",
  }),
});
console.log(await r.json());
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "model":        "z-image",
        "prompt":       "a poster that reads OPENING SOON in bold type, warm tones",
        "aspect_ratio": "3:4",
    })
    req, _ := http.NewRequest("POST",
        "https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}

Submit response

{
  "id": "task_018f5a3a1b6e7d9f8c2b4d6e8f0a2c4e",
  "model": "z-image",
  "status": "processing",
  "created_at": 1735000000
}

Poll GET /api/v1/tasks/{id} (see the Tasks reference) until status === "completed". The completed payload's output.image_urls holds the generated image URL.


Authentication

Every call needs a Bearer token. Generate keys at reapi.ai/settings/apikeys.

Authorization: Bearer YOUR_API_KEY

Endpoint

POST /api/v1/images/generations
GET  /api/v1/tasks/{id}

Submission is async. The POST returns immediately with a task_id; the task endpoint returns the same envelope until completion. Polling does not consume credits.

Z-Image is text-to-image only — there is no image input. Each request produces exactly one image (no n parameter).


Request body

model — string, required

Must be z-image.

prompt — string, required

Up to 1,000 characters. Put any text you want rendered in the image inside quotes for best results.

aspect_ratio — string, default 1:1

One of 1:1, 4:3, 3:4, 16:9, 9:16. There is no width/height or resolution control.

nsfw_checker — boolean, optional, default false

Enables upstream content moderation. Off by default.


Pricing

Z-Image bills a flat rate per generated image, independent of aspect ratio. Each request produces one image:

credits = ceil(per_image_usd × 1000)

where 1 credit = $0.001 USD. It is one of the lowest per-image rates on the platform. Failed and rejected requests are not charged.

The exact per-image credit cost surfaces on the model page and through the playground estimator before submit.


Response

The poll envelope returns the image URL in output.image_urls:

{
  "id": "task_019dfd44b7fd74168541552a3260a623",
  "model": "z-image",
  "status": "completed",
  "output": {
    "image_urls": [
      "https://cdn.reapi.ai/...jpg"
    ]
  }
}

Generated URLs expire — mirror them to your own storage if you need long-term retention.


Errors

Failures return the standard reAPI envelope { error: { code, message, request_id } }. Common cases:

  • Invalid input (prompt over 1000 characters, an unsupported aspect_ratio) → 400.
  • Insufficient credits → 402.
  • Rate limited → 429.

See the full catalog at /docs/api/errors.


Tips

  • Put the literal text you want rendered in the prompt, in quotes — Z-Image is tuned for legible English and Chinese typography.
  • It is text-to-image only — to edit an existing image, use a model that accepts an image_url.
  • For volume work (social graphics, e-commerce), Z-Image's flat low price makes it well-suited to batching many single-image requests.

Related

  • Image generation models
  • Qwen Image 2
  • Tasks API
  • Error codes

Table of Contents

Quick example
Submit response
Authentication
Endpoint
Request body
model — string, required
prompt — string, required
aspect_ratio — string, default 1:1
nsfw_checker — boolean, optional, default false
Pricing
Response
Errors
Tips
Related