---
title: "Create Image"
method: POST
path: "/v2/gt-mage/create-image"
tags: ["ChatGPT Image"]
---

# Create Image

`POST /v2/gt-mage/create-image`

Generate one or more AI images from a text prompt, with optional reference images. Returns immediately with `202 Accepted` and a task ID for polling.

When one or more `reference_images` are supplied, the request is treated as an **image edit**; otherwise it is a plain **generation**.

### Example

```bash
curl -X POST https://genaipro.io/api/v2/gt-mage/create-image \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "prompt=A futuristic city at night" \
  -F "size=16:9" \
  -F "n=2"
```

### Example — with reference images (edit)

```bash
curl -X POST https://genaipro.io/api/v2/gt-mage/create-image \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "prompt=Turn this into a watercolor painting" \
  -F "reference_images=@photo.jpg"
```

> **Rate limit:** 30 requests/minute

## Response `202`

Task accepted for processing

- VeoV2TaskStatus — Task status returned from polling and history endpoints
  - `id` string — Task ID
  - `prompt` string — The prompt used for generation
  - `file_urls` string[] — URLs of the generated files (empty while processing)
  - `status` 'processing' | 'completed' | 'failed' — Task status
  - `error` string — Error message (only present when status is `failed`)
  - `created_at` string, date-time — Timestamp when the task was created

## Other responses

- `400` — Invalid request (missing prompt, invalid size/n, too many or oversized reference images)
- `429` — Rate limit exceeded

---

[API](https://skmtc.dev/genaipro/apis/genaipro-api.md) · [All operations](https://skmtc.dev/genaipro/apis/genaipro-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/genaipro/genaipro-api/revisions/91f814eaecbd/schema)
