Generative Fill API
Generative Fill is an AI-powered tool designed to seamlessly modify images by adding, or changing elements. Using advanced machine learning, it ensures that modifications blend naturally with the surrounding content, preserving the image's original style and context.
For additional details on each parameter and its optimal use, check out the Generative Fill API Reference.
Key Features
Object Addition: Add new elements to existing images while maintaining style and context.
Style Consistency: Modifications are made to match the original image's lighting, texture, and perspective.
High-Quality Edits: Ensure the quality and resolution of the image are maintained during all edits.
Functionality
Generative Fill allows users to seamlessly modify images by adding, or expanding elements. Users start by uploading an image and selecting the area to modify using smart tools. For additions, users can describe the object with text prompts or select from a predefined library. The AI analyzes the image's context, lighting, and style before generating the desired changes, whether reconstructing backgrounds, adding new elements, or extending the scene. Refinements can be made with sliders, brush tools, or style options. The final result can be previewed and adjusted in real time, with a high-resolution output provided once complete.
Strategic Value
Generative Fill provides significant flexibility for quick, realistic image modifications. It simplifies workflows for tasks like product visualization, content creation, and marketing, enhancing productivity and creativity in image editing.
Industries
Media and Entertainment: Seamlessly expand art and visual components.
Marketing and Advertising: Modify and extend visuals for consistency.
E-commerce and Retail: Adjust image compositions for varied uses.
Food and Hospitality: Create engaging food visuals with complementary backgrounds.
Endpoint
The endpoint for Image Inpaint API is
Headers
You need to pass the following headers along with the request.
Authorization
Pass your API token as a Bearer token in the Authorization header. Refer to the Authorization Section for guidance on managing your API keys.
Request Body Parameters
Below are the parameters that allow for a high degree of customization when in-painting images. Click on each parameter to learn more about its use and best practices:
prompt
A text description guiding the inpainting process. Use descriptive and detailed language to achieve optimal results. See Creating Prompt.
image
Upload the image you want to inpaint. 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.
mask
Upload the mask image indicating the areas to be inpainted.. The image should be provided in binary format or as a file path.
Example API Call
Here’s a sample curl
request that uses the parameters above:
For additional details on each parameter and its optimal use, check out the Generative Fill API Reference.
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
In case of errors, the response includes status codes and error messages. See the Errors and Troubleshooting section for help with interpreting and resolving these errors.
If you encounter issues or need additional assistance, please reach out to our support team. We’re here to help you get the most out of the Imagine Art APIs.
Last updated