Text to Image

gpt-image-1

GPT Image 1

POST /v1/images/generationsAsync generationFixed Credit pricing

Quick start

Submit a request with this public model ID. The API immediately returns a normalized job; poll GET /v1/jobs/{jobId} while its status is queued or running.

curl -X POST "https://api.artany.ai/v1/images/generations" \
  -H "Authorization: Bearer $ARTANY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-id" \
  -d '{"model":"gpt-image-1","prompt":"A cinematic coastal village at sunrise","size":"1:1","count":1,"quality":"auto","background":"auto","moderation":"auto","output_format":"png"}'

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer token for an Artany API key.
Content-TypeYesMust be application/json.
Idempotency-KeyRecommended8–128 characters. Reusing it with an identical request prevents duplicate jobs and charges.

Body

{
  "model": "gpt-image-1",
  "prompt": "A cinematic coastal village at sunrise",
  "size": "1:1",
  "count": 1,
  "quality": "auto",
  "background": "auto",
  "moderation": "auto",
  "output_format": "png"
}

Request Parameters

Only fields in this model’s public request contract are shown. Defaults are applied before validation and quoting.

modelstringrequireddefault: "gpt-image-1"

Stable public model ID for this request.

promptstringrequired

Text description for image generation. Chinese and English are supported.

Length: 1–12000

sizestringdefault: "1:1"

Output aspect ratio. Use 1:1, 3:2, or 2:3.

Allowed: 1:1, 2:3, 3:2

1:12:33:2
countintegerdefault: 1

Number of images to generate.

Range: 1–4

Note:Use a plain JSON number. Values below 1 are treated as 1 and values above 4 are treated as 4.

qualitystringdefault: "auto"

Image quality tier.

Allowed: auto, low, medium, high

autolowmediumhigh
  • auto selects quality automatically; low prioritizes speed and cost; medium balances output; high prioritizes quality.
backgroundstringdefault: "auto"

Background rendering mode.

Allowed: auto, opaque, transparent

autoopaquetransparent

Note:Transparent background cannot be combined with jpeg output. Use png when transparency is required.

moderationstringdefault: "auto"

Moderation level applied to the request.

Allowed: auto, low

autolow
output_formatstringdefault: "png"

Requested image format.

Allowed: png, jpeg

pngjpeg
  • png is the default and suits transparency; jpeg produces a smaller general-purpose file.
output_compressioninteger

JPEG output compression level.

Range: 0–100

Note:Use compression only with jpeg output; it is not recommended for png.

image_urlsarray

Reference images that switch the request to image-to-image mode.

Items: 1–15

  • Use one image for single-reference editing or 2–15 for multi-reference fusion.

Note:Reference URLs must be publicly accessible and stable. More than 15 images are rejected.

mask_urlstring

Mask image URL for inpainting.

Note:Requires image_urls. The mask must have an alpha channel and match the first reference image dimensions.

Response and task status

A successful asynchronous submission returns HTTP 202 with a supplier-neutral job.

{
  "id": "job_…",
  "object": "generation.job",
  "model": "gpt-image-1",
  "status": "queued",
  "progress": 0,
  "output": null,
  "error": null,
  "billing": {
    "estimated_credits": "…",
    "frozen_credits": "…",
    "charged_credits": "0",
    "state": "frozen",
    "price_version": "2026-07-18.picverse-parity"
  },
  "created_at": "2026-07-21T00:00:00.000Z",
  "completed_at": null
}
  • queued / running: continue polling.
  • succeeded: retrieve media URLs from output; billing has settled.
  • failed / canceled: inspect error; frozen Credits are released.

Pricing

The price shown for a matching configuration is the fixed amount settled on successful completion. Price version: 2026-07-18.picverse-parity.

sizecountqualityCredits
1:11low2
2:31low3
3:21low3
1:12low4
2:32low6
3:22low6
1:13low6
1:11medium6
1:14low8
2:33low9
2:31medium9
3:23low9
3:21medium9
2:34low12
3:24low12
1:12medium12
2:32medium18
3:22medium18
1:13medium18
1:11auto22
1:11high22
1:14medium24
2:33medium27
3:23medium27
2:31auto33
2:31high33
3:21auto33
3:21high33
2:34medium36
3:24medium36
1:12auto44
1:12high44
2:32auto66
2:32high66
3:22auto66
3:22high66
1:13auto66
1:13high66
1:14auto88
1:14high88
2:33auto99
2:33high99
3:23auto99
3:23high99
2:34auto132
2:34high132
3:24auto132
3:24high132