# GPT Image 1.5 API

> gpt-image-1.5 — fast, high-fidelity AI image generation & editing.

- **Provider**: OpenAI
- **Model id**: `gpt-image-1-5-text-to-image`
- **Modality**: image
- **Price**: 2.77–12.54 credits

## Overview

GPT Image 1.5 is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `gpt-image-1-5-text-to-image` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL we POST the finished task to. Signed with `X-Webhook-Signature` once you create a webhook signing key in Dashboard → Settings |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | A text description of the image you want to generate Max 3000 characters. (example: ## USER INPUT * **SUBJECT:** Times Square, New York City — tall buildings, giant digital billboards, busy streets, traffic, crowds, and glowing signs *… — full value in the request example) |
| aspect_ratio | string | Yes | Width-height ratio of the image, determining its visual form. (options: 1:1 \| 2:3 \| 3:2) (default: 3:2) |
| quality | string | Yes | Quality: medium=balanced, high=slow/detailed. (options: medium \| high) (default: medium) |

### Request example

```json
{
  "modelId": "gpt-image-1-5-text-to-image",
  "input": {
    "prompt": "## USER INPUT\n\n* **SUBJECT:** Times Square, New York City — tall buildings, giant digital billboards, busy streets, traffic, crowds, and glowing signs\n* **CHARACTERS:** English uppercase and lowercase letters, numbers 0–9, punctuation marks, and simple symbols\n* **FONT STYLE:** Modern bold urban typography, clean geometric shapes, mixed condensed and regular letterforms\n* **COLORS:** Bright red, electric blue, yellow, white, black, hot pink, and small neon green accents\n* **BACKGROUND:** Solid warm off-white\n\n## PROMPT\n\nCreate a clean typographic artwork that visually suggests **Times Square in New York City** using only readable letters, numbers, punctuation, and symbols.\n\nDo not draw Times Square first. Do not use buildings, streets, cars, people, billboards, or city shapes underneath the typography.\n\nInstead, arrange thousands of individual characters so that, when viewed from a distance, they collectively form the feeling of Times Square.\n\nUse larger and denser characters to suggest:\n\n* tall skyscrapers\n* giant advertising screens\n* crowded building facades\n* busy street intersections\n\nUse smaller, scattered characters to suggest:\n\n* crowds\n* traffic\n* distant lights\n* movement through the streets\n\nArrange the characters in strong vertical towers and diagonal street directions to create the recognizable energy of Times Square.\n\nThe center should feel busy and visually intense, while the outer edges gradually become lighter and more open.\n\nUse bright colors directly on the typography. Mix red, blue, yellow, white, pink, black, and small neon-green accents to capture the colorful nighttime advertising atmosphere of Times Square.\n\nEvery visible element must remain a readable character. Keep small gaps between letters so the viewer can clearly see that the image is made entirely from typography.\n\nSome characters may overlap, rotate, change size, or repeat, but they must not melt together or turn into normal illustrated shapes.\n\nKeep the outer edges irregular and open. Do not create a solid silhouette around the city.\n\nThe overall composition should feel:\n**busy, urban, energetic, colorful, modern, iconic, and unmistakably New York.**\n\n## STYLE\n\nClean flat digital typography, crisp edges, front-facing composition, generous negative space around the main formation.\n\nAt close range, viewers should see individual letters and numbers.\n\nAt a distance, the complete character field should suggest **Times Square with towering billboards, streets, traffic, crowds, and intense city energy.**\n\n## DO NOT USE\n\n* drawn buildings\n* city silhouettes\n* clipping masks\n* filled shapes\n* vector outlines\n* photographic backgrounds\n* real billboard images\n* realistic cars or people\n* gradients\n* shadows\n* 3D effects\n* perspective-heavy rendering\n* textures\n* logos\n* frames\n* mockups\n\n## FINAL LOOK\n\nA sophisticated typographic interpretation of **Times Square, New York**, created entirely from readable characters, with colorfu",
    "aspect_ratio": "3:2",
    "quality": "medium"
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 2.77
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=gpt-image-1-5-text-to-image`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed — check API Key |
| 402 | Insufficient account balance |
| 403 | IP not allowed for this key, or the key is restricted to other models |
| 404 | Task not found, or it has expired |
| 409 | Duplicate request — an identical submit arrived moments ago. Nothing was charged; retry is safe |
| 413 | Payload too large — see the character and file-size limits for this model |
| 429 | Rate limit exceeded — retry after the Retry-After header |
| 500 | Internal server error |
| 504 | Upstream timed out — nothing was delivered; retry is safe |
