Skip to main content

Create a Task

curl -X POST https://api.funbypass.com/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "FUN-your-api-key",
    "task": {
      "type": "FunCaptchaTask",
      "websiteURL": "https://example.com",
      "websitePublicKey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "websiteSubdomain": "client-api",
      "proxy": "http://user:[email protected]:8080"
    }
  }'
Response:
{
  "errorId": 0,
  "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "created"
}

Get Task Result

Replace TASK_ID with the task ID from the previous response:
curl https://api.funbypass.com/getTaskResult/TASK_ID
Response (processing):
{
  "errorId": 0,
  "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "processing"
}
Response (solved):
{
  "errorId": 0,
  "solution": {
    "token": "282d9a2536f.d..."
  },
  "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "ready"
}

Check Balance

curl -X POST https://api.funbypass.com/getBalance \
  -H "Content-Type: application/json" \
  -d '{"clientKey": "FUN-your-api-key"}'
Response:
{
  "errorId": 0,
  "balance": 12.50
}

With Custom Headers

curl -X POST https://api.funbypass.com/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "FUN-your-api-key",
    "task": {
      "type": "FunCaptchaTask",
      "websiteURL": "https://example.com",
      "websitePublicKey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "websiteSubdomain": "client-api",
      "proxy": "http://user:[email protected]:8080",
      "enablePOW": true,
      "headers": {
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
        "sec-ch-ua": "\"Chromium\";v=\"124\", \"Google Chrome\";v=\"124\"",
        "sec-ch-ua-platform": "\"Windows\"",
        "sec-ch-ua-mobile": "?0",
        "accept-language": "en-US,en;q=0.9"
      }
    }
  }'

With Extra Data (Blob)

curl -X POST https://api.funbypass.com/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "FUN-your-api-key",
    "task": {
      "type": "FunCaptchaTask",
      "websiteURL": "https://example.com",
      "websitePublicKey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "websiteSubdomain": "client-api",
      "proxy": "http://user:[email protected]:8080",
      "data": "{\"blob\": \"your-blob-value-here\"}"
    }
  }'

Shell Script: Create + Poll

A complete bash script that creates a task and polls for the result:
#!/bin/bash

API_KEY="FUN-your-api-key"
BASE_URL="https://api.funbypass.com"

# Create task
RESPONSE=$(curl -s -X POST "$BASE_URL/createTask" \
  -H "Content-Type: application/json" \
  -d "{
    \"clientKey\": \"$API_KEY\",
    \"task\": {
      \"type\": \"FunCaptchaTask\",
      \"websiteURL\": \"https://example.com\",
      \"websitePublicKey\": \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\",
      \"websiteSubdomain\": \"client-api\",
      \"proxy\": \"http://user:[email protected]:8080\"
    }
  }")

TASK_ID=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin)['taskId'])")
echo "Task created: $TASK_ID"

# Poll for result
for i in $(seq 1 600); do
  RESULT=$(curl -s "$BASE_URL/getTaskResult/$TASK_ID")
  STATUS=$(echo "$RESULT" | python3 -c "import sys,json; print(json.load(sys.stdin)['status'])")

  if [ "$STATUS" = "ready" ]; then
    TOKEN=$(echo "$RESULT" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('solution',{}).get('token','ERROR'))")
    echo "Token: $TOKEN"
    exit 0
  fi

  echo "Status: $STATUS (attempt $i)"
  sleep 0.5
done

echo "Timeout: task did not complete"
exit 1