Redraw Image
The redraw_image
endpoint allows users to modify or recreate a given image using a specified mask and text prompt. This API is ideal for use cases such as creating customized visuals, refining designs, or replacing specific parts of an image while retaining its original structure.
API Endpoint
To redraw an image, send a POST request to the following URL:
POST https://api.genaifactory.ai/v1/redraw_image
Headers
formacloud-api-key
string
Yes
API key required for authenticating your request.
Request Body
The request body should be sent as form-data
and include the following fields:
user_input
string
No
A brief textual description (max 200 characters) for guiding the image redrawing process.
original_image
file
No
The original image file to be redrawn. Must not be provided with original_image_url
.
original_image_url
string
No
URL of the original image to be redrawn. Must not be provided with original_image
.
mask_image
file
No
Mask file specifying areas to be redrawn. Must not be provided with mask_image_url
.
mask_image_url
string
No
URL of the mask file specifying areas to be redrawn. Must not be provided with mask_image
.
Note: Either the file
or the url
must be provided for both the original image and the mask but not both simultaneously.
Response Body
Asynchronous Response (Status Code 202)
task_id
string
Yes
The ID of the task created for redrawing the image.
tasks_ahead_count
int
Yes
Number of tasks ahead in the queue when this task is created.
estimate_image_time
int
Yes
Estimated time (in seconds) to complete the task based on recent data.
Failure Response (Status Code 4XX or 5XX)
error
string
Yes
A descriptive error message indicating what went wrong with the request.
Example Request
Using curl
Command
Example Response
Asynchronous Response
Failure Response
Last updated