GPT Image 1 - Background Replacer
Replace and transform image backgrounds using natural language descriptions with OpenAI's GPT Image 1 model. This premium background replacement solution leverages advanced AI vision to understand scenes, maintain subject integrity, and generate photorealistic or artistic backgrounds that seamlessly integrate with your subjects.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be BACKGROUND_REPLACER |
model | string | Yes | AI model identifier. Must be gpt-image-1 |
promptObject | object | Yes | Configuration object containing background replacement parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | Path to the source image for background replacement | - |
prompt | string | Yes | Description of desired background scene (max 4000 characters) | - |
size | string | Yes | Output image dimensions | 1024x1024 |
n | number | Yes | Number of images to generate (1-10) | 1 |
quality | string | No | Quality level of the generated background | medium |
output_format | string | No | Output format for the processed image | png |
output_compression | number | No | Compression level (0-100, higher = better quality) | 85 |
Size Options
| Size | Description |
|---|---|
1024x1024 | Square format (1:1) |
1024x1536 | Portrait format (2:3) |
1536x1024 | Landscape format (3:2) |
Quality Options
| Quality | Description | Use Case |
|---|---|---|
low | Faster processing, good quality | Quick previews, iterations |
medium | Balanced quality and speed | Standard workflows, most projects |
high | Maximum detail and realism | Professional work, final outputs |
Output Format Options
| Format | Description | Best For |
|---|---|---|
png | Lossless format with transparency support | Professional use, highest quality |
jpeg | Compressed format | Web optimization, smaller files |
webp | Modern format with superior compression | Web applications |
Code Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "BACKGROUND_REPLACER",
"model": "gpt-image-1",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_cat.png",
"prompt": "professional studio background with soft gray gradient, subtle lighting from top-left, minimalist and clean aesthetic",
"size": "1024x1024",
"n": 1,
"quality": "high",
"output_format": "png",
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'BACKGROUND_REPLACER',
model: 'gpt-image-1',
promptObject: {
imageUrl: 'development/images/2025_12_04_18_03_51_184_cat.png',
prompt: 'professional studio background with soft gray gradient, subtle lighting from top-left, minimalist and clean aesthetic',
size: '1024x1024',
n: 1,
quality: 'high',
output_format: 'png',
}
})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "BACKGROUND_REPLACER",
"model": "gpt-image-1",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_cat.png",
"prompt": "professional studio background with soft gray gradient, subtle lighting from top-left, minimalist and clean aesthetic",
"size": "1024x1024",
"n": 1,
"quality": "high",
"output_format": "png",
}
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Interactive Playground
API Playground
https://api.1min.ai/api/featuresPath to the source image for background replacement
Describe the new background you want (max 4000 characters)
Dimensions of the output image
Number of variations to generate (1-10)
Quality level affects detail 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": "BACKGROUND_REPLACER",
"model": "gpt-image-1",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_cat.png",
"prompt": "professional studio background with soft gray gradient, subtle lighting from top-left, minimalist and clean aesthetic",
"size": "1024x1024",
"n": 1,
"quality": "high",
"output_format": "png"
}
}'
Response Format
{
"aiRecord": {
"uuid": "b1g2r3m4-v5e6-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": 250000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T14:00:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "gpt-image-1",
"type": "BACKGROUND_REPLACER",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T14:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_03_51_184_cat.png",
"prompt": "professional studio background with soft gray gradient, subtle lighting from top-left, minimalist and clean aesthetic",
"size": "1024x1024",
"n": 1,
"quality": "high",
"output_format": "png",
},
"resultObject": [
"development/images/2025_01_15_14_00_30_001_background_replaced.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_14_00_30_001_background_replaced.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T140000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}
Use Cases
Professional Photography & Portraits
- Studio Backgrounds: Create professional studio settings with gradient or solid color backgrounds
- Environmental Portraits: Place subjects in specific locations or environments
- Headshot Enhancement: Transform casual photos into professional headshots
- Consistency: Maintain uniform backgrounds across photo series
- Virtual Backgrounds: Create custom backgrounds for video conferencing assets
E-commerce & Product Photography
- Product Isolation: Replace cluttered backgrounds with clean, professional settings
- Lifestyle Contexts: Place products in realistic usage environments
- Brand Consistency: Apply branded backgrounds across product catalogs
- Seasonal Themes: Update product photos with seasonal or holiday backgrounds
- A/B Testing: Generate multiple background variations for testing
Marketing & Advertising
- Campaign Customization: Adapt imagery for different markets with location-appropriate backgrounds
- Brand Integration: Replace backgrounds with branded environments
- Mood Creation: Set specific atmospheres that align with campaign messaging
- Social Media: Create platform-optimized backgrounds for different channels
- Localization: Customize backgrounds for regional or cultural contexts
Creative & Artistic Projects
- Fantasy Scenes: Place subjects in imaginative or impossible environments
- Artistic Styles: Generate artistic or stylized backgrounds
- Conceptual Photography: Create conceptual images with specific thematic backgrounds
- Portfolio Development: Showcase subjects in diverse settings
- Story Telling: Create narrative contexts through background replacement
Real Estate & Interior Design
- Property Staging: Replace empty or outdated backgrounds with modern settings
- Virtual Staging: Add contextual backgrounds to architectural elements
- Before/After Visualization: Show transformation possibilities
- Client Presentations: Present design concepts in various environments
- Marketing Materials: Create compelling property marketing images