# Images & editing

Create images from text or references and retrieve URLs or Base64 data.

## Build a request

### GPT Image 2

- quality: low / auto → 1K; medium → 2K; high → 4K
- n: 1
- size: WIDTHxHEIGHT; dimensions must be multiples of 8 and within the selected tier’s pixel budget.
- image[]: Upload 1–4 images to the edits endpoint.

POST /v1/images/generations

```json
{
  "model": "gpt-image-2",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "medium",
  "n": 1,
  "response_format": "url"
}
```

### GPT Image 2.5 SFW

- quality: low / auto → 1K
- n: 1
- size: Multiples of 16; 655,360–1,048,576 pixels, aspect ratio within 3:1, each side at most 3840.
- image[]: Upload 1–4 images to the edits endpoint.

POST /v1/images/generations

```json
{
  "model": "gpt-image-2.5-sunburst",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "low",
  "n": 1,
  "response_format": "url"
}
```

### Seedream 5.0 Pro

- quality: low / auto → 1K; medium → 2K
- aspect_ratio: 1:1 / 16:9 / 9:16 / 4:3 / 3:4
- n: 1
- image_urls / image[]: 1–10 images; smart aspect ratio requires reference images.

POST /v1/images/generations

```json
{
  "model": "seedream-5.0-pro",
  "prompt": "A ceramic teapot on a sunlit table",
  "aspect_ratio": "1:1",
  "quality": "low",
  "n": 1,
  "response_format": "url"
}
```

### Qwen Edit 2511

- mode: reference
- image_urls / image[]: Required, 1–2 images.
- resolution: Fixed at 720p; quality does not change resolution.
- n: 1

POST /v1/images/generations

```json
{
  "model": "qwen-edit-2511",
  "prompt": "Change the background to a quiet garden",
  "mode": "reference",
  "aspect_ratio": "1:1",
  "image_urls": [
    "https://example.com/reference.png"
  ],
  "n": 1,
  "response_format": "url"
}
```

### NovelAI V4.5

- n: 1–4
- aspect_ratio: Mapped to server-defined dimensions.
- image[]: Exactly one reference for editing.
- quality: Not applicable; see the NovelAI guide for detailed controls.

POST /v1/images/generations

```json
{
  "model": "nai-v4.5",
  "prompt": "watercolor, a quiet garden",
  "aspect_ratio": "1:1",
  "n": 1,
  "response_format": "url"
}
```

### NovelAI V5

- model: nai-diffusion-5-full
- action: generate / img2img / infill
- parameters.steps: 1–50
- parameters.n_samples: 1–4
- parameters.v4_prompt.caption.char_captions: Up to 32; automatic positioning recommended.

POST /ai/generate-image

```json
{
  "model": "nai-diffusion-5-full",
  "input": "watercolor, a quiet garden",
  "action": "generate",
  "parameters": {
    "width": 1024,
    "height": 1024,
    "steps": 23,
    "n_samples": 1,
    "scale": 5,
    "seed": 42,
    "negative_prompt": ""
  }
}
```

### Nano Banana 2

- API: Workspace only; public API unavailable.
- resolution: 1K / 2K / 4K
- aspect_ratio: smart / 1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 5:4 / 4:5 / 16:9 / 9:16 / 21:9
- References: Up to 14 account-owned images.
- Image count: 1



## Common parameters

| Field | Description |
| --- | --- |
| model | Required. A model ID available to your key. |
| prompt | Required. Describe the desired image. |
| n | Image count. Start with 1. |
| size / quality | Supported sizes and quality levels vary by model. |
| response_format | url \| b64_json |
| image_urls | Public reference URLs, supported by selected models. |

## Edit reference images

```bash
curl --fail-with-body https://noveadream.com/v1/images/edits \
  -H "Authorization: Bearer $NOVEA_API_KEY" \
  -H "Idempotency-Key: $REQUEST_ID" \
  -F "model=gpt-image-2" \
  -F "prompt=Change the background to a quiet garden" \
  -F "image[]=@reference.png"
```

Let your client set the multipart Content-Type boundary; do not set application/json. Repeat image[] for multiple files.

## Read the result

```json
{
  "created": 1791300000,
  "data": [{ "url": "https://example.com/result.png" }]
}
```

For b64_json responses, read data[].b64_json. Download results promptly rather than treating result URLs as permanent storage.
