Stable Image - Image Extender
Extend and expand image borders using Stability AI's advanced outpainting technology. Intelligently generate new content beyond the original image boundaries while maintaining visual coherence and style consistency.
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 IMAGE_EXTENDER |
model | string | Yes | AI model identifier. Must be stable-image |
promptObject | object | Yes | Configuration object containing all extension parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | Path to the image to be extended | - |
output_format | string | No | Output format for the extended image | png |
left | number | No | Pixels to extend on the left side (0-2000) | 0 |
right | number | No | Pixels to extend on the right side (0-2000) | 0 |
up | number | No | Pixels to extend on the top side (0-2000) | 0 |
down | number | No | Pixels to extend on the bottom side (0-2000) | 0 |
Extension Parameters
| Parameter | Range | Description |
|---|---|---|
left | 0-2000 | Number of pixels to extend the image to the left |
right | 0-2000 | Number of pixels to extend the image to the right |
up | 0-2000 | Number of pixels to extend the image upward |
down | 0-2000 | Number of pixels to extend the image downward |
Supported Output Formats
| Format | Description | Best For |
|---|---|---|
png | High quality, lossless compression | Detailed images, graphics with transparency |
jpeg | Smaller file size, slight compression | Photographs, web images |
webp | Modern format, excellent compression | Web applications, modern browsers |
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_EXTENDER",
"model": "stable-image",
"promptObject": {
"imageUrl": "development/images/2025_02_16_14_16_21_627_images.jpeg",
"output_format": "png",
"left": 200,
"right": 200,
"up": 150,
"down": 150
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_EXTENDER',
model: 'stable-image',
promptObject: {
imageUrl: 'development/images/2025_02_16_14_16_21_627_images.jpeg',
output_format: 'png',
left: 200,
right: 200,
up: 150,
down: 150
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_EXTENDER",
"model": "stable-image",
"promptObject": {
"imageUrl": "development/images/2025_02_16_14_16_21_627_images.jpeg",
"output_format": "png",
"left": 200,
"right": 200,
"up": 150,
"down": 150
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresPath to the image file to be extended
Format of the extended image
Pixels to extend on the left side (0-2000)
Pixels to extend on the right side (0-2000)
Pixels to extend on the top side (0-2000)
Pixels to extend on the bottom side (0-2000)
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_EXTENDER",
"model": "stable-image",
"promptObject": {
"imageUrl": "development/images/2025_02_16_14_16_21_627_images.jpeg",
"output_format": "png",
"left": 200,
"right": 200,
"up": 150,
"down": 150
}
}'
Response Format
{
"aiRecord": {
"uuid": "e1x2t3e4-n5d6-7890-abcd-ef1234567890",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "John Doe",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 25000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T13:00:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "stable-image",
"type": "IMAGE_EXTENDER",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T13:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2025_02_16_14_16_21_627_images.jpeg",
"output_format": "png",
"left": 200,
"right": 200,
"up": 150,
"down": 150
},
"resultObject": [
"development/images/2025_01_15_13_00_30_001_extended_image.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_13_00_30_001_extended_image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T130000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}
Use Cases
Creative & Artistic Applications
- Panorama Creation: Extend landscapes and scenic views for panoramic effects
- Artwork Expansion: Enlarge canvas space for digital artworks and illustrations
- Background Extension: Add more background context to portraits and subjects
- Scene Completion: Fill in cropped or incomplete scenes with contextual content
- Artistic Exploration: Experiment with different compositions and framing
Commercial & Marketing
- Banner Creation: Extend images to fit various banner and header dimensions
- Social Media Adaptation: Resize images for different platform requirements
- Print Layout: Expand images to fill larger print formats and layouts
- Product Photography: Add background space around products for catalogs
- Website Design: Create full-width background images from smaller sources
Professional Photography
- Composition Adjustment: Fix tight crops by adding breathing room
- Format Conversion: Convert between aspect ratios while maintaining subject
- Background Enhancement: Add environmental context to studio shots
- Architectural Photography: Complete building exteriors and interior spaces
- Event Photography: Expand group shots to include more participants or venue
Technical & Restoration
- Historical Photo Restoration: Reconstruct damaged or cropped historical images
- Scan Enhancement: Complete partially scanned documents or photos
- Crop Recovery: Restore accidentally over-cropped images
- Archive Preservation: Enhance archival materials with missing borders
- Documentation: Complete technical drawings and diagrams
Tips for Best Results
-
Input Image Quality: Use high-quality source images for optimal results
- Higher resolution inputs produce better extended content
- Clear, well-lit images extend more successfully than dark or blurry ones
-
Extension Planning: Consider the intended use before setting extension values
- Web banners: Focus on horizontal extension (left/right)
- Social media: Consider platform-specific aspect ratios
- Print materials: Plan for standard print dimensions
-
Content Considerations: AI performs better with certain image types
- Natural scenes: Landscapes, skies, and outdoor environments extend excellently
- Architectural: Buildings and structures with clear patterns work well
- Portraits: Consider background complexity when extending around subjects
-
Directional Balance: Think about visual weight and composition
- Extend toward less complex areas for more natural results
- Consider lighting direction when extending backgrounds
- Maintain compositional balance with symmetric extensions
-
Format Selection: Choose output format based on final use
- PNG: Best for images requiring transparency or maximum quality
- JPEG: Ideal for photographs and web use with smaller file sizes
- WebP: Modern format with excellent compression for digital applications
Limitations & Considerations
Content Limitations
- Complex Subjects: Highly detailed or intricate subjects may be challenging to extend naturally
- Text and Graphics: Images containing text or geometric patterns may not extend seamlessly
- Faces and People: Human subjects require careful consideration of extension directions
- Artistic Style: Some artistic styles may be more difficult to replicate in extensions
Technical Constraints
- Maximum Extension: 2000 pixels per direction limit
- File Size: 50MB maximum input file size
- Processing Time: Larger extensions require longer processing times
- Internet Dependency: Stable internet connection required for processing
Notes
- Stable Image Extender uses advanced AI algorithms to understand image context and generate coherent extensions
- Results may vary based on image complexity, content type, and extension parameters
- The model excels at natural scenes, architecture, and structured backgrounds
- Processing times scale with total extension area (sum of all direction extensions)
- For best results, ensure source images have clear, identifiable patterns or structures that can be logically continued