LogoLogo
  • Welcome
  • Imagine API Studio
  • Get Your API Key
  • Imagine API Reference
  • Getting Started
    • How the API Works
    • API Key Management
    • Selecting the Right API Plan
    • Get Free API Calls
    • Your First API Call
    • Available AI Features in the API
    • Integrating the API into Your Project
    • API Call Billing and Token Usage
  • Troubleshooting
    • Request and Response Formats
    • Error Documentation
    • Troubleshooting Tips
    • Getting Support
  • Core Concepts
    • API Prototyping
    • Creating an Effective Prompt
    • Selecting the Right Style
    • Randomization Control (Seed)
  • Image Generation APIs
    • Introduction
    • Text to Image API
    • Text to PNG API
  • Image Editing APIs
    • Introduction
    • Background Remover API
    • Image Upscale API
    • Generative Fill API
    • AI Resize API
    • Retouch API
  • E-Commerce APIs
    • AI Backgrounds API
  • Video Generation API's
    • Introduction
    • Text to Video API
    • Image to Video API
    • Status API
    • Delete API
Powered by GitBook
On this page
  • Key Features
  • Functionality
  • Strategic Value
  • Industries
  • Endpoint
  • Headers
  • Request Body Parameters
  • Example API Call
  • Response
  • Error Handling
  1. E-Commerce APIs

AI Backgrounds API

PreviousE-Commerce APIsNextVideo Generation API's

Last updated 5 months ago

The AI Background API allows users to add AI-generated backgrounds to transparent images. By providing a descriptive prompt and style preferences, this API generates contextually appropriate and visually stunning backgrounds. It is ideal for creating professional product photos, marketing materials, or artistic content effortlessly.

For additional details on each parameter and its optimal use, check out the .

Input
Output

Key Features

  • Contextual Relevance: Generate backgrounds that complement the subject based on color, lighting, and composition.

  • Customizable Outputs: Choose styles, color palettes, and levels of complexity to match your vision.

  • Seamless Integration: Align backgrounds perfectly with existing image elements.

  • Versatile Use: Create backgrounds for various purposes, from marketing visuals to artistic projects.

Functionality

Upload an image or select a subject, and the AI analyzes key factors like color scheme and context. Specify preferences for the background, such as style (e.g., minimalist, abstract, or realistic) and level of detail. The AI generates a complementary background that integrates smoothly with the subject. Real-time previews and adjustments allow users to refine details such as lighting, depth, and specific background elements. Multiple options can be generated for A/B testing or varied use cases.

Strategic Value

AI Backgrounds reduces the need for manual design and stock images, enabling faster creation of visually cohesive content. It empowers users to produce diverse, high-quality visuals quickly, streamlining workflows and expanding creative possibilities.

Industries

  • Technology and Software: Generate dynamic backgrounds for UI

  • Media and Entertainment: Create background scenes for media

  • E-commerce and Retail: Develop appealing backgrounds for products

  • Marketing and Advertising: Generate themed backgrounds for branding

  • Education and Training: Create illustrative backgrounds for courses

  • Interior Design: Generate backgrounds for room designs

Endpoint

The endpoint for Image Retouch API is

POST https://api.vyro.ai/v2/image/generations/ai-background

Headers

You need to pass the following headers along with the request.

Authorization

Authorization: Bearer {{API_TOKEN}}

Request Body Parameters

Below are the parameters that allow for a high degree of customization when resizing images. Click on each parameter to learn more about its use and best practices:

prompt

prompt="A beach at sunset with gentle waves"

image

The transparent image file to which the background will be added. The image should be provided in binary format or as a file path. Use this field to provide the original image that the API will transform.

image=@"path/to/your/image.jpg"

Example API Call

Here’s a sample curl request that uses the parameters above:

curl --location --request POST 'https://api.vyro.ai/v2/image/generations/ai-background' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--form 'prompt="A scenic mountain view with snow and pine trees"' \
--form 'image=@"/path/to/transparent_image.png"'

Response

Upon a successful request, the API returns a binary image file which can be directly rendered or saved.

Response Attributes:

  • image (binary): The generated image in binary format. You can decode and display or store it based on your application needs.

Error Handling

Pass your API token as a Bearer token in the Authorization header. Refer to the for guidance on managing your API keys.

A descriptive text that guides the AI in generating the desired background. Use descriptive and detailed language to achieve optimal results. See .

For additional details on each parameter and its optimal use, check out the .

In case of errors, the response includes status codes and error messages. See the section for help with interpreting and resolving these errors.

AI Backgrounds API Reference
Authorization Section
AI Backgrounds API Reference
Creating Prompt
Errors and Troubleshooting