> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omocaptcha.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FuncaptchaImageTask

> Solve FunCaptcha (Arkose Labs) image challenges

FunCaptcha is a widely-used image-based captcha.

<Columns cols={3}>
  <Frame caption="Use the arrows to pick the image where all the darts add up to the number in the left image">
    <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/funcaptcha-darts.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=c23a3addf1eff8e5c9abec3ebcb0a35c" alt="FunCaptcha darts challenge" width="304" height="404" data-path="images/funcaptcha-darts.png" />
  </Frame>

  <Frame caption="Use the arrows to rotate the object to face in the direction of the hand">
    <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/funcaptcha-rotate.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=3b6395b6a057132472b475c82221df12" alt="FunCaptcha rotate object challenge" width="305" height="404" data-path="images/funcaptcha-rotate.png" />
  </Frame>

  <Frame caption="Pick the image that is the correct way up">
    <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/funcaptcha-orientation.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=e4295df1f84488a61d8bca8da18dba9a" alt="FunCaptcha orientation challenge" width="323" height="314" data-path="images/funcaptcha-orientation.png" />
  </Frame>
</Columns>

## 1. Create task

### Request

```http theme={null}
POST https://api.omocaptcha.com/v2/createTask
Content-Type: application/json
```

#### Body Parameters

| Parameter          | Type     | Required | Description                                        |
| ------------------ | -------- | :------: | -------------------------------------------------- |
| `clientKey`        | `String` |     ✅    | Your account API key                               |
| `task.type`        | `String` |     ✅    | Captcha service class name (`FuncaptchaImageTask`) |
| `task.imageBase64` | `String` |     ✅    | Base64-encoded captcha image (not a screenshot)    |
| `task.other`       | `String` |     ✅    | The captcha question text                          |

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.omocaptcha.com/v2/createTask \
    -H "Content-Type: application/json" \
    -d '{
      "clientKey": "OMO_API_KEY",
      "task": {
        "type": "FuncaptchaImageTask",
        "imageBase64": "BASE64_BODY_HERE",
        "other": "Use the arrows to pick the image where all the darts add up to the number in the left image"
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.omocaptcha.com/v2/createTask", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      clientKey: "OMO_API_KEY",
      task: {
        type: "FuncaptchaImageTask",
        imageBase64: "BASE64_BODY_HERE",
        other: "Use the arrows to pick the image where all the darts add up to the number in the left image"
      }
    })
  });
  console.log(await res.json());
  ```

  ```python Python theme={null}
  import requests

  res = requests.post(
      "https://api.omocaptcha.com/v2/createTask",
      json={
          "clientKey": "OMO_API_KEY",
          "task": {
              "type": "FuncaptchaImageTask",
              "imageBase64": "BASE64_BODY_HERE",
              "other": "Use the arrows to pick the image where all the darts add up to the number in the left image"
          }
      }
  )
  print(res.json())
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.omocaptcha.com/v2/createTask");
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
      "clientKey" => "OMO_API_KEY",
      "task" => [
          "type" => "FuncaptchaImageTask",
          "imageBase64" => "BASE64_BODY_HERE",
          "other" => "Use the arrows to pick the image where all the darts add up to the number in the left image"
      ]
  ]));
  echo curl_exec($ch);
  ```
</CodeGroup>

### Response

<CodeGroup>
  ```json Success theme={null}
  {
    "errorId": 0,
    "taskId": "49f9f60a-c809-4af0-93c0-0409b72e67e0"
  }
  ```

  ```json Failure theme={null}
  {
    "errorId": 1,
    "errorCode": "",
    "errorDescription": ""
  }
  ```
</CodeGroup>

* `errorId = 0` with `taskId` → success
* `errorId = 1` with `errorCode` → failure (see [Error Codes](/en/api/error-codes))

## 2. Get task result

### Request

```http theme={null}
POST https://api.omocaptcha.com/v2/getTaskResult
Content-Type: application/json
```

```json theme={null}
{
  "clientKey": "OMO_API_KEY",
  "taskId": "49f9f60a-c809-4af0-93c0-0409b72e67e0"
}
```

### Response

<CodeGroup>
  ```json Success theme={null}
  {
    "errorId": 0,
    "status": "ready",
    "solution": {
      "index": 1
    }
  }
  ```

  ```json Processing theme={null}
  {
    "status": "processing",
    "errorId": 0,
    "errorCode": "",
    "errorDescription": ""
  }
  ```

  ```json Failure theme={null}
  {
    "errorId": 1,
    "errorCode": "ERROR_JOB_STATUS",
    "errorDescription": "Job failed",
    "status": "fail",
    "solution": {}
  }
  ```
</CodeGroup>

* `errorId = 0` with `status = "ready"` → read the answer from `solution.index`.
* `errorId = 0` with `status = "processing"` → job is still running, wait **2 seconds** and retry.
* `errorId = 1` → failure (see [Error Codes](/en/api/error-codes)).

<Warning>
  The server returns the **position of the correct image** in the sequence. When clicking the right-arrow button on the page, you must **subtract 1** because the captcha image occupies the first position.

  Example: server returns `index = 5` → click the right arrow **4 times**.
</Warning>
