Balance

Check your account balance

GEThttps://api.scarnox.com/api/balance
Requires Authorization: Bearer <api_key>

Returns your current USD balance. Use this to check remaining credits programmatically. Balance is only deducted on solved tasks — failed solves are free.

Request

http
GET https://api.scarnox.com/api/balance HTTP/1.1
Authorization: Bearer scarnox_YOURAPIKEY

Response

json
{
  "balance":  0.9940,
  "currency": "USD"
}

Python Example

python
import requests

resp = requests.get(
    'https://api.scarnox.com/api/balance',
    headers={'Authorization': 'Bearer scarnox_YOURAPIKEY'},
)
data = resp.json()
print("Balance: $%.4f" % data['balance'])

Solve Response Fields

Every POST /api/tasks/create response also includes:

challenge_typestringalways

Type of challenge solved (e.g. image_label_binary)

time_takennumberalways

Seconds the solver spent on this task

cost_chargednumberalways

Amount deducted this request (0 if failed)

balance_remainingnumberalways

Your balance after this request

json
{
  "success":           true,
  "id":                "scrx_...",
  "status":            "solved",
  "token":             "P1_eyJ...",
  "site_url":          "https://example.com",
  "site_key":          "your-sitekey",
  "challenge_type":    "image_label_binary",
  "time_taken":        7.94,
  "solve_time_ms":     7940,
  "cost_charged":      0.00069,
  "balance_remaining": 9.99925
}