Quickstart

Get started with the VastCap API in just a few steps. This guide will help you make your first captcha-solving request.

Prerequisites

Before you begin, you’ll need:

  • A VastCap account (create one at captcha.vast.sh)
  • An API key from your dashboard
  • Basic knowledge of HTTP requests

Step 1: Get Your API Key

  1. Log in to your VastCap Dashboard
  2. Navigate to “API Keys” section
  3. Copy your API key

Step 2: Check Your Balance

Before making captcha-solving requests, make sure your account has sufficient balance:

curl -X POST https://captcha.vast.sh/api/solver/getBalance \
  -H "Content-Type: application/json" \
  -d '{"clientKey": "YOUR_API_KEY"}'

Step 3: Create a Captcha Solving Task

Here’s an example of solving hCaptcha

Both standard and enterprise hCaptcha are solved using HCaptchaTask. For enterprise sites (Discord, Epic Games, TikTok, etc), set the enterprise parameter to true:

curl -X POST https://captcha.vast.sh/api/solver/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "HCaptchaTask",
      "websiteURL": "https://discord.com/register",
      "websiteKey": "a9b5fb07-92ff-493f-86fe-352a2803b3df",
      "proxy": "user:pass@ip:port",
      "enterprise": true,
      "invisible": true
    }
  }'

Step 4: Get the Task Result

Use the taskId from the previous step to check if the captcha has been solved:

curl -X POST https://captcha.vast.sh/api/solver/getTaskResult \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "taskId": "TASK_ID_FROM_PREVIOUS_STEP"
  }'

The response will include the solution when it’s ready.

Code Examples

Python

import requests
import time

API_KEY = "YOUR_API_KEY"
API_URL = "https://captcha.vast.sh/api/solver"

# Create a new task
task_data = {
    "clientKey": API_KEY,
    "task": {
        "type": "RecaptchaV2Task",
        "websiteURL": "https://example.com/recaptcha",
        "websiteKey": "6LcR_TAUAAAAAMtflUgIXnBu1ldPGo8YlHXKA0fy"
    }
}

response = requests.post(f"{API_URL}/createTask", json=task_data)
task_id = response.json()["taskId"]

# Wait for the result
while True:
    result_data = {
        "clientKey": API_KEY,
        "taskId": task_id
    }
    response = requests.post(f"{API_URL}/getTaskResult", json=result_data)
    result = response.json()
    
    if result.get("status") == "ready":
        print(f"Captcha solved: {result.get('solution', {}).get('gRecaptchaResponse')}")
        break
    
    print("Waiting for solution...")
    time.sleep(3)

Next Steps

Now that you’ve made your first captcha-solving request, you can explore more advanced options in our API Reference: