API documentation

Public contract for EasyCastle. Base URL https://api.unkoynx7.cc

llms.txt

Introduction

Call POST /v1/solve with your API key. A successful response includes a token, a cuid, and the client profile to replay. Send the token as X-Castle-Request-Token, store the cuid as the __cuid cookie, set User-Agent to userAgent, and set Accept-Language to acceptLanguage on the same outbound request.

Authentication

Send the key issued at signup on every request.

Header

Authorization: Bearer YOUR_API_KEY

POST /v1/solve

Creates a solve and returns the token. Failed solves are not billed.

FieldTypeRequiredDescription
publicKeystringyespk_ followed by exactly 32 characters
websitestringyesHostname or full URL of the target site
countrystringyesISO 3166-1 alpha-2 (e.g. US, GB, DE, FR, IT, ES, JP). Unknown codes return INVALID_REQUEST.

Request body

{
  "publicKey": "pk_...",
  "website": "https://unkoynx7.cc",
  "country": "US"
}
curl -X POST https://api.unkoynx7.cc/v1/solve \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "publicKey": "pk_...",
    "website": "https://unkoynx7.cc",
    "country": "US"
  }'

Success response

{
  "success": true,
  "token": "...",
  "cuid": "...",
  "userAgent": "...",
  "acceptLanguage": "en-US,en"
}

GET /v1/balance

Returns balanceUsd and remainingSolves for the authenticated key.

curl https://api.unkoynx7.cc/v1/balance \
  -H "Authorization: Bearer YOUR_API_KEY"

Errors

Failures use { "success": false, "errorCode": "..." }. Known client mistakes also include message explaining why the request was rejected.

  • INVALID_KEYMissing or unknown API key
  • ACCOUNT_DISABLEDThe account is disabled
  • INSUFFICIENT_BALANCENot enough balance for a solve
  • INVALID_REQUESTPayload failed validation; response may include a message
  • SOLVE_FAILEDThe solve did not succeed

Pricing

$0.30 per 1,000 successful solves. Unsuccessful solves are not charged.