Face Swap API
  1. Face Swap APIs
Face Swap API
  • Start Your Face Swap
  • Pricing
  • Face Swap APIs
    • Get Face Swap Task Info by ID
      POST
    • Create Face Swap Task
      POST
    • Cancel Face Swap Task (if still pending)
      POST
  • Other APIs
    • Face detection from image/video URL
      POST
    • Get video info from url
      POST
  1. Face Swap APIs

Get Face Swap Task Info by ID

POST
/get-task-info
Last modified:2025-06-04 15:44:02
Maintainer:Not configured
It returns the current processing status, progress percentage, and result URL (if the task is completed).
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/get-task-info' \
--header 'x-api-key: dfed35b0-350c-11f0-9d91-1507389bbab0' \
--header 'Content-Type: application/json' \
--data-raw '{
    "task_id": "683a233819c60c16bb3b987e"
}'
Response Response Example
200 - Example 1
{
    "code": 0,
    "info": "success",
    "data": {
        "id": "683a233819c60c16bb3b987e",
        "state": 3,
        "price": 100,
        "process": 0,
        "show_id": "486405687",
        "params": {
            "type": "video",
            "media_url": "https://facemint.io/media.mp4",
            "start_time": 0,
            "end_time": 4,
            "resolution": 2,
            "enhance": 1,
            "nsfw_check": 0,
            "watermark": "MyFaceAI",
            "callback_url": "https://your-site.com/?cbid=121233",
            "swap_list": [
                {
                    "from_face": "https://facemint.io/face1.png",
                    "to_face": "https://facemint.io/to1.png"
                },
                {
                    "from_face": "https://facemint.io/face1.png",
                    "to_face": "https://facemint.io/to1.png"
                },
                {
                    "from_face": "https://facemint.io/face1.png",
                    "to_face": "https://facemint.io/to1.png"
                }
            ]
        },
        "result": {
            "user_id": "656373d418c7f23a1d28e914",
            "media_id": "",
            "file_url": "https://waf-cloudflare.com/4174d2903db711f09d911507389bbab0.mp4",
            "thumb_url": "https://waf-cloudflare.com/429006903db711f09d911507389bbab0.jpg",
            "file_hash": "2025-05-31 00:36:16"
        },
        "add_time": 1748640568770,
        "edit_time": 1748651776801
    }
}

Request

Header Params
x-api-key
string 
optional
Example:
dfed35b0-350c-11f0-9d91-1507389bbab0
Body Params application/json
task_id
string 
required
task id
Examples

Responses

🟢200OK
application/json
Body
code
integer 
required
Response code, 0 means success
info
string 
required
Response message, usually 'success'
data
object 
required
id
string 
required
Unique task ID
state
integer 
required
Task status:, -1(failed), 0(pending), 1(processing), 2(canceld), 3(success)
price
integer 
required
Task spend
process
integer 
required
Processing progress (percentage). Will be 0 or 100 when done
show_id
string 
required
Public-facing task identifier
params
object 
required
result
object 
required
add_time
integer 
required
Time when the task was added (Unix timestamp in ms)
edit_time
integer 
required
Last time the task was updated (Unix timestamp in ms)
🟠404Record not found
🟠400Invalid input
Previous
Pricing
Next
Create Face Swap Task
Built with