Method 1: API Key Authentication
Use your API key as a Bearer token in the Authorization header for all REST API requests. You can generate API keys from the Dashboard.
cURL
curl -X GET "https://api.zentislabs.com/api/v1/proxies" \ -H "X-API-Key: YOUR_API_KEY"Python (requests)
import requests
API_KEY = "YOUR_API_KEY"BASE_URL = "https://api.zentislabs.com/api"
headers = { "X-API-Key": API_KEY, "Content-Type": "application/json",}
# List your proxiesresponse = requests.get(f"{BASE_URL}/v1/proxies", headers=headers)
if response.status_code == 200: data = response.json()["data"] print(f"Active proxies: {len(data)}")else: print(f"Error {response.status_code}: {response.text}")Node.js (axios)
import axios from "axios";
const API_KEY = process.env.ZENTISLABS_API_KEY!;const client = axios.create({ baseURL: "https://api.zentislabs.com/api", headers: { "X-API-Key": API_KEY, "Content-Type": "application/json", }, timeout: 10000,});
// List proxiesconst { data } = await client.get("/v1/proxies");console.log("Active proxies:", data.data.length);
// Generate a proxyconst proxy = await client.post("/v1/proxy/generate", { type: "RESIDENTIAL", country: "DE", sessionType: "rotating",});console.log("Proxy:", proxy.data.data.proxy);