Skip to main content

GPT Image 2 - Image Text Editor

Edit and transform images using natural language descriptions with OpenAI's GPT Image 2 model. This premium image editing solution provides the highest creative fidelity with fully custom output dimensions, allowing you to modify, enhance, or completely reimagine any image while retaining full control over the output size.

Endpoint

Request Headers

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_EDITOR
modelstringYesAI model identifier. Must be gpt-image-2
promptObjectobjectYesConfiguration object containing all image editing parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesPath to the source image to edit-
promptstringYesDescription of the desired edits or transformations (max 4000 characters)-
sizestringYesOutput image dimensions in WxH format (e.g. 1024x1024)-
qualitystringYesQuality level of the edited output-
nnumberNoNumber of variations to generate (1-10)1
backgroundstringNoBackground transparency modeauto
output_formatstringNoOutput format for the processed image-
output_compressionnumberNoCompression level (0-100, higher = better quality). Only applies when output_format is jpeg or webp-

Size Constraints

GPT Image 2 accepts any custom dimension in WxH format (e.g. 1024x1024, 1280x720) subject to the following rules:

ConstraintRuleExample
Block sizeWidth and height must both be divisible by 161024x1024 ✓, 1000x1000
Minimum pixelsWidth × Height ≥ 655,3601024×640 = 655,360 ✓
Maximum pixelsWidth × Height ≤ 8,294,4002880×2880 = 8,294,400 ✓
Maximum edgeMax(width, height) ≤ 3,840 px3840×864 ✓, 4096×1024 ✗
Aspect ratioMax edge / Min edge ≤ 3:13072×1024 ✓, 3840×512 ✗

Quality Options

QualityDescriptionUse Case
lowFaster processing, good qualityQuick previews, concept iterations
mediumBalanced quality and speedStandard workflows, most projects
highMaximum detail and fidelityProfessional work, final outputs

Background Options

BackgroundDescriptionUse Case
autoModel selects the best background modeGeneral purpose, recommended default
opaqueSolid backgroundStandard images, no transparency needed

Output Format Options

FormatDescriptionBest For
pngLossless format with transparency supportProfessional use, highest quality
jpegCompressed formatWeb optimization, smaller files
webpModern format with superior compressionWeb applications

Code Examples

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "gpt-image-2",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_landscape.png",
"prompt": "Change the sky to a dramatic sunset with vivid orange and purple tones",
"size": "1536x1024",
"quality": "high",
"n": 1,
"background": "auto",
"output_format": "png"
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Path to the source image to edit
Describe the desired edits or transformations (max 4000 characters)
Custom dimensions in WxH format. Both values must be divisible by 16. E.g. 1024x1024, 1536x1024, 1024x1536
Quality level affects detail and credit cost
Number of variations to generate (1-10)
Background transparency mode
Format of the output image
Compression level (0-100, higher = better quality)

Generated cURL Command:

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "gpt-image-2",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_landscape.png",
"prompt": "Change the sky to a dramatic sunset with vivid orange and purple tones",
"size": "1024x1024",
"quality": "medium",
"n": 1,
"background": "auto",
"output_format": "png"
}
}'

Response Format

{
"aiRecord": {
"uuid": "c1d2e3f4-g5h6-7890-abcd-ef1234567890",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "Jane Designer",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 180000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T11:00:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "gpt-image-2",
"type": "IMAGE_EDITOR",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T11:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_landscape.png",
"prompt": "Change the sky to a dramatic sunset with vivid orange and purple tones",
"size": "1536x1024",
"quality": "high",
"n": 1,
"background": "auto",
"output_format": "png"
},
"resultObject": [
"development/images/2025_01_15_11_00_45_001_landscape_edited.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_11_00_45_001_landscape_edited.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T110000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}

Use Cases

  • Photo Retouching: Adjust lighting, color grading, and visual atmosphere
  • Style Transfer: Transform an image's artistic style or aesthetic
  • Object Modification: Change colors, textures, or appearance of specific elements
  • Environmental Changes: Modify weather, time of day, or season
  • Content Enhancement: Add, remove, or modify elements within images
  • Creative Exploration: Generate multiple stylistic variations for creative projects
  • Product Photography: Enhance product images for e-commerce or marketing