Skip to main content
POST
/
generation
/
openai
/
gpt-image-2
GPT Image 2
curl --request POST \
  --url https://open.skills.video/api/v1/generation/openai/gpt-image-2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>"
}
'
{
  "id": "gen_123",
  "status": "IN_QUEUE",
  "input": {
    "prompt": "a cat",
    "aspect_ratio": "1:1",
    "resolution": "1024x1024",
    "n": 1
  },
  "usage": {
    "total": 20,
    "subscription": 20,
    "permanent": 0
  }
}
OpenAI ChatGPT Images 2.0 model for text-to-image and image editing.

Authorizations

Authorization
string
header
required

API Key for API endpoints

Body

prompt
string
required

The prompt for image generation

image_urls
string<uri>[]

Optional input image URLs for edit mode. When provided, the model performs image editing.

mask_url
string<uri>

Optional mask image URL to constrain the editable region in edit mode.

aspect_ratio
enum<string>
default:4:3

Aspect ratio for generated image dimensions.

Available options:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
resolution
enum<string>
default:1K

Resolution hint used with Aspect Ratio to derive image size.

Available options:
1K,
2K,
4K
quality
enum<string>
default:high

Generation quality level.

Available options:
low,
medium,
high
num_images
integer
default:1

Number of images to generate (1-4).

Required range: 1 <= x <= 4
output_format
enum<string>
default:png

Output format for generated images.

Available options:
jpeg,
png,
webp
n
integer
default:1

Number of results to generate (1-4)

Required range: 1 <= x <= 4

Response

Generation submission accepted

id
string
required

Generation id.

status
enum<string>
required

Queue status

Available options:
IN_QUEUE,
IN_PROGRESS,
COMPLETED,
FAILED,
CANCELED
input
Input · object
required

Normalized input payload for the generation task.

usage
object
required

Credit usage breakdown for the request

code
string

Machine-readable generation error code. Present when status is FAILED.

message
string

Sanitized human-readable failure message. Present when status is FAILED.