1. Reference
Fotor OpenAPI
  • Getting Started
    • Introduction
    • Access and Authentication
    • For Serverless Clients
    • Token Consumption
  • Reference
    • Get User Token Balance
      GET
    • Query Task Details
      GET
    • AI Upscaler API
      POST
    • AI Skin Retouch API
      POST
    • Image Generation API
      POST
    • Text to Image API
      POST
    • Image to Image (AI Art Effects) API
      POST
    • Background Remover API
      POST
    • AI Headshot API
      POST
    • Photo Colorize API
      POST
    • Photo Restoration API
      POST
    • AI Replace API
      POST
    • AI Expand API
      POST
    • AI Baby Generator API
      POST
    • AI Recolor API
      POST
    • AI Marketing Video API
      POST
  • Webhook
    • Webhook
  • AI Editor SDK
    • Getting Started
    • Get Sdk Temporary Token
      GET
  • Schemas
    • RecolorRequest
    • MiniappsRequest
    • SubmitResponse
    • ErrorResponse
  1. Reference

AI Recolor API

POST
/v1/aiart/recolor

Overview#

The AI Recolor API changes the color of a product in an image. Provide the
source image together with the color you want and the part you want to recolor,
and Fotor returns a recolored result.

Endpoint#

POST /v1/aiart/recolor — no additional path parameters are needed; all service
settings are preset by Fotor.

Key Features#

Color Control:
Pass any target color as a hex string (for example #f95350).
Use prompt to describe what should be recolored (for example Clothes).
Flexible Input:
userImageUrl accepts either a public image URL or an inline base64 image
(data:image/jpeg;base64,...). Inline images are uploaded to Fotor storage
before the task starts.
Asynchronous Task:
The submission returns a taskId. Poll GET /v1/aiart/tasks/{taskId} until
status changes from 0 (processing) to 1 (success) or 2 (failed).
On success, resultUrl contains the recolored image.

Pricing#

Each task costs 1 credit, regardless of image size or the target color.
Credits are deducted after the task is successfully submitted.

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Example
{
    "userImageUrl": "https://example.com/product.jpg",
    "prompt": "Clothes",
    "color": "#f95350"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api-b.fotor.com/v1/aiart/recolor' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "userImageUrl": "https://example.com/product.jpg",
    "prompt": "Clothes",
    "color": "#f95350"
}'

Responses

🟢200
application/json
Task submitted successfully
Bodyapplication/json

Example
{
    "code": "000",
    "msg": "success",
    "data": {
        "taskId": "string",
        "creditsIncrement": 0
    }
}
🟠400
🟠401
🟠429
🔴500
Modified at 2026-11-23 10:28:55
Previous
AI Baby Generator API
Next
AI Marketing Video API
Built with