Create an image face detection task
Face Swap
Detect Face (Image)
Create a face detection task for image multi-face swap.
POST
Create an image face detection task
Overview
Before multi-face swap, call this endpoint to create an image face detection task. The endpoint returnsdetect_task_id; call the face detection result endpoint to query status and retrieve detect_id with the detected face list after success.
API Endpoint
Request Parameters
URL of the image to detect faces from.
Request Example
Response Example
Next Step
Query Face Detection Result
Query detection status and get the detect_id and faces list required for multi-face swap
Related Resources
Image Multi-Face Swap
Replace selected faces in an image using
detect_id and facesFace Detection Result
Query detection status and retrieve the face list
Authorizations
All APIs require authentication via API Key.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header:
x-api-key: YOUR_API_KEY
Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Body
application/json
URL of the image to detect faces from.
Example:
"https://example.com/source.png"
Response
Request successful
Response status code
- 200: Success - Request has been processed successfully
- 401: Unauthorized - Authentication credentials are missing or invalid
- 402: Insufficient Credits - Account does not have enough credits to perform the operation
- 404: Not Found - The requested resource or endpoint does not exist
- 422: Validation Error - The request parameters failed validation checks
- 429: Rate Limited - Request limit has been exceeded for this resource
- 455: Service Unavailable - System is currently undergoing maintenance
- 500: Server Error - An unexpected error occurred while processing the request
- 501: Generation Failed - Content generation task failed
- 505: Feature Disabled - The requested feature is currently disabled
Available options:
200, 401, 402, 404, 422, 429, 455, 500, 501, 505 Response message, error description when failed
Example:
"success"
