APIMart
GPT Image 2.6 model icon
Image

GPT Image 2.6 API

Prepare a visual brief with GPT Image 2.6. Describe a new image or changes to reference images, then review aspect ratio, resolution, quality, and file settings in the APIMart workspace.

Text to imageReference imagesForm & JSON

GPT Image 2.6 API configuration

  • Prompts and optional reference images
  • Aspect ratio, resolution, and quality
  • PNG, JPEG, or WebP output settings
Input

Describe the subject, composition, lighting, and any text to include.

Transparent backgrounds require PNG or WebP.

Reference images

Add up to 16 images with public HTTP(S) URLs or local PNG, JPEG, and WebP files (up to 10 MB each).

Output

Your generated images will appear here

Plan your next image with GPT Image 2.6 API

Turn a rough idea into a specific image brief. Keep the subject, composition, and output settings together before reviewing the request configuration.

GPT Image 2.6 API examples: text to image and image editing

These examples use APIMart’s common asynchronous image-task format. Review the model value and workspace options, then follow the task-ID and result-query structure.

  1. 1

    Authenticate the GPT Image 2.6 API example

    Save an APIMart key as APIMART_API_KEY. Use Authorization: Bearer <key> for the submission and task-query requests.

  2. 2

    Build the image request

    The example sends POST /v1/images/generations with model set to gpt-image-2.6, prompt, and output settings. For editing, add image_urls. The common task response stores the ID in data[0].task_id.

  3. 3

    Query the task result

    Use GET /v1/tasks/{task_id}. For a completed task, read data.result.images[0].url[0]; for a failed task, read data.error.message.

    See the APIMart documentation for APIMart authentication and general API usage.

POST /v1/images/generations
curl -X POST https://api.apimart.ai/v1/images/generations \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6",
    "prompt": "A ceramic coffee cup on a pale wooden table, soft window light, ample empty space on the right, editorial product photograph.",
    "size": "1:1",
    "resolution": "1k",
    "quality": "auto",
    "n": 1,
    "output_format": "png",
    "background": "auto"
  }'

GPT Image 2.6 API parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: gpt-image-2.6The model value used by this workspace and its examples: gpt-image-2.6.
promptstringRequiredDefault: —Describe the image to create, or the changes to make and the reference details to preserve.
sizestringOptionalDefault: autoWorkspace choices: auto, 1:1, 3:2, 2:3, 16:9, 9:16, 4:3, 3:4, 4:5, or 5:4.
resolutionstringOptionalDefault: 1kWorkspace resolution choices: 1k, 2k, or 4k. This is a request setting, not a claim about native output dimensions.
qualitystringOptionalDefault: autoWorkspace quality choices: auto, low, medium, or high.
nintegerOptionalDefault: 1Image count in this workspace: an integer from 1 to 4.
output_formatstringOptionalDefault: pngOutput-format choices: png, jpeg, or webp. Use png or webp with a transparent background.
backgroundstringOptionalDefault: autoBackground choices: auto, opaque, or transparent. Transparent cannot be combined with jpeg.
image_urlsarrayOptionalDefault: —Optional array of up to 16 HTTP or HTTPS reference-image URLs in this workspace. Local files are for local preview; use reachable image URLs in request examples.