If you're looking for an API, here is a sample code in NodeJS to help you out.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const axios = require('axios');
const api_key = "YOUR API KEY";
const url = "https://api.segmind.com/workflows/662baa220b84ed5b0f58eec1-v1";
const data = {
input_image: "publicly accessible image link",
text_prompt: "the user input string"
};
axios.post(url, data, {
headers: {
'x-api-key': api_key,
'Content-Type': 'application/json'
}
}).then((response) => {
console.log(response.data);
});
1
2
3
4
5
{
"poll_url": "<base_url>/requests/<some_request_id>",
"request_id": "some_request_id",
"status": "QUEUED"
}
You can poll the above link to get the status and output of your request.
1
2
3
{
"image_output": "image in URL Format"
}
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Enhance your shoe product imagery with the Shoe Outdoor Product Photography workflow that leverages ControlNet Inpainting and Image Prompt for a professional outdoor feel. This workflow strategically adapts the background of your shoe images to evoke outdoor aesthetics, seamlessly integrating the product with its new environment.
The workflow employs a methodical approach ensuring precision and quality results:
Upload Shoe Image: Begin by uploading your shoe product image. This will serve as the central focus for the subsequent editing processes.
Upload Reference Image for Background: Select and upload a reference image that embodies the desired outdoor environment. This image informs the inpainting model about the context and feel of the new background.
ControlNet Inpainting Model: The workflow uses ControlNet Inpainting to replace the existing background with the selected outdoor scenery, meticulously ensuring that the shoe blends naturally within the new environment.
Fooocus Outpaint for Expansion: Finally, Fooocus Outpaint extends the photo borders, offering a comprehensive view that maintains the shoe as the central aspect while naturally integrating the expanded background.
Upload Shoe Image: Start by uploading a high-quality image of the shoe you wish to edit.
Select the Background Image: Choose an outdoor-themed reference image that aligns with your brand's visual goals.
Process the Images: Let the workflow automatically implement the ControlNet Inpainting to reimagine the background.
Adjust and Finalize: Review the processed image for final adjustments, ensuring the shoe and background are visually cohesive.
E-commerce Platforms: Enhance product listings with visually appealing outdoor backgrounds that attract online shoppers.
Marketing Campaigns: Create themed campaigns with a collection of shoe images set against various outdoor backgrounds, increasing engagement.
Branding and Visual Identity: Reinforce a brand's outdoor lifestyle message by consistently showcasing products in natural settings.
Social Media Content: Generate captivating content for social channels, utilizing diverse and dynamic backgrounds to highlight product features.
This model is capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask
Fooocus Outpainting transforms ordinary images into extraordinary works of art by seamlessly expanding their boundaries.