All models

GPT Image 2

openai/gpt-image-2
OpenAI Image GenerationImage EditingMultimodal

OpenAI's next-generation image model that creates and edits images from text prompts, with support for multiple quality levels, sizes, and output formats. Note: transparent backgrounds are not supported — use openai/gpt-image-1.5 for transparent PNGs.

Quick start

# Inspect the price — a plain request returns the 402 challenge:
curl -i https://api.glianalabs.com/v1/infer \
  -H "content-type: application/json" \
  -d '{
    "model": "openai/gpt-image-2",
    "prompt": <string>
  }'

# Pay + run in one step with the mppx CLI (create a wallet: npx mppx account create):
npx mppx https://api.glianalabs.com/v1/infer \
  -J '{"model": "openai/gpt-image-2", "prompt": "<string>"}'

Examples

example
example
example
example
example
example

Parameters

Input
background string

Background transparency setting. Use transparent for images with no background, opaque for a solid background, or auto to let the model decide.

images array

Input images for image editing, 1-16 entries. Each entry is base64-encoded (raw string or data:image/{png|jpeg|webp};base64,... URI).

output_format string

Output format for the generated image

prompt string required

Text prompt describing the image to generate or edit

quality string

Quality of the generated image

size string

Size of the generated image

Output
image: URL to the generated image