Skip to main content
GET
/
api
/
v1
/
client
/
job
/
detect-face-result
Get face detection result
curl --request GET \
  --url https://api.crun.ai/api/v1/client/job/detect-face-result \
  --header 'x-api-key: <api-key>'
{
  "code": 200,
  "message": "success",
  "data": {
    "detect_task_id": "dit60yt8reqplt1c16",
    "result": {
      "id": "m1oZzqYp9dN",
      "status": "succeed",
      "type": "face_detect",
      "hair_id": null,
      "faces": [
        {
          "id": 0,
          "link": "https://example.com/detected-face-0.jpg"
        },
        {
          "id": 1,
          "link": "https://example.com/detected-face-1.jpg"
        }
      ],
      "started_at": "2026-05-27 12:14:03",
      "finished_at": "2026-05-27 12:14:04",
      "error": null
    },
    "status": "succeeded",
    "error": null
  }
}

Overview

After creating a face detection task, call this endpoint to query detection status. When the task succeeds, data.result.id is the detect_id used by multi-face swap requests, and data.result.faces contains each detected face ID and face image URL.
The detect_id is valid for one hour. The media URL passed to the swap request must be the same URL used during detection.

API Endpoint

GET https://api.crun.ai/api/v1/client/job/detect-face-result

Request Parameters

detect_task_id
string
required
The detect_task_id returned when creating a face detection task.

Status Values

StatusDescription
startingStarting
processingProcessing
succeededSucceeded
failedFailed

Succeeded Response Example

{
  "code": 200,
  "message": "success",
  "data": {
    "detect_task_id": "dit60yt8reqplt1c16",
    "result": {
      "id": "m1oZzqYp9dN",
      "status": "succeed",
      "type": "face_detect",
      "hair_id": null,
      "faces": [
        {
          "id": 0,
          "link": "https://example.com/detected-face-0.jpg"
        },
        {
          "id": 1,
          "link": "https://example.com/detected-face-1.jpg"
        }
      ],
      "started_at": "2026-05-27 12:14:03",
      "finished_at": "2026-05-27 12:14:04",
      "error": null
    },
    "status": "succeeded",
    "error": null
  }
}

Processing Response Example

{
  "code": 200,
  "message": "success",
  "data": {
    "detect_task_id": "dit9ka6i5qoc519iv0",
    "result": null,
    "status": "processing",
    "error": null
  }
}

Failed Response Example

{
  "code": 200,
  "message": "success",
  "data": {
    "detect_task_id": "dit9ka6i5qoc519iv0",
    "result": null,
    "status": "failed",
    "error": {
      "code": "FaceSwap.Detect.Failed",
      "message": "[任务NDm40D2DQp6] 未检测到人脸,源文件未检测到人脸"
    }
  }
}

Detect Face (Image)

Create an image face detection task

Detect Face (Video & GIF)

Create a video or GIF face detection task

Authorizations

x-api-key
string
header
required

All APIs require authentication via API Key.

Get API Key:

  1. 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

Query Parameters

detect_task_id
string
required

The detect_task_id returned when creating a face detection task.

Response

Request successful

code
enum<integer>

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
message
string

Response message, error description when failed

Example:

"success"

data
object