Skip to main content

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

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

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_EXTENDER
modelstringYesAI model identifier. Must be stable-image
promptObjectobjectYesConfiguration object containing all extension parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesPath to the image to be extended-
output_formatstringNoOutput format for the extended imagepng
leftnumberNoPixels to extend on the left side (0-2000)0
rightnumberNoPixels to extend on the right side (0-2000)0
upnumberNoPixels to extend on the top side (0-2000)0
downnumberNoPixels to extend on the bottom side (0-2000)0

Extension Parameters

ParameterRangeDescription
left0-2000Number of pixels to extend the image to the left
right0-2000Number of pixels to extend the image to the right
up0-2000Number of pixels to extend the image upward
down0-2000Number of pixels to extend the image downward

Supported Output Formats

FormatDescriptionBest For
pngHigh quality, lossless compressionDetailed images, graphics with transparency
jpegSmaller file size, slight compressionPhotographs, web images
webpModern format, excellent compressionWeb applications, modern browsers

Code Examples

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
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Path 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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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