mode determines the task type. The request body and response vary based on the mode.
import requests
url = "https://api.xsolve.me/task"
headers = {
"X-Api-Key": "<x-api-key>"
}
data = {
"mode": "turnstile",
"url": "https://turnstiledemo.lusostreams.com/",
"sitekey": "0x4AAAAAAA48l90EkbvST26P"
}
response = requests.post(url, headers=headers, json=data)
print(response.json()) curl --request POST \
--url https://api.xsolve.me/task \
--header 'X-Api-Key: <x-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"mode": "turnstile",
"url": "https://turnstiledemo.lusostreams.com/",
"sitekey": "0x4AAAAAAA48l90EkbvST26P"
}' const url = 'https://api.xsolve.me/task';
const headers = {
'X-Api-Key': '<x-api-key>',
'Content-Type': 'application/json'
};
const data = {
mode: 'turnstile',
url: 'https://turnstiledemo.lusostreams.com/',
sitekey: '0x4AAAAAAA48l90EkbvST26P'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error)); package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.xsolve.me/task"
headers := map[string]string{
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"mode": "turnstile",
"url": "https://turnstiledemo.lusostreams.com/",
"sitekey": "0x4AAAAAAA48l90EkbvST26P",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println(err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println(err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
} import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
URL url = new URL("https://api.xsolve.me/task");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("X-Api-Key", "<x-api-key>");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonInputString = "{\"mode\":\"turnstile\",\"url\":\"https://turnstiledemo.lusostreams.com/\",\"sitekey\":\"0x4AAAAAAA48l90EkbvST26P\"}";
try (OutputStream os = conn.getOutputStream()) {
byte[] input = jsonInputString.getBytes("utf-8");
os.write(input, 0, input.length);
}
try (BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String responseLine = null;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
}
} use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::new();
let mut data = HashMap::new();
data.insert("mode", serde_json::to_value("turnstile").unwrap());
data.insert("url", serde_json::to_value("https://turnstiledemo.lusostreams.com/").unwrap());
data.insert("sitekey", serde_json::to_value("0x4AAAAAAA48l90EkbvST26P").unwrap());
let res = client.post("https://api.xsolve.me/task")
.header("X-Api-Key", "<x-api-key>")
.json(&data)
.send()
.await?
.json::<HashMap<String, serde_json::Value>>()
.await?;
println!("{:#?}", res);
Ok(())
} For turnstile tasks, you can also send the optional action and cdata fields when the target widget includes them.
Optional Turnstile payload
{
"action": "login",
"cdata": "example_cdata"
} Headers
Service API Key
Body
Must be turnstile.
Turnstile page URL.
https://turnstiledemo.lusostreams.com/Turnstile sitekey for the target page.
0x4AAAAAAA48l90EkbvST26P
action string Optional.
Send this only if the target Turnstile widget provides an action value such as login.
cdata string Optional.
Send this only if the target Turnstile widget provides a cData value.
proxy string Optional. HTTP, HTTPS, and SOCKS5 proxies are supported.
socks5://[username:password@]ip[:port] http://[username:password@]ip[:port] https://[username:password@]ip[:port] import requests
url = "https://api.xsolve.me/task"
headers = {
"X-Api-Key": "<x-api-key>"
}
data = {
"mode": "iuam",
"url": "https://challenge-endpoint.lusostreams.com/js-challenge",
"proxy": "socks5://username:password@host:port"
}
response = requests.post(url, headers=headers, json=data)
print(response.json()) curl --request POST \
--url https://api.xsolve.me/task \
--header 'X-Api-Key: <x-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"mode": "iuam",
"url": "https://challenge-endpoint.lusostreams.com/js-challenge",
"proxy": "socks5://username:password@host:port"
}' const url = 'https://api.xsolve.me/task';
const headers = {
'X-Api-Key': '<x-api-key>',
'Content-Type': 'application/json'
};
const data = {
mode: 'iuam',
url: 'https://challenge-endpoint.lusostreams.com/js-challenge',
proxy: 'socks5://username:password@host:port'
};
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error)); package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.xsolve.me/task"
headers := map[string]string{
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json",
}
data := map[string]interface{}{
"mode": "iuam",
"url": "https://challenge-endpoint.lusostreams.com/js-challenge",
"proxy": "socks5://username:password@host:port",
}
jsonData, err := json.Marshal(data)
if err != nil {
fmt.Println(err)
return
}
req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
if err != nil {
fmt.Println(err)
return
}
for key, value := range headers {
req.Header.Set(key, value)
}
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
} import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
URL url = new URL("https://api.xsolve.me/task");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("POST");
conn.setRequestProperty("X-Api-Key", "<x-api-key>");
conn.setRequestProperty("Content-Type", "application/json");
conn.setDoOutput(true);
String jsonInputString = "{\"mode\":\"iuam\",\"url\":\"https://challenge-endpoint.lusostreams.com/js-challenge\",\"proxy\":\"socks5://username:password@host:port\"}";
try (OutputStream os = conn.getOutputStream()) {
byte[] input = jsonInputString.getBytes("utf-8");
os.write(input, 0, input.length);
}
try (BufferedReader br = new BufferedReader(
new InputStreamReader(conn.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String responseLine = null;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
}
} use std::collections::HashMap;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = reqwest::Client::new();
let mut data = HashMap::new();
data.insert("mode", serde_json::to_value("iuam").unwrap());
data.insert("url", serde_json::to_value("https://challenge-endpoint.lusostreams.com/js-challenge").unwrap());
data.insert("proxy", serde_json::to_value("socks5://username:password@host:port").unwrap());
let res = client.post("https://api.xsolve.me/task")
.header("X-Api-Key", "<x-api-key>")
.json(&data)
.send()
.await?
.json::<HashMap<String, serde_json::Value>>()
.await?;
println!("{:#?}", res);
Ok(())
} Headers
Service API Key
Body
Must be iuam.
UAM challenge page URL.
https://challenge-endpoint.lusostreams.com/js-challengeRequired for iuam.
HTTP, HTTPS, and SOCKS5 proxies are supported.
socks5://[username:password@]ip[:port] http://[username:password@]ip[:port] https://[username:password@]ip[:port] Response
{
"token": "0.3g00PIzENb3goEq4-D.....",
"elapsed": "1.55s",
"status": "completed"
} {
"message": "An error occurred",
"status": "failed"
} {
"message": "An error occurred",
"status": "failed"
} {
"headers": {
"Cookie": "cf_clearance=cZ3ow5J194Lyer0BTI64.....;",
"User-Agent": "Mozilla/5.0 (Linux; Android 16; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36"
},
"ip": "127.0.0.1",
"elapsed": "1.55s",
"status": "completed"
} {
"message": "An error occurred",
"status": "failed"
} {
"message": "An error occurred",
"status": "failed"
}