Recolor API
Recolor API
The Recolor API allows you to programmatically change garment colors in your generated images.
Endpoints
Core endpoints for garment recoloring integration.
POST
Create Recolor Task
Initiate a new recoloring process for an existing model or pose task.
Parameters
- pose_image_generation_idRequiredID of the base pose task.
- models_image_generation_task_idRequiredID of the base model task.
- color_changesRequiredArray of objects with 'target' (garment name) and 'color' (hex or name).
+ Show child attributes Hide child attributes
- image_qualityOptional'2k' or '4k'. (Default is '2k' if not specified).
POST/v4/models/multipose-image-recolor/
RequestHeaders
x-api-key: "YOUR_API_KEY"
Body (JSON)
{
"pose_image_generation_id": 936,
"color_changes": [
{"target": "blouse", "color": "royal blue"},
{"target": "lehenga", "color": "royal blue"}
],
"image_quality": "2k"
}200 OKResponse
{
"id": 501,
"status": "queued",
"created_at": "2024-05-05T12:00:00Z"
}GET
Poll for Task Status & Results
Because AI image generation is asynchronous, you must poll the server (e.g., every 3-5 seconds) to get the final image.
Task Statuses
queued/pending: Task is in the queue.
processing: AI is currently generating the image.
completed: The response will contain the result URL.
failed: Check the response for error details.
GET/v2/models/multipose-tasks/{task_id}/
RequestHeaders
x-api-key: "YOUR_API_KEY"
200 OKResponse
{
"id": 501,
"status": "completed",
"result_url": "https://cdn.vtryon.com/res/..."
}GET
Get All Recolor Tasks
Retrieve status and results for recolor generation tasks.
Parameters
- pageOptionalThe page number to retrieve (e.g., page=1).
- page_sizeOptionalThe number of items to return per page (e.g., page_size=10).
GET/v4/models/multipose-image-recolor/
RequestHeaders
x-api-key: "YOUR_API_KEY"
200 OKResponse
{
"count": 1,
"next": null,
"results": [
{
"id": 501,
"status": "completed",
"result_url": "https://cdn.vtryon.com/res/..."
}
]
}DELETE
Delete Recolor Task
Permanently deletes a specific recolor generation task using its ID.
Parameters
- task_idRequiredUnique ID of the recolor task to delete.
DELETE/v2/models/multipose-tasks/{task_id}/
RequestHeaders
x-api-key: "YOUR_API_KEY"
200 OKResponse
{
"detail": "Deleted successfully"
}