{
  "openapi": "3.1.0",
  "info": {
    "title": "NeuroCaptcha API",
    "version": "1.0.0",
    "summary": "reCAPTCHA solving API, compatible with the Anti-Captcha JSON protocol.",
    "description": "Methods take POST with a JSON body (getQueueStats and getTaskTypes also answer GET) and always answer HTTP 200 with `errorId` (0 = success).\n\nThe API key goes in the `clientKey` field of the body. The 2Captcha protocol (`/in.php`, `/res.php`) is served on the same host; see the documentation.\n\nLimits: 30 createTask/s and 50 getTaskResult/s per key, 200 tasks in progress per key, 1 MiB body. Results are kept for 10 minutes.",
    "contact": {
      "url": "https://neurocaptcha.com/en/docs"
    }
  },
  "externalDocs": {
    "description": "Documentation",
    "url": "https://neurocaptcha.com/en/docs"
  },
  "servers": [
    {
      "url": "https://neurocaptcha.com"
    }
  ],
  "tags": [
    {
      "name": "Tasks",
      "description": "Create tasks and get their results."
    },
    {
      "name": "Account",
      "description": "Balance and spending."
    },
    {
      "name": "Catalog",
      "description": "Task types, prices and queue load (no key needed)."
    },
    {
      "name": "Reports",
      "description": "Token feedback and refunds."
    }
  ],
  "paths": {
    "/createTask": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "createTask",
        "summary": "Create a task",
        "description": "Holds the task price and returns `taskId` at once. The money is charged only when the task is solved.",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/create-task"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskRequest"
              },
              "example": {
                "clientKey": "0123456789abcdef0123456789abcdef",
                "task": {
                  "type": "RecaptchaV2TaskProxyless",
                  "websiteURL": "https://www.google.com/recaptcha/api2/demo",
                  "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Task created. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CreateTaskResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "example": {
                  "errorId": 0,
                  "taskId": 7781
                }
              }
            }
          }
        },
        "callbacks": {
          "taskFinished": {
            "{$request.body#/callbackUrl}": {
              "post": {
                "summary": "Signed webhook when the task is finished",
                "parameters": [
                  {
                    "name": "X-Signature",
                    "in": "header",
                    "required": true,
                    "schema": {
                      "type": "string"
                    },
                    "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>"
                  },
                  {
                    "name": "X-Task-Id",
                    "in": "header",
                    "required": true,
                    "schema": {
                      "type": "string"
                    }
                  }
                ],
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/WebhookPayload"
                      }
                    }
                  }
                },
                "responses": {
                  "2XX": {
                    "description": "Delivered. Up to 3 attempts (at once, after 2 s, after 6 s more)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/getTaskResult": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "operationId": "getTaskResult",
        "summary": "Get the task status and solution",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-task-result"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetTaskResultRequest"
              },
              "example": {
                "clientKey": "0123456789abcdef0123456789abcdef",
                "taskId": 7781
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "`processing` or `ready` with the solution; a failed task answers with its error code. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/TaskProcessing"
                        },
                        {
                          "$ref": "#/components/schemas/TaskReady"
                        }
                      ]
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/getBalance": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "getBalance",
        "summary": "Balance available for new tasks",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-balance"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyRequest"
              },
              "example": {
                "clientKey": "0123456789abcdef0123456789abcdef"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Balance in USD; held amounts are excluded. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BalanceResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "example": {
                  "errorId": 0,
                  "balance": 12.3456
                }
              }
            }
          }
        }
      }
    },
    "/getQueueStats": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getQueueStatsGet",
        "summary": "Queue load (GET)",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-queue-stats"
        },
        "parameters": [
          {
            "name": "queueId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/QueueId"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Queue load. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/QueueStatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getQueueStats",
        "summary": "Queue load",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-queue-stats"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "queueId": {
                    "$ref": "#/components/schemas/QueueId"
                  }
                }
              },
              "example": {
                "queueId": 6
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Queue load. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/QueueStatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/getSpendingStats": {
      "post": {
        "tags": [
          "Account"
        ],
        "operationId": "getSpendingStats",
        "summary": "Spending by hour or by minute",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-spending-stats"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpendingStatsRequest"
              },
              "example": {
                "clientKey": "0123456789abcdef0123456789abcdef",
                "scope": "day"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "24 hourly (`day`) or 60 one-minute (`hour`) buckets. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SpendingStatsResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/getTaskTypes": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getTaskTypesGet",
        "summary": "Task types and prices (GET)",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-task-types"
        },
        "responses": {
          "200": {
            "description": "Catalog. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TaskTypesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getTaskTypes",
        "summary": "Task types and prices",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/get-task-types"
        },
        "responses": {
          "200": {
            "description": "Catalog. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TaskTypesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/getPrices": {
      "post": {
        "tags": [
          "Catalog"
        ],
        "operationId": "getPrices",
        "summary": "Alias of getTaskTypes",
        "responses": {
          "200": {
            "description": "Catalog. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TaskTypesResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/reportIncorrectRecaptcha": {
      "post": {
        "tags": [
          "Reports"
        ],
        "operationId": "reportIncorrectRecaptcha",
        "summary": "Report a token the site rejected (refund)",
        "description": "Refunded automatically within 24 h after solving while the key's share of refunds stays within 15%.",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/report"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              },
              "example": {
                "clientKey": "0123456789abcdef0123456789abcdef",
                "taskId": 7781
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ReportResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "example": {
                  "errorId": 0,
                  "status": "success"
                }
              }
            }
          }
        }
      }
    },
    "/reportCorrectRecaptcha": {
      "post": {
        "tags": [
          "Reports"
        ],
        "operationId": "reportCorrectRecaptcha",
        "summary": "Report a token that worked",
        "externalDocs": {
          "url": "https://neurocaptcha.com/en/docs/methods/report"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded. Errors are also HTTP 200 with errorId > 0.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ReportResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "example": {
                  "errorId": 0,
                  "status": "success"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ClientKey": {
        "type": "string",
        "minLength": 8,
        "maxLength": 128,
        "description": "API key (32 lowercase hex characters).",
        "examples": [
          "0123456789abcdef0123456789abcdef"
        ]
      },
      "TaskId": {
        "type": "integer",
        "format": "int64",
        "minimum": 1,
        "description": "Task id from createTask. A number, not a string."
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "ERROR_KEY_DOES_NOT_EXIST",
          "ERROR_NO_SLOT_AVAILABLE",
          "ERROR_ZERO_BALANCE",
          "ERROR_IP_NOT_ALLOWED",
          "ERROR_CAPTCHA_UNSOLVABLE",
          "ERROR_NO_SUCH_METHOD",
          "ERROR_NO_SUCH_CAPCHA_ID",
          "ERROR_IP_BLOCKED",
          "ERROR_TASK_ABSENT",
          "ERROR_TASK_NOT_SUPPORTED",
          "ERROR_PROXY_CONNECT_REFUSED",
          "ERROR_PROXY_CONNECT_TIMEOUT",
          "ERROR_PROXY_READ_TIMEOUT",
          "ERROR_PROXY_BANNED",
          "ERROR_RECAPTCHA_TIMEOUT",
          "ERROR_RECAPTCHA_INVALID_SITEKEY",
          "ERROR_RECAPTCHA_INVALID_DOMAIN",
          "ERROR_RECAPTCHA_OLD_BROWSER",
          "ERROR_PROXY_HAS_NO_IMAGE_SUPPORT",
          "ERROR_PROXY_NOT_AUTHORISED",
          "ERROR_VISIBLE_RECAPTCHA",
          "ERROR_ACCOUNT_SUSPENDED",
          "ERROR_INTERNAL",
          "ERROR_TOO_MUCH_REQUESTS",
          "ERROR_SPENDING_LIMIT"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "errorId",
          "errorCode"
        ],
        "properties": {
          "errorId": {
            "type": "integer",
            "minimum": 1,
            "description": "Anti-Captcha registry ids; 90+ are codes of this service. 1 ERROR_KEY_DOES_NOT_EXIST, 2 ERROR_NO_SLOT_AVAILABLE, 10 ERROR_ZERO_BALANCE, 11 ERROR_IP_NOT_ALLOWED, 12 ERROR_CAPTCHA_UNSOLVABLE, 14 ERROR_NO_SUCH_METHOD, 16 ERROR_NO_SUCH_CAPCHA_ID, 21 ERROR_IP_BLOCKED, 22 ERROR_TASK_ABSENT, 23 ERROR_TASK_NOT_SUPPORTED, 25 ERROR_PROXY_CONNECT_REFUSED, 26 ERROR_PROXY_CONNECT_TIMEOUT, 27 ERROR_PROXY_READ_TIMEOUT, 28 ERROR_PROXY_BANNED, 30 ERROR_RECAPTCHA_TIMEOUT, 31 ERROR_RECAPTCHA_INVALID_SITEKEY, 32 ERROR_RECAPTCHA_INVALID_DOMAIN, 33 ERROR_RECAPTCHA_OLD_BROWSER, 35 ERROR_PROXY_HAS_NO_IMAGE_SUPPORT, 49 ERROR_PROXY_NOT_AUTHORISED, 53 ERROR_VISIBLE_RECAPTCHA, 55 ERROR_ACCOUNT_SUSPENDED, 90 ERROR_INTERNAL, 91 ERROR_TOO_MUCH_REQUESTS, 92 ERROR_SPENDING_LIMIT."
          },
          "errorCode": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "errorDescription": {
            "type": "string",
            "description": "Human-readable text; may change, do not parse it."
          }
        }
      },
      "TaskType": {
        "type": "string",
        "enum": [
          "RecaptchaV2TaskProxyless",
          "NoCaptchaTaskProxyless",
          "RecaptchaV2Task",
          "NoCaptchaTask",
          "RecaptchaV2EnterpriseTaskProxyless",
          "RecaptchaV2EnterpriseTask",
          "RecaptchaV3TaskProxyless",
          "RecaptchaV3EnterpriseTaskProxyless",
          "RecaptchaV3Enterprise",
          "RecaptchaV3EnterpriseTask",
          "RecaptchaV3Task"
        ],
        "description": "Aliases: NoCaptchaTaskProxyless → RecaptchaV2TaskProxyless, NoCaptchaTask → RecaptchaV2Task, RecaptchaV3Enterprise → RecaptchaV3EnterpriseTaskProxyless, RecaptchaV3Task → RecaptchaV3EnterpriseTask."
      },
      "Task": {
        "type": "object",
        "required": [
          "type",
          "websiteURL",
          "websiteKey"
        ],
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TaskType"
          },
          "websiteURL": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "Page where the reCAPTCHA is shown (http/https)."
          },
          "websiteKey": {
            "type": "string",
            "maxLength": 256,
            "pattern": "^\\S+$",
            "description": "Site key (data-sitekey or the k parameter)."
          },
          "isInvisible": {
            "type": "boolean",
            "default": false,
            "description": "Invisible reCAPTCHA v2."
          },
          "recaptchaDataSValue": {
            "type": "string",
            "maxLength": 4096
          },
          "pageAction": {
            "type": "string",
            "maxLength": 128,
            "description": "reCAPTCHA v3 / Enterprise action."
          },
          "minScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Minimum v3 score."
          },
          "enterprisePayload": {
            "type": "object",
            "additionalProperties": true,
            "description": "Extra Enterprise parameters, up to 8 KiB of JSON (`s`, `action`…)."
          },
          "isEnterprise": {
            "type": "boolean",
            "description": "Compatibility flag: a regular reCAPTCHA type becomes its Enterprise twin (Enterprise price)."
          },
          "apiDomain": {
            "type": "string",
            "enum": [
              "www.google.com",
              "www.recaptcha.net"
            ],
            "default": "www.google.com"
          },
          "userAgent": {
            "type": "string",
            "maxLength": 512
          },
          "cookies": {
            "type": "string",
            "maxLength": 8192,
            "description": "name=value; name2=value2"
          },
          "proxyType": {
            "type": "string",
            "enum": [
              "http",
              "https",
              "socks4",
              "socks5"
            ],
            "default": "http"
          },
          "proxyAddress": {
            "type": "string",
            "maxLength": 255,
            "description": "Public IP or host name of your proxy."
          },
          "proxyPort": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "proxyLogin": {
            "type": "string",
            "maxLength": 256
          },
          "proxyPassword": {
            "type": "string",
            "maxLength": 256
          }
        },
        "if": {
          "properties": {
            "type": {
              "enum": [
                "RecaptchaV2Task",
                "NoCaptchaTask",
                "RecaptchaV2EnterpriseTask",
                "RecaptchaV3EnterpriseTask",
                "RecaptchaV3Task"
              ]
            }
          },
          "required": [
            "type"
          ]
        },
        "then": {
          "required": [
            "proxyAddress",
            "proxyPort"
          ]
        }
      },
      "CreateTaskRequest": {
        "type": "object",
        "required": [
          "clientKey",
          "task"
        ],
        "properties": {
          "clientKey": {
            "$ref": "#/components/schemas/ClientKey"
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          },
          "callbackUrl": {
            "type": "string",
            "format": "uri",
            "description": "Public http(s) URL for a signed webhook when the task is finished."
          },
          "softId": {
            "type": "integer",
            "minimum": 0,
            "description": "Developer program application id."
          },
          "languagePool": {
            "type": "string",
            "description": "Accepted for compatibility, ignored."
          }
        }
      },
      "CreateTaskResponse": {
        "type": "object",
        "required": [
          "errorId",
          "taskId"
        ],
        "properties": {
          "errorId": {
            "const": 0
          },
          "taskId": {
            "$ref": "#/components/schemas/TaskId"
          }
        }
      },
      "KeyRequest": {
        "type": "object",
        "required": [
          "clientKey"
        ],
        "properties": {
          "clientKey": {
            "$ref": "#/components/schemas/ClientKey"
          }
        }
      },
      "GetTaskResultRequest": {
        "type": "object",
        "required": [
          "clientKey",
          "taskId"
        ],
        "properties": {
          "clientKey": {
            "$ref": "#/components/schemas/ClientKey"
          },
          "taskId": {
            "$ref": "#/components/schemas/TaskId"
          }
        }
      },
      "Solution": {
        "type": "object",
        "required": [
          "gRecaptchaResponse"
        ],
        "properties": {
          "gRecaptchaResponse": {
            "type": "string",
            "description": "The token."
          },
          "userAgent": {
            "type": "string",
            "description": "userAgent of the task (empty if none was passed)."
          },
          "cookies": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "TaskProcessing": {
        "type": "object",
        "required": [
          "errorId",
          "status"
        ],
        "properties": {
          "errorId": {
            "const": 0
          },
          "status": {
            "const": "processing"
          }
        }
      },
      "TaskReady": {
        "type": "object",
        "required": [
          "errorId",
          "status",
          "solution"
        ],
        "properties": {
          "errorId": {
            "const": 0
          },
          "status": {
            "const": "ready"
          },
          "solution": {
            "$ref": "#/components/schemas/Solution"
          },
          "cost": {
            "type": "string",
            "description": "Charged USD, 6 decimals.",
            "examples": [
              "0.000600"
            ]
          },
          "ip": {
            "type": "string",
            "description": "IP the task was created from."
          },
          "createTime": {
            "type": "integer",
            "description": "Unix time."
          },
          "endTime": {
            "type": "integer",
            "description": "Unix time."
          },
          "solveCount": {
            "type": "integer"
          }
        }
      },
      "BalanceResponse": {
        "type": "object",
        "required": [
          "errorId"
        ],
        "properties": {
          "errorId": {
            "const": 0
          },
          "balance": {
            "type": "number",
            "description": "USD, always present (0 included). Held amounts are excluded."
          }
        }
      },
      "QueueId": {
        "type": "integer",
        "description": "5 — reCAPTCHA v2 with proxy; 6 — v2 proxyless; 18, 19, 20 — v3. Missing or unknown — all types.",
        "examples": [
          6
        ]
      },
      "QueueStatsResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "const": 0
          },
          "waiting": {
            "type": "integer",
            "description": "Tasks waiting in the queue."
          },
          "load": {
            "type": "number",
            "description": "Busy workers, percent."
          },
          "bid": {
            "type": "number",
            "description": "Lowest price per 1000 tasks, USD."
          },
          "speed": {
            "type": "number",
            "description": "Average solving time over 10 minutes, seconds."
          },
          "total": {
            "type": "integer",
            "description": "Workers online."
          },
          "minCost": {
            "type": "string",
            "description": "Lowest price per 1000 tasks, USD."
          },
          "maxCost": {
            "type": "string",
            "description": "Highest price per 1000 tasks, USD."
          },
          "avgSolutionTime": {
            "type": "integer",
            "description": "Average solving time, whole seconds."
          }
        }
      },
      "SpendingStatsRequest": {
        "type": "object",
        "required": [
          "clientKey"
        ],
        "properties": {
          "clientKey": {
            "$ref": "#/components/schemas/ClientKey"
          },
          "date": {
            "type": "integer",
            "description": "Start of the period, Unix time. Default: start of the current UTC day (or hour)."
          },
          "scope": {
            "type": "string",
            "enum": [
              "day",
              "hour"
            ],
            "default": "day"
          },
          "softId": {
            "type": "integer",
            "description": "Only tasks with this softId."
          }
        }
      },
      "SpendingStatsResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "const": 0
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "dateFrom": {
                  "type": "integer"
                },
                "dateTill": {
                  "type": "integer"
                },
                "volume": {
                  "type": "integer"
                },
                "money": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "TaskTypesResponse": {
        "type": "object",
        "properties": {
          "errorId": {
            "const": 0
          },
          "types": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "pricePer1000": {
                  "type": "string",
                  "description": "USD per 1000 solved tasks, before volume discounts."
                },
                "needsProxy": {
                  "type": "boolean"
                },
                "enabled": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "ReportRequest": {
        "type": "object",
        "required": [
          "clientKey",
          "taskId"
        ],
        "properties": {
          "clientKey": {
            "$ref": "#/components/schemas/ClientKey"
          },
          "taskId": {
            "$ref": "#/components/schemas/TaskId"
          }
        }
      },
      "ReportResponse": {
        "type": "object",
        "required": [
          "errorId",
          "status"
        ],
        "properties": {
          "errorId": {
            "const": 0
          },
          "status": {
            "const": "success"
          }
        }
      },
      "WebhookPayload": {
        "description": "The getTaskResult answer plus taskId (without ip).",
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaskReady"
              },
              {
                "type": "object",
                "required": [
                  "taskId"
                ],
                "properties": {
                  "taskId": {
                    "$ref": "#/components/schemas/TaskId"
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/ErrorResponse"
              },
              {
                "type": "object",
                "required": [
                  "taskId"
                ],
                "properties": {
                  "taskId": {
                    "$ref": "#/components/schemas/TaskId"
                  }
                }
              }
            ]
          }
        ]
      }
    }
  }
}