{
  "openapi": "3.0.3",
  "info": {
    "title": "CaptchaFlow API",
    "description": "Universal AI-Powered Captcha Solving API supporting 19 task types across 7 categories.\n\n**Protocol**: Industry-standard captcha protocol (createTask / getTaskResult / getBalance)\n\n**Vision Backend**: AI vision engine with AI model\n\n**Browser Automation**: Playwright + Chromium\n\n**Authentication**: Include `clientKey` in the JSON request body for all POST endpoints.",
    "version": "1.0.0",
    "contact": {
      "name": "CaptchaFlow API Support",
      "url": "https://captcha.dataleads.pro/v1"
    },
    "license": {
      "name": "Proprietary"
    }
  },
  "servers": [
    {
      "url": "https://captcha.dataleads.pro/v1",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Core",
      "description": "Core API endpoints for task creation, polling, and balance"
    },
    {
      "name": "Health",
      "description": "Service health and information endpoints"
    },
    {
      "name": "Image Tasks",
      "description": "Image text captcha solving (3 task types)"
    },
    {
      "name": "reCAPTCHA v2",
      "description": "reCAPTCHA v2 browser-based tasks (3 task types)"
    },
    {
      "name": "reCAPTCHA v3",
      "description": "reCAPTCHA v3 browser-based tasks (6 task types)"
    },
    {
      "name": "hCaptcha",
      "description": "hCaptcha browser-based tasks (1 task type)"
    },
    {
      "name": "Turnstile",
      "description": "Cloudflare Turnstile browser-based tasks (2 task types)"
    },
    {
      "name": "Classification",
      "description": "Image classification captcha tasks (4 task types)"
    }
  ],
  "components": {
    "schemas": {
      "ClientKey": {
        "type": "object",
        "required": ["clientKey"],
        "properties": {
          "clientKey": {
            "type": "string",
            "description": "Authentication key. Use 'captcha_solver_key_2026'.",
            "example": "captcha_solver_key_2026"
          }
        }
      },
      "CreateTaskRequest": {
        "type": "object",
        "required": ["clientKey", "task"],
        "properties": {
          "clientKey": {
            "type": "string",
            "description": "Authentication key.",
            "example": "captcha_solver_key_2026"
          },
          "task": {
            "type": "object",
            "description": "Task object. Must include a 'type' field and type-specific parameters.",
            "properties": {
              "type": {
                "type": "string",
                "description": "The captcha task type.",
                "enum": [
                  "ImageToTextTask",
                  "ImageToTextTaskMuggle",
                  "ImageToTextTaskM1",
                  "RecaptchaV2TaskProxyless",
                  "RecaptchaV2EnterpriseTaskProxyless",
                  "NoCaptchaTaskProxyless",
                  "RecaptchaV3TaskProxyless",
                  "RecaptchaV3TaskProxylessM1",
                  "RecaptchaV3TaskProxylessM1S7",
                  "RecaptchaV3TaskProxylessM1S9",
                  "RecaptchaV3EnterpriseTask",
                  "RecaptchaV3EnterpriseTaskM1",
                  "HCaptchaTaskProxyless",
                  "TurnstileTaskProxyless",
                  "TurnstileTaskProxylessM1",
                  "HCaptchaClassification",
                  "ReCaptchaV2Classification",
                  "FunCaptchaClassification",
                  "AwsClassification"
                ]
              }
            }
          }
        }
      },
      "CreateTaskResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "integer",
            "description": "0 = success, 1 = error.",
            "example": 0
          },
          "taskId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique task identifier. Use this to poll for results.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "errorCode": {
            "type": "string",
            "description": "Error code if errorId is 1.",
            "example": "ERROR_KEY_DOES_NOT_EXIST"
          },
          "errorDescription": {
            "type": "string",
            "description": "Human-readable error description.",
            "example": "Invalid client key"
          }
        }
      },
      "GetTaskResultRequest": {
        "type": "object",
        "required": ["clientKey", "taskId"],
        "properties": {
          "clientKey": {
            "type": "string",
            "description": "Authentication key.",
            "example": "captcha_solver_key_2026"
          },
          "taskId": {
            "type": "string",
            "format": "uuid",
            "description": "Task ID returned by createTask.",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          }
        }
      },
      "GetTaskResultResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "integer",
            "description": "0 = success, 1 = error.",
            "example": 0
          },
          "status": {
            "type": "string",
            "enum": ["processing", "ready", "failed"],
            "description": "Task processing status.",
            "example": "ready"
          },
          "solution": {
            "type": "object",
            "description": "Solution object. Structure depends on task type.",
            "properties": {
              "gRecaptchaResponse": {
                "type": "string",
                "description": "Token for reCAPTCHA v2/v3 and hCaptcha tasks.",
                "example": "03AGdBq25..."
              },
              "token": {
                "type": "string",
                "description": "Token for Cloudflare Turnstile tasks.",
                "example": "0.eYEMe..."
              },
              "text": {
                "type": "string",
                "description": "JSON string with result for ImageToText tasks (captcha_type, clicks/coordinates).",
                "example": "{\"captcha_type\": \"text\", \"result\": \"ABCD\"}"
              },
              "objects": {
                "type": "array",
                "items": { "type": "integer" },
                "description": "List of selected image indices for classification tasks.",
                "example": [0, 3, 5]
              },
              "answer": {
                "description": "Boolean or list answer for classification tasks.",
                "oneOf": [
                  { "type": "boolean" },
                  { "type": "array", "items": { "type": "integer" } }
                ],
                "example": true
              }
            }
          },
          "errorCode": {
            "type": "string",
            "description": "Error code if status is failed.",
            "example": "ERROR_CAPTCHA_UNSOLVABLE"
          },
          "errorDescription": {
            "type": "string",
            "description": "Human-readable error description.",
            "example": "Unable to solve the captcha"
          }
        }
      },
      "GetBalanceResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "integer",
            "description": "0 = success, 1 = error.",
            "example": 0
          },
          "balance": {
            "type": "number",
            "format": "float",
            "description": "Account balance.",
            "example": 99999.0
          },
          "errorCode": {
            "type": "string",
            "description": "Error code if errorId is 1."
          },
          "errorDescription": {
            "type": "string",
            "description": "Error description if errorId is 1."
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "healthy",
            "description": "Service health status."
          },
          "supported_types": {
            "type": "array",
            "items": { "type": "string" },
            "description": "List of all supported task types.",
            "example": [
              "ImageToTextTask",
              "ImageToTextTaskMuggle",
              "ImageToTextTaskM1",
              "RecaptchaV2TaskProxyless",
              "RecaptchaV2EnterpriseTaskProxyless",
              "NoCaptchaTaskProxyless",
              "RecaptchaV3TaskProxyless",
              "RecaptchaV3TaskProxylessM1",
              "RecaptchaV3TaskProxylessM1S7",
              "RecaptchaV3TaskProxylessM1S9",
              "RecaptchaV3EnterpriseTask",
              "RecaptchaV3EnterpriseTaskM1",
              "HCaptchaTaskProxyless",
              "TurnstileTaskProxyless",
              "TurnstileTaskProxylessM1",
              "HCaptchaClassification",
              "ReCaptchaV2Classification",
              "FunCaptchaClassification",
              "AwsClassification"
            ]
          }
        }
      },
      "ServiceInfoResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "CaptchaFlow API"
          },
          "version": {
            "type": "string",
            "example": "1.0.0"
          },
          "description": {
            "type": "string",
            "example": "Universal AI-Powered Captcha Solving API"
          },
          "protocol": {
            "type": "string",
            "example": "Universal captcha protocol"
          },
          "task_types": {
            "type": "integer",
            "example": 19
          },
          "endpoints": {
            "type": "array",
            "items": { "type": "string" },
            "example": ["/createTask", "/getTaskResult", "/getBalance", "/api/v1/health"]
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorId": {
            "type": "integer",
            "example": 1
          },
          "errorCode": {
            "type": "string",
            "example": "ERROR_CAPTCHA_UNSOLVABLE"
          },
          "errorDescription": {
            "type": "string",
            "example": "Unable to solve the captcha"
          }
        }
      }
    },
    "examples": {
      "CreateImageToTextTask": {
        "summary": "ImageToTextTask request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "ImageToTextTask",
            "body": "<base64_encoded_image>"
          }
        }
      },
      "CreateRecaptchaV2Task": {
        "summary": "RecaptchaV2TaskProxyless request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "RecaptchaV2TaskProxyless",
            "websiteURL": "https://example.com",
            "websiteKey": "6Le-wvkSVVABBPB0JGLdnLBwZdMwQXa5JbjJWkA"
          }
        }
      },
      "CreateRecaptchaV3Task": {
        "summary": "RecaptchaV3TaskProxyless request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "RecaptchaV3TaskProxyless",
            "websiteURL": "https://example.com",
            "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
            "pageAction": "verify",
            "minScore": 0.7
          }
        }
      },
      "CreateHCaptchaTask": {
        "summary": "HCaptchaTaskProxyless request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "HCaptchaTaskProxyless",
            "websiteURL": "https://example.com",
            "websiteKey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6b2"
          }
        }
      },
      "CreateTurnstileTask": {
        "summary": "TurnstileTaskProxyless request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "TurnstileTaskProxyless",
            "websiteURL": "https://example.com",
            "websiteKey": "0x4AAAAAAAAjq_YWYLto0kF"
          }
        }
      },
      "CreateHCaptchaClassificationTask": {
        "summary": "HCaptchaClassification request",
        "value": {
          "clientKey": "captcha_solver_key_2026",
          "task": {
            "type": "HCaptchaClassification",
            "queries": ["<BASE64_IMAGE_1>", "<BASE64_IMAGE_2>"],
            "question": "Please click each image containing a dog"
          }
        }
      },
      "TaskCreated": {
        "summary": "Task created successfully",
        "value": {
          "errorId": 0,
          "taskId": "550e8400-e29b-41d4-a716-446655440000"
        }
      },
      "TaskProcessing": {
        "summary": "Task still processing",
        "value": {
          "errorId": 0,
          "status": "processing"
        }
      },
      "TaskReadyToken": {
        "summary": "Task ready with token (reCAPTCHA/hCaptcha)",
        "value": {
          "errorId": 0,
          "status": "ready",
          "solution": {
            "gRecaptchaResponse": "03AGdBq25..."
          }
        }
      },
      "TaskReadyTurnstileToken": {
        "summary": "Task ready with Turnstile token",
        "value": {
          "errorId": 0,
          "status": "ready",
          "solution": {
            "token": "0.eYEMe..."
          }
        }
      },
      "TaskReadyText": {
        "summary": "Task ready with text (ImageToText)",
        "value": {
          "errorId": 0,
          "status": "ready",
          "solution": {
            "text": "{\"captcha_type\": \"text\", \"result\": \"ABCD\"}"
          }
        }
      },
      "TaskReadyClassification": {
        "summary": "Task ready with classification objects",
        "value": {
          "errorId": 0,
          "status": "ready",
          "solution": {
            "objects": [0, 3, 5]
          }
        }
      },
      "TaskFailed": {
        "summary": "Task failed",
        "value": {
          "errorId": 1,
          "status": "failed",
          "errorCode": "ERROR_CAPTCHA_UNSOLVABLE",
          "errorDescription": "Unable to solve the captcha"
        }
      },
      "BalanceResponse": {
        "summary": "Balance check response",
        "value": {
          "errorId": 0,
          "balance": 99999.0
        }
      }
    }
  },
  "paths": {
    "/createTask": {
      "post": {
        "tags": ["Core"],
        "summary": "Create a captcha-solving task",
        "description": "Submit a captcha-solving task asynchronously. Returns a `taskId` that you use to poll for results via `getTaskResult`.\n\n### Task Types (19)\n\n| Category | Task Types |\n|----------|-----------|\n| Image text | ImageToTextTask, ImageToTextTaskMuggle, ImageToTextTaskM1 |\n| reCAPTCHA v2 | RecaptchaV2TaskProxyless, RecaptchaV2EnterpriseTaskProxyless, NoCaptchaTaskProxyless |\n| reCAPTCHA v3 | RecaptchaV3TaskProxyless, RecaptchaV3TaskProxylessM1, RecaptchaV3TaskProxylessM1S7, RecaptchaV3TaskProxylessM1S9, RecaptchaV3EnterpriseTask, RecaptchaV3EnterpriseTaskM1 |\n| hCaptcha | HCaptchaTaskProxyless |\n| Turnstile | TurnstileTaskProxyless, TurnstileTaskProxylessM1 |\n| Classification | HCaptchaClassification, ReCaptchaV2Classification, FunCaptchaClassification, AwsClassification |",
        "operationId": "createTask",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/CreateTaskRequest" },
              "examples": {
                "ImageToTextTask": {
                  "summary": "Image text captcha",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "ImageToTextTask",
                      "body": "<base64_encoded_image>"
                    }
                  }
                },
                "ImageToTextTaskMuggle": {
                  "summary": "Muggle-style image captcha",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "ImageToTextTaskMuggle",
                      "body": "<base64_encoded_image>"
                    }
                  }
                },
                "ImageToTextTaskM1": {
                  "summary": "M1 model image captcha",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "ImageToTextTaskM1",
                      "body": "<base64_encoded_image>"
                    }
                  }
                },
                "RecaptchaV2TaskProxyless": {
                  "summary": "reCAPTCHA v2",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV2TaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6Le-wvkSVVABBPB0JGLdnLBwZdMwQXa5JbjJWkA"
                    }
                  }
                },
                "RecaptchaV2EnterpriseTaskProxyless": {
                  "summary": "reCAPTCHA v2 Enterprise",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV2EnterpriseTaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6Le-wvkSVVABBPB0JGLdnLBwZdMwQXa5JbjJWkA"
                    }
                  }
                },
                "NoCaptchaTaskProxyless": {
                  "summary": "Legacy reCAPTCHA v2 (NoCaptcha)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "NoCaptchaTaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6Le-wvkSVVABBPB0JGLdnLBwZdMwQXa5JbjJWkA"
                    }
                  }
                },
                "RecaptchaV3TaskProxyless": {
                  "summary": "reCAPTCHA v3",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3TaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "verify",
                      "minScore": 0.7
                    }
                  }
                },
                "RecaptchaV3TaskProxylessM1": {
                  "summary": "reCAPTCHA v3 (M1 model)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3TaskProxylessM1",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "verify",
                      "minScore": 0.7
                    }
                  }
                },
                "RecaptchaV3TaskProxylessM1S7": {
                  "summary": "reCAPTCHA v3 M1 (score 0.7 preset)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3TaskProxylessM1S7",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "verify"
                    }
                  }
                },
                "RecaptchaV3TaskProxylessM1S9": {
                  "summary": "reCAPTCHA v3 M1 (score 0.9 preset)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3TaskProxylessM1S9",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "verify"
                    }
                  }
                },
                "RecaptchaV3EnterpriseTask": {
                  "summary": "reCAPTCHA v3 Enterprise",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3EnterpriseTask",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "login",
                      "minScore": 0.8
                    }
                  }
                },
                "RecaptchaV3EnterpriseTaskM1": {
                  "summary": "reCAPTCHA v3 Enterprise (M1 model)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "RecaptchaV3EnterpriseTaskM1",
                      "websiteURL": "https://example.com",
                      "websiteKey": "6LcR_ESaAAAAAID9pXbA2qfB7J6pKfRc7wWkA",
                      "pageAction": "login",
                      "minScore": 0.8
                    }
                  }
                },
                "HCaptchaTaskProxyless": {
                  "summary": "hCaptcha",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "HCaptchaTaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6b2"
                    }
                  }
                },
                "TurnstileTaskProxyless": {
                  "summary": "Cloudflare Turnstile",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "TurnstileTaskProxyless",
                      "websiteURL": "https://example.com",
                      "websiteKey": "0x4AAAAAAAAjq_YWYLto0kF"
                    }
                  }
                },
                "TurnstileTaskProxylessM1": {
                  "summary": "Cloudflare Turnstile (M1 model)",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "TurnstileTaskProxylessM1",
                      "websiteURL": "https://example.com",
                      "websiteKey": "0x4AAAAAAAAjq_YWYLto0kF"
                    }
                  }
                },
                "HCaptchaClassification": {
                  "summary": "hCaptcha image classification",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "HCaptchaClassification",
                      "queries": ["<BASE64_IMAGE_1>", "<BASE64_IMAGE_2>"],
                      "question": "Please click each image containing a dog"
                    }
                  }
                },
                "ReCaptchaV2Classification": {
                  "summary": "reCAPTCHA v2 image classification",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "ReCaptchaV2Classification",
                      "image": "<base64_encoded_image>",
                      "question": "fire hydrant"
                    }
                  }
                },
                "FunCaptchaClassification": {
                  "summary": "FunCaptcha image classification",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "FunCaptchaClassification",
                      "image": "<base64_encoded_image>",
                      "question": "Please rotate the image"
                    }
                  }
                },
                "AwsClassification": {
                  "summary": "AWS WAF captcha classification",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "task": {
                      "type": "AwsClassification",
                      "image": "<base64_encoded_image>",
                      "question": "Please select all images with a truck"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task created successfully or error response.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CreateTaskResponse" },
                "examples": {
                  "Success": { "$ref": "#/components/examples/TaskCreated" },
                  "Error": {
                    "summary": "Invalid client key",
                    "value": {
                      "errorId": 1,
                      "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
                      "errorDescription": "Invalid client key"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/getTaskResult": {
      "post": {
        "tags": ["Core"],
        "summary": "Poll for task result",
        "description": "Poll for the result of a task created via `createTask`. The response `status` will be `processing`, `ready`, or `failed`.\n\n**Recommended polling interval**: 5 seconds\n**Recommended max wait**: 180 seconds\n\n### Solution fields by task type:\n- reCAPTCHA v2/v3, hCaptcha → `solution.gRecaptchaResponse` (token string)\n- Turnstile → `solution.token` (token string)\n- ImageToText → `solution.text` (JSON string with captcha_type, clicks/coordinates)\n- Classification → `solution.objects` (list of indices) or `solution.answer` (bool/list)",
        "operationId": "getTaskResult",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/GetTaskResultRequest" },
              "examples": {
                "PollTask": {
                  "summary": "Poll for task result",
                  "value": {
                    "clientKey": "captcha_solver_key_2026",
                    "taskId": "550e8400-e29b-41d4-a716-446655440000"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task result.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/GetTaskResultResponse" },
                "examples": {
                  "Processing": { "$ref": "#/components/examples/TaskProcessing" },
                  "ReadyToken": { "$ref": "#/components/examples/TaskReadyToken" },
                  "ReadyTurnstile": { "$ref": "#/components/examples/TaskReadyTurnstileToken" },
                  "ReadyText": { "$ref": "#/components/examples/TaskReadyText" },
                  "ReadyClassification": { "$ref": "#/components/examples/TaskReadyClassification" },
                  "Failed": { "$ref": "#/components/examples/TaskFailed" }
                }
              }
            }
          }
        }
      }
    },
    "/getBalance": {
      "post": {
        "tags": ["Core"],
        "summary": "Check account balance",
        "description": "Returns the current account balance. For this service, the balance is 99999.0.",
        "operationId": "getBalance",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/ClientKey" },
              "examples": {
                "CheckBalance": {
                  "summary": "Check balance",
                  "value": {
                    "clientKey": "captcha_solver_key_2026"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Balance response.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/GetBalanceResponse" },
                "examples": {
                  "Success": { "$ref": "#/components/examples/BalanceResponse" }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": ["Health"],
        "summary": "Health check",
        "description": "Check service health and retrieve the list of all supported task types. This endpoint does not require authentication.",
        "operationId": "healthCheck",
        "responses": {
          "200": {
            "description": "Service is healthy.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/HealthResponse" },
                "examples": {
                  "Healthy": {
                    "summary": "Health check response",
                    "value": {
                      "status": "healthy",
                      "supported_types": [
                        "ImageToTextTask",
                        "ImageToTextTaskMuggle",
                        "ImageToTextTaskM1",
                        "RecaptchaV2TaskProxyless",
                        "RecaptchaV2EnterpriseTaskProxyless",
                        "NoCaptchaTaskProxyless",
                        "RecaptchaV3TaskProxyless",
                        "RecaptchaV3TaskProxylessM1",
                        "RecaptchaV3TaskProxylessM1S7",
                        "RecaptchaV3TaskProxylessM1S9",
                        "RecaptchaV3EnterpriseTask",
                        "RecaptchaV3EnterpriseTaskM1",
                        "HCaptchaTaskProxyless",
                        "TurnstileTaskProxyless",
                        "TurnstileTaskProxylessM1",
                        "HCaptchaClassification",
                        "ReCaptchaV2Classification",
                        "FunCaptchaClassification",
                        "AwsClassification"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "tags": ["Health"],
        "summary": "Service info",
        "description": "Get general service information including name, version, and available endpoints. This endpoint does not require authentication.",
        "operationId": "serviceInfo",
        "responses": {
          "200": {
            "description": "Service information.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/ServiceInfoResponse" },
                "examples": {
                  "ServiceInfo": {
                    "summary": "Service information",
                    "value": {
                      "name": "CaptchaFlow API",
                      "version": "1.0.0",
                      "description": "Universal AI-Powered Captcha Solving API",
                      "protocol": "Universal captcha protocol",
                      "task_types": 19,
                      "endpoints": [
                        "/createTask",
                        "/getTaskResult",
                        "/getBalance",
                        "/api/v1/health"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}