{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/faceswapai-com/json-schema/faceswapai-com-task-schema.json",
  "title": "Task",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/faceswapai-com-openapi.json#/components/schemas/Task",
  "type": "object",
  "required": [
    "id",
    "taskType",
    "status"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "taskType": {
      "type": "string",
      "enum": [
        "IMAGE_SWAP",
        "VIDEO_SWAP",
        "GIF_FACE_SWAP",
        "MULTI_FACE_SWAP"
      ]
    },
    "status": {
      "$ref": "#/$defs/TaskStatus"
    },
    "costCredits": {
      "type": "integer"
    },
    "result": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "Temporary result URL when completed."
        },
        "watermarked": {
          "type": "boolean",
          "description": "False for every current result: the watermarked photo trial ended on 2026-10-11."
        },
        "error": {
          "type": "string",
          "description": "Actionable public error when failed."
        }
      },
      "additionalProperties": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "TaskStatus": {
      "type": "string",
      "enum": [
        "PENDING",
        "PROCESSING",
        "COMPLETED",
        "FAILED",
        "CANCELLED"
      ]
    }
  }
}