---
title: "ChatGPT 2"
method: POST
path: "/generate/image/openai/gpt-image-2"
tags: ["Image"]
---

# ChatGPT 2

`POST /generate/image/openai/gpt-image-2`

Smart powerful model for editing.

## Headers

- `X-Webhook-URL` string, uri

## Request body

- object
  - `prompt` string, required
  - `quality` 'low' | 'medium' | 'high' | 'auto'
  - `image_urls` string[] — Image prompts to use for the generation.
  - `width` number — Width of the generated image in pixels.
  - `height` number — Height of the generated image in pixels.
  - `aspect_ratio` '16:9' | '2:1' | '3:2' | '4:3' | '1:1' | '3:4' | '2:3' | '1:2' | '9:16' — Aspect ratio. One of: 16:9, 2:1, 3:2, 4:3, 1:1, 3:4, 2:3, 1:2, 9:16.
  - `resolution` '1K' | '2K' | '4K' — Resolution scale. One of: 1K, 2K, 4K.

## Response `200`

The resulting job data. This will be returned in a pending state until the job is completed. See [`/jobs/{id}`](#tag/default/get/jobs/{id}) for retrieving the results.

- object
  - `job_id` string, uuid, required
  - `status` 'backlogged' | 'queued' | 'scheduled' | 'processing' | 'sampling' | 'intermediate-complete' | 'completed' | 'failed' | 'cancelled', required
  - `created_at` string, date-time, required
  - `completed_at` unknown, required
  - `result` unknown, required
  - `error` object
    - `code` string, required
    - `message` string

## Other responses

- `400` — The request body is invalid.
- `401` — You are not authenticated.
- `402` — You have run out of credits.
- `429` — You have reached the maximum number of concurrent jobs.

---

[API](https://skmtc.net/krea/apis/krea-api.md) · [All operations](https://skmtc.net/krea/apis/krea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/krea/krea-api/revisions/fbb6df88b341/schema)
