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. Image Editing APIs

AI Resize API

PreviousGenerative Fill APINextRetouch API

Last updated 5 months ago

Image Expand is an AI-powered tool that enables the extension of an existing image’s boundaries, effectively enlarging its canvas while preserving the visual coherence, style, and context. This feature generates new content that seamlessly integrates with the original image, providing flexibility in adjusting image dimensions for different uses.

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

Input
Mask
Output

Key Features

  • Canvas Expansion: Extend the image's boundaries in any direction (top, bottom, left, right, or all sides).

  • Content Consistency: Maintain the original image’s style, colors, textures, and lighting in the expanded areas.

  • Diverse Image Types Supported: Works for various image formats, including photographs, digital art, and illustrations.

  • Customizable Expansion: Specify the amount of expansion by percentage or precise dimensions.

  • High-Quality Output: Ensures that the expanded areas are high resolution and blend naturally with the rest of the image.

Functionality

AI Resize allows users to effortlessly extend the boundaries of an image while maintaining visual coherence. After uploading an image, users define the direction and amount of expansion They can also specify content preferences for the expanded areas. The AI then analyzes the image's edges, examining existing patterns, colors, textures, and spatial relationships. Based on this analysis, the system intelligently generates new content—extending landscapes, urban scenes, or abstract patterns—seamlessly blending it with the original. Users can refine the results using adjustment sliders, brush tools, or style transfer options. The expanded image is previewed in real-time, allowing for iterative changes before receiving a high-resolution output, ensuring the final result maintains or enhances the image’s quality.

Strategic Value

AI Resizing offers unmatched flexibility in adapting visual assets, making it ideal for applications such as resizing images for different aspect ratios, adjusting content for multi-platform usage, or preparing assets for print or digital displays without the need for cropping. This tool enhances creative and production workflows by allowing users to seamlessly modify image dimensions while preserving design integrity.

Industries

  • E-commerce and Retail: Adjust image dimensions for various ad formats.

  • Media and Entertainment: Extend visuals for creative content needs.

  • Marketing and Advertising: Adapt images to fit diverse campaign formats.

  • Food and Hospitality: Expand images for menu displays and promotions.

Endpoint

The endpoint for Image AI Resizing API is

POST https://api.vyro.ai/v2/image/edits/ai-resize

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 futuristic cityscape at night with neon lights"

image

Upload the image you want to resize. 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"

mask

Upload the mask image indicating the areas to be extended.. The image should be provided in binary format or as a file path.

mask=@"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/edits/ai-resize' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--form 'prompt="A futuristic cityscape at night with neon lights"' \
--form 'image=@""' \
--form 'mask=@"path/to/your/image.jpg"'

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 text description guiding the resizing process. 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.

If you encounter issues or need additional assistance, please reach out to . We’re here to help you get the most out of the Imagine Art APIs.

AI Rezize API Reference
Authorization Section
AI Rezize API Reference
our support team
Creating Prompt
Errors and Troubleshooting