Skip to main content
Skip to main content
Guide
5 min read

Getting Started

Go from zero to solving Turnstile captchas in under 5 minutes. Follow these steps to start integrating the CapSolution API.

1

Create an Account

Visit the registration page to create your free account. Every new account comes with 50 free credits to test the API.

Create Free Account
2

Get Your API Key

Navigate to the API Keys page in your dashboard and click "Create New Key". Give it a descriptive name and copy the key.

Important: The full API key is only shown once. Store it securely -- you cannot retrieve it later.
Example API Key
cap_abcdefghijklmnopqrstuvwxyz123456
3

Install the SDK (Optional)

The CapSolution API uses standard HTTP requests -- no SDK is required. However, you can use any HTTP library in your language of choice.

npm install node-fetch  # Only needed for Node.js < 18
4

Create Your First Task

Submit a solving task with the target website URL and its Turnstile site key. The API returns a taskId that you will use to retrieve the result.

const response = await fetch('https://capsolution.xyz/api/solver/createTask', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    clientKey: 'cap_YOUR_API_KEY',
    task: {
      type: 'TurnstileTask',
      websiteURL: 'https://example.com/login',
      websiteKey: '0x4AAAAAAA...'
    }
  })
});

const { taskId, errorId } = await response.json();
console.log('Task created:', taskId);
Response:
{
  "errorId": 0,
  "taskId": "task_abc123def456"
}
5

Get the Result

Poll the getTaskResult endpoint every 2-3 seconds until the status is "ready". The average solve time is approximately 2.3 seconds.

// Poll for the result
async function getResult(taskId) {
  while (true) {
    await new Promise(r => setTimeout(r, 2000)); // Wait 2 seconds

    const response = await fetch('https://capsolution.xyz/api/solver/getTaskResult', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        clientKey: 'cap_YOUR_API_KEY',
        taskId: taskId
      })
    });

    const result = await response.json();

    if (result.status === 'ready') {
      console.log('Solved! Token:', result.solution.token);
      return result.solution.token;
    }

    if (result.status === 'failed') {
      throw new Error('Task failed');
    }

    console.log('Still processing...');
  }
}

// Usage
const token = await getResult('task_abc123def456');