LogoLogo
  • Overview
  • Quick Start
  • Authentication
  • Rate limits
  • Errors
  • Image Editing API
    • Image I/O
    • Image Operations
      • Restorations
      • Resizing
      • Outpainting
      • Generative Editing
      • Color Adjustments
      • Background
      • Padding
      • Privacy
    • API Reference
    • Async API Reference
    • Batch API Reference
    • Upload API Reference
  • image generation api
    • Image Generation I/O
    • Image Generation Options
    • API Reference
  • AI Background API
    • AI Background I/O
    • AI Background Options
      • Object
      • Scene
      • Product Shadow
    • API Reference
  • Image to Video API
    • Image to Video I/O
    • Image to Video Options
    • Async API Reference
  • Storage Connectors
    • Overview
    • AWS S3
    • Google Cloud Storage
    • Web Folder
    • API Reference
  • Guides
    • E-commerce
    • Real Estate
    • Printing
  • Redoc
  • Blog
Powered by GitBook
On this page
  • Intro
  • Output
Edit on GitHub
  1. AI Background API

AI Background I/O

Learn how to configure input and output to use the AI Background API.

PreviousAPI ReferenceNextAI Background Options

Last updated 6 months ago

Intro

The AI Background Endpoint allows you to turn simple product photos into beautiful visual assets. In just a few seconds, you can get up to 4 options and select the images that work best for you.

The generated images have a size of 1024×1024 pixels. You can further improve their resolution and quality using our Image Editing API, see the and sections for more info.

Limitations

Only one product image can be processed per request.

Output

Configuring output is optional. By default, you may omit the output option from the request payload. In this case, our system stores the result in a temporary bucket with a lifespan of 24 hours and provides a public URL to the image.

Alternatively, you can use a connected : just configure the path to the folder where you want to store results.

Output image file types

The following image formats are supported for the output: JPEG, PNG, WEBP, and AVIF.

Basic and advanced output options

You may also specify advanced output, like number of images to generate, image format, and format-specific options like PNG compression level, JPEG quality, or using JPEG progressive display type.

{
    "output": "storage://storage-name/result-path/image-name.jpg"
}
"output": {
    "destination": "storage://storage-name/result-path/image-name.jpg",
    "format": "jpeg",
    "number_of_images": 1
}
"output": {
    "destination": "storage://storage-name/result-path/image-name.jpg",
    "format": {
        "type": "jpeg",
        "quality": 85,
        "progressive": true
    },
    "number_of_images": 1
}

Number of images

With AI Background API, you can generate up to 4 images with one request.

Every generated image charges 2 credit.

Setting number_of_images to 4 will charge 8 credits per request.

The number_of_images option defaults to 4.

{
    "output": {
        "number_of_images": 2
    }
}

See the full list of the advanced format-specific options at for more info.

Resizing
Cloud Storage
Image I/O
Upscale