Skip to main content

GPT Image 1 Mini - Image Mask Editor

Edit and transform specific areas of images using mask-based selection with OpenAI's GPT Image 1 Mini model. This cost-effective inpainting solution delivers excellent quality with faster processing speeds, perfect for high-volume editing workflows, rapid iterations, and budget-conscious projects. Precisely control which areas to modify with masks while maintaining professional results.

Endpoint

Request Headers

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

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_INPAINTER
modelstringYesAI model identifier. Must be gpt-image-1-mini
promptObjectobjectYesConfiguration object containing all image editing parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesPath to the source image to be edited-
maskUrlstringYesPath to the mask image (white=edit, black=preserve)-
promptstringYesDescription of content to generate in masked areas (max 4000 characters)-
sizestringYesOutput image dimensions1024x1024
nnumberYesNumber of images to generate (1-10)1
qualitystringNoQuality level of the generated contentmedium
output_formatstringNoOutput format for the processed imagepng
output_compressionnumberNoCompression level (0-100, higher = better quality)85

Size Options

SizeDescription
1024x1024Square format (1:1)
1024x1536Portrait format (2:3)
1536x1024Landscape format (3:2)

Quality Options

QualityDescriptionProcessing SpeedUse Case
lowGood quality, fastest processingVery FastQuick iterations, concept testing
mediumExcellent quality, fast processingFastStandard workflows, most projects
highPremium quality, moderate speedModerateProfessional outputs, final deliverables

Output Format Options

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

Mask Image Requirements

RequirementDescription
FormatPNG, JPEG, or WebP formats supported
DimensionsMust match source image dimensions exactly
Color SchemeWhite (#FFFFFF) = edit areas, Black (#000000) = preserve areas
Grayscale SupportGray values for partial blending and soft transitions
Edge QualityClean, well-defined boundaries for best results

Code Examples

curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_INPAINTER",
"model": "gpt-image-1-mini",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"maskUrl": "development/images/2025_12_04_18_11_04_824_image.png",
"prompt": "modern pendant light with brushed metal finish, LED bulbs, contemporary design",
"size": "1024x1024",
"n": 1,
"quality": "medium",
"output_format": "png",
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Path to the source image to be edited
Path to mask (white areas will be edited, black areas preserved)
Describe what to generate in masked areas (max 4000 characters)
Dimensions of the output image
Number of edited images to generate (1-10)
Quality affects detail, blending, and credit cost
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_INPAINTER",
"model": "gpt-image-1-mini",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"maskUrl": "development/images/2025_12_04_18_11_04_824_image.png",
"prompt": "modern pendant light with brushed metal finish, LED bulbs, contemporary design",
"size": "1024x1024",
"n": 1,
"quality": "medium",
"output_format": "png"
}
}'

Response Format

{
"aiRecord": {
"uuid": "i1m2p3a4-v5e6-7890-abcd-ef1234567890",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "Alex Designer",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 28000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T16:00:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "gpt-image-1-mini",
"type": "IMAGE_INPAINTER",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T16:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"maskUrl": "development/images/2025_12_04_18_11_04_824_image.png",
"prompt": "modern pendant light with brushed metal finish, LED bulbs, contemporary design",
"size": "1024x1024",
"n": 1,
"quality": "medium",
"output_format": "png",
},
"resultObject": [
"development/images/2025_01_15_16_00_30_001_inpainted.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_16_00_30_001_inpainted.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T160000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}

Use Cases

High-Volume Photo Editing

  • Batch Product Editing: Process large catalogs efficiently
  • E-commerce Optimization: Quick product photo enhancements at scale
  • Social Media Content: Rapid content creation for multiple platforms
  • Marketing Materials: Generate variations for A/B testing
  • Real Estate Photos: Edit multiple property images quickly

Rapid Iteration & Testing

  • Design Exploration: Test multiple concepts quickly
  • Client Previews: Generate preview variations efficiently
  • Creative Testing: Experiment with different approaches
  • Concept Validation: Quick validation before final production
  • Workflow Development: Test editing workflows

Cost-Effective Projects

  • Startup Workflows: Professional results within budget
  • Content Marketing: Regular content creation at lower costs
  • Educational Projects: Learning and skill development
  • Personal Projects: Portfolio and personal work
  • Prototyping: Test concepts before scaling

Professional Applications

  • Interior Design: Visualize furniture and décor changes
  • Product Photography: Remove imperfections or add variations
  • Architectural Visualization: Show different material options
  • Event Photography: Quick touch-ups and enhancements
  • Portrait Retouching: Professional-grade edits efficiently

Mask Creation Tools

  • Adobe Photoshop: Industry-standard with advanced selection and masking tools
  • GIMP: Free alternative with comprehensive masking capabilities
  • Canva: User-friendly online tool for basic mask creation
  • Paint.NET: Windows-based tool with good selection features
  • Procreate: iPad app excellent for precise digital masking

Mask Quality Checklist

  • Exact Dimensions: Mask matches source image size perfectly
  • High Contrast: Clear distinction between edit areas (white) and preserve areas (black)
  • Clean Boundaries: Smooth, well-defined edges around objects
  • Appropriate Coverage: All target areas properly marked for editing
  • Edge Quality: Suitable edge treatment (hard or soft) for the editing type