API Endpoints

Complete reference for all available API endpoints.

Base URL

text
https://captchakings.com/api/

POST /process.php

Process and solve a CAPTCHA image.

Request

Parameter Type Required Description
captcha File ✅ Yes CAPTCHA image file (JPG, PNG, GIF, max 5MB)
api_key String ⚠️ Optional API key (if not in header)

Headers

Header Value Required
Authorization Bearer {api_key} ✅ Recommended
X-API-Key {api_key} ⚠️ Alternative
Content-Type multipart/form-data ✅ Auto

Response (Success)

json
{
  "success": true,
  "data": {
    "type": "text",
    "prediction": "GXL4",
    "confidence": "89.79%",
    "type_confidence": "100.00%",
    "process_time": 1.4,
    "timestamp": "2025-11-05 23:54:50"
  },
  "credits": {
    "credits_deducted": 1,
    "credits_remaining": 998,
    "plan": "free_trial"
  },
  "processing_time": "1.4s",
  "mode": "api_key",
  "message": "CAPTCHA processed successfully"
}

Response (Error)

json
{
  "success": false,
  "error": "Invalid API key or account inactive"
}

Response Fields

Field Type Description
success Boolean Request success status
data.prediction String Solved CAPTCHA text
data.confidence String Prediction confidence (%)
data.process_time Float Processing time in seconds
credits.credits_deducted Integer Credits used (1 per request)
credits.credits_remaining Integer Remaining credits (-1 = unlimited)
mode String api_key or free_trial

HTTP Status Codes

Code Meaning
200 Success - CAPTCHA solved
400 Bad Request - Invalid input or error
401 Unauthorized - Invalid API key
403 Forbidden - Insufficient credits
405 Method Not Allowed - Use POST
429 Too Many Requests - Rate limit exceeded
500 Server Error - Internal error