REST API
Documentation

Integrate SOSCaptcha OCR inference in seconds using your favorite programming language.

Endpoint

POST https://soscaptcha.fr/api/solve
Headers required:
Content-Type: application/json
X-API-Key: YOUR_API_KEY

API Examples

curl -X POST https://soscaptcha.fr/api/solve \

-H "Content-Type: application/json" \

-H "X-API-Key: YOUR_API_KEY" \

-d '{
    "base64_image":"IMAGE_BASE64"
}'
<?php

$data = [

    "base64_image" => $base64

];

$ch = curl_init(
    "https://soscaptcha.fr/api/solve"
);

curl_setopt_array($ch,[

    CURLOPT_POST => true,

    CURLOPT_RETURNTRANSFER => true,

    CURLOPT_HTTPHEADER => [

        "Content-Type: application/json",

        "X-API-Key: YOUR_API_KEY"

    ],

    CURLOPT_POSTFIELDS =>
        json_encode($data)

]);

$response =
curl_exec($ch);

echo $response;
import requests

url = "https://soscaptcha.fr/api/solve"

headers = {

    "Content-Type":"application/json",

    "X-API-Key":"YOUR_API_KEY"

}

payload = {

    "base64_image":"IMAGE_BASE64"

}

response = requests.post(

    url,

    json=payload,

    headers=headers

)

print(response.text)
const axios = require("axios");

axios.post(

    "https://soscaptcha.fr/api/solve",

    {

        base64_image:
        "IMAGE_BASE64"

    },

    {

        headers: {

            "X-API-Key":
            "YOUR_API_KEY"

        }

    }

).then((response)=>{

    console.log(response.data);

});
OkHttpClient client =
new OkHttpClient();

MediaType mediaType =
MediaType.parse(
"application/json"
);

RequestBody body =
RequestBody.create(

"{\"base64_image\":\"IMAGE_BASE64\"}",

mediaType

);

Request request =
new Request.Builder()

.url(
"https://soscaptcha.fr/api/solve"
)

.post(body)

.addHeader(
"Content-Type",
"application/json"
)

.addHeader(
"X-API-Key",
"YOUR_API_KEY"
)

.build();

Response response =
client.newCall(request)
.execute();

Successful Response

{
    "success": true,
    "result": "ABCD12",
    "credits_left": 4920
}

Error Response

{
    "success": false,
    "error": "Invalid API Key"
}

Pricing

5000 OCR credits = 5€

Start Now