Skip to content

Temu CAPTCHA

One integration path for the challenge mode in front of you. Identify swap, slide, or click before collecting images. The required companion image or instruction and the returned answer depend on that mode.

POST /createTask · example
{
  "clientKey": "capzy_YOUR_API_KEY",
  "task": {
    "type": "TemuCaptchaTaskProxyLess",
    "challengeType": "swap",
    "image": "<base64 scrambled image>",
    "refImage": "<base64 reference image, when available>"
  }
}

Illustrative values. Replace the inputs with values from your current integration.

Challenge images + mode + questionProxyless or your own proxyClick targets or slider distance

Match the mode to its images.

Identify swap, slide, or click before collecting images. The required companion image or instruction and the returned answer depend on that mode.

Your API key authenticates Capzy.
Provider keys, challenge IDs, images, and session values belong inside task.

Keep the background and companion data together.

  1. Read the current challenge type from its response/UI and select the matching request variant.
  2. Save the original image. Slide also uses pieceImage; swap optionally uses refImage; click requires the displayed question.
  3. Base64-encode each image into its matching field while preserving dimensions and piece transparency.
Input collection example - replace illustrative values
import base64
from pathlib import Path

def image_bytes(filename):
    return base64.b64encode(Path(filename).read_bytes()).decode("ascii")

task_inputs = {
    "challengeType": "slide",
    "image": image_bytes("background.png"),
    "pieceImage": image_bytes("piece.png")
}

The slide example is one mode. Use the variant that matches your current challenge rather than always sending a piece image.

How Temu CAPTCHA works

Temu's captcha has three shapes: a swap puzzle (rearrange tiles into the correct image), a slide puzzle (drag a piece to fill a gap), and a semantic click ('click the smaller green cylinders'). It's a custom in-page challenge, not GeeTest.

Image-in / answer-out: send the challenge image(s) (and, for click challenges, the instruction text) and we return click coordinates or a slide distance. Your automation performs the move in its own session, so no proxy or token binding is involved.

  • Handles swap, slide, and click variants
  • Image-in / answer-out — you apply the move in your own session
  • Auto-detects the variant from the images
  • No proxy required — stateless image solve

Know what goes in.

Choose a field to see its purpose, where to get it, and its place in the request. Optional values omitted from the example can be added when your flow uses them.

Send the scrambled image. Include refImage when available; without it the solver uses edge matching. Drag the first returned coordinate to the second in the same puzzle session.

Request authentication

Required task inputs

Optional context

type

stringRequired

The exact API identifier for the selected task variant and network mode.

Where it comes from

Choose the task/network or request variant on this page. The integration examples update this exact API task identifier.

Open the input guide
Example valueTemuCaptchaTaskProxyLess
POST /createTask · selected configuration
{
  "clientKey": "capzy_YOUR_API_KEY",
  "task": {
    "type": "TemuCaptchaTaskProxyLess",
    "challengeType": "swap",
    "image": "<base64 scrambled image>",
    "refImage": "<base64 reference image, when available>"
  }
}

The selected field is highlighted when present. Preserve the declared value type and current challenge context.

Make your first request.

Create the task, keep its taskId, and poll until status is ready. Then read the selected variant's solution.

More examples
  1. Create the task

    Send clientKey and the selected task to /createTask from your server. Keep the returned taskId.

  2. Wait for the solution

    Send that same key and ID to /getTaskResult. While processing, wait two seconds before checking again. Stop on Ready or an error.

  3. Apply the result

    Use the selected mode's output: slideDistance/slideProportion for sliding or coordinates/clickTargets for click tasks. Apply any swap answer using that puzzle's verification contract, preserving image geometry and session context.

solve_temu.py
import json, os, time
import requests

API = "https://api.capzy.ai"
KEY = os.environ["CAPZY_API_KEY"]
task = json.loads("{\"type\":\"TemuCaptchaTaskProxyLess\",\"challengeType\":\"swap\",\"image\":\"<base64 scrambled image>\",\"refImage\":\"<base64 reference image, when available>\"}")

def call(path, payload):
    response = requests.post(f"{API}/{path}", json={"clientKey": KEY, **payload}, timeout=30)
    response.raise_for_status()
    data = response.json()
    if data.get("errorId", 0) or data.get("status") == "failed":
        raise RuntimeError(data.get("errorDescription") or data.get("errorCode") or "Task failed")
    return data

created = call("createTask", {"task": task})
for attempt in range(60):
    result = call("getTaskResult", {"taskId": created["taskId"]})
    if result.get("status") == "ready":
        solution = result["solution"]
        print(solution)
        break
    time.sleep(2)
else:
    raise TimeoutError("Task is still processing; keep the taskId to check it later.")

Before runningReplace all illustrative inputs with your captured values. Set CAPZY_API_KEY in your environment. Install requests with pip install requests.

Polling and failuresThe example checks HTTP/API failures, uses 30-second request timeouts, and stops after 60 result checks. Retain taskId if your task is still processing.

Understand what comes back.

Follow this task from creation to completion. Response fields and usage follow your selected request variant.

Click targets or slider distance

Use the selected mode's output: slideDistance/slideProportion for sliding or coordinates/clickTargets for click tasks. Apply any swap answer using that puzzle's verification contract, preserving image geometry and session context.

array
Swap/click — points to click/swap as [{x, y}] in image pixels, in order
POST /getTaskResult · example response
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "coordinates": [
      {
        "x": 80,
        "y": 60
      },
      {
        "x": 240,
        "y": 180
      }
    ]
  }
}

Illustrative values. Additional metadata may be returned; only Ready contains a completed solution.

Swap the returned tile pair

Drag the tile at coordinates[0] to coordinates[1] in this same puzzle. Coordinates use original image pixels unless puzzleWidth scales X. Replace the selector and keep the current challenge/session for verification; refImage is optional.

Execution context Install Playwright (pip install playwright) and its browser (playwright install chromium). page is your existing synchronous Python Playwright Page showing this same challenge. result is the parsed Ready response; task is the task you submitted. Replace image and slider selectors with this widget's actual elements. The snippets account for displayed size and viewport position; keep the image unobscured and unrotated.

Use the result · Python · Playwright
sol = result["solution"]
image = page.locator("img[data-captcha-image]")  # Replace with the puzzle image.
image.scroll_into_view_if_needed()
rect = image.bounding_box()
size = image.evaluate("img => ({width: img.naturalWidth, height: img.naturalHeight})")
if not rect or not size["width"] or not size["height"]:
    raise RuntimeError("Puzzle image is not ready")
width = task.get("puzzleWidth") or size["width"]
points = [(rect["x"] + p["x"] / width * rect["width"],
           rect["y"] + p["y"] / size["height"] * rect["height"]) for p in sol["coordinates"]]
start, end = points
page.mouse.move(*start)
page.mouse.down()
page.mouse.move(*end, steps=20)
page.mouse.up()

When something doesn't work.

Check your captured values, the selected variant, and the response before starting another task.

How do I apply the answer?

Swap/click: click each point in coordinates (in order). Slide: drag the piece by slideDistance pixels (or slideProportion × your track width). You perform the move in your own session.

Which variant is this?

A 2×3 grid to rearrange = swap. A background with a cut-out gap + a piece = slide. A scene with an instruction to click objects = click. Omit challengeType and we detect it from the images.

Connect Temu CAPTCHA to your workflow.

Get your Capzy API key and use this guide's integration.

$1.45Per 1,000 solves
30.3sAverage solve time

TemuCaptchaTaskProxyLess · Live configuration