> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT Image 1

> OpenAI GPT Image 1 image generation model. Generate and edit images from text prompts.

GPT Image 1 is OpenAI's autoregressive image generation model, available through AnyFast API. It generates high-quality images from text prompts with precise text rendering and multi-style support.

## Key capabilities

* **Text-to-Image** — Generate images from natural language descriptions
* **Multi-style** — Photorealism, illustration, anime, vector, 3D, data visualization
* **Text rendering** — Accurate typography for posters, UI mockups, and labels
* **Transparent background** — Generate images with transparent backgrounds
* **Batch generation** — Generate up to 4 images per request

## Output specifications

| Property   | Value                                 |
| ---------- | ------------------------------------- |
| Sizes      | 1024x1024, 1536x1024, 1024x1536, auto |
| Quality    | low, medium, high                     |
| Formats    | png, webp, jpeg                       |
| Background | transparent, opaque                   |

## Quick example

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/v1/images/generations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-image-1",
      "prompt": "A cute cat wearing a space suit floating in the galaxy",
      "size": "1024x1024",
      "quality": "high"
    }'
  ```

  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_API_KEY",
      base_url="https://www.anyfast.ai/v1"
  )

  response = client.images.generate(
      model="gpt-image-1",
      prompt="A cute cat wearing a space suit floating in the galaxy",
      size="1024x1024",
      quality="high"
  )

  print(response.data[0].b64_json[:100])
  ```
</CodeGroup>

## Parameters

| Parameter            | Type    | Required | Description                                                    |
| -------------------- | ------- | -------- | -------------------------------------------------------------- |
| `model`              | string  | Yes      | Must be `gpt-image-1`                                          |
| `prompt`             | string  | Yes      | Text description of the desired image                          |
| `n`                  | integer | No       | Number of images to generate (1–4). Default: `1`               |
| `size`               | string  | No       | `1024x1024`, `1536x1024`, `1024x1536`, `auto`. Default: `auto` |
| `quality`            | string  | No       | `low`, `medium`, `high`. Default: `medium`                     |
| `output_format`      | string  | No       | `png`, `webp`, `jpeg`. Default: `png`                          |
| `background`         | string  | No       | `transparent` or `opaque`. Default: `opaque`                   |
| `moderation`         | string  | No       | `auto` or `low`. Default: `auto`                               |
| `output_compression` | integer | No       | Compression level for jpeg/webp (0–100).                       |

<Card title="API Reference" icon="code" href="/api-reference/model-api/openai/gpt-image-1">
  View the interactive API playground for GPT Image 1.
</Card>

<script src="/feedback.js" />
