Image to Image
gpt-image-2
Picverse phase-one image capability.
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/edits" \
-H "Authorization: Bearer $ARTANY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id" \
-d '{"model":"gpt-image-2","prompt":"A cinematic coastal village","count":1,"size":"1:1","resolution":"1k"}'Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token for an Artany API key. |
| Content-Type | Yes | Must be application/json. |
| Idempotency-Key | Recommended | 8–128 characters. Reusing it with an identical request prevents duplicate jobs and charges. |
Body
{
"model": "gpt-image-2",
"prompt": "A cinematic coastal village",
"count": 1,
"size": "1:1",
"resolution": "1k"
}Request Parameters
Only fields in this model’s public request contract are shown. Defaults are applied before validation and quoting.
Stable public model ID for this request.
Text description for image generation. Chinese and English are supported; detailed prompts are recommended.
Length: 1–12000
Note:The prompt is reviewed before submission. Policy violations are rejected immediately.
Number of images to generate.
Range: 1–1
Note:Only one image is supported. Send a plain JSON number, not a quoted string.
Output aspect ratio. Use auto to let the service choose a suitable ratio.
Allowed: auto, 1:1, 1:2, 2:1, 1:3, 3:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 9:21, 21:9
- Pixel dimensions can also be passed directly when supported by the selected resolution tier.
Output resolution tier.
Allowed: 1k, 2k, 4k
- Choose 1k, 2k, or 4k. All supported aspect ratios are available at 4k.
Note:Resolution tier changes the output pixel dimensions and price.
Reference images that switch the request to image-to-image mode.
Items: 1–16
- Public URLs and Base64 Data URIs can be mixed. If size is omitted, output follows the input image resolution; if size is supplied, it controls the output ratio.
Note:At most 16 reference images are accepted. Unsupported OpenAI fields such as quality and style are ignored.
Response and task status
A successful asynchronous submission returns HTTP 202 with a supplier-neutral job.
{
"id": "job_…",
"object": "generation.job",
"model": "gpt-image-2",
"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.
| resolution | Credits |
|---|---|
| 1k | 2 |
| 2k | 3 |
| 4k | 5 |