Skip to main content
The System API covers plans (public), keys (admin), and payments (admin). client.keys and client.payment require an API key.

Plan API (public)

List API plans — no key required.

PlanApi

Plan / PlansResponse

  • PlansResponse: { plans: Plan[] }
  • Plan: id, name, requests_per_minute, requests_per_day, allowed_origins, price, price_alph, validity_days

Keys API (admin)

List and create API keys. Requires apiKey.

KeysApi

Types

  • KeysResponse: { keys: ApiKeyRow[] }
  • ApiKeyRow: id, key_prefix, user_id, level, plan_id, allowed_origins, status, created_at, last_payment_at, valid_until
  • KeyCreateBody: userId, planId, level?: "user" | "alphscan" | "admin"
  • KeyCreateResponse: key, keyId, key_prefix

Payment API (admin)

Payment flow: next index, request, verify, pending, history. Requires apiKey.

PaymentApi

Types

  • PaymentRequestBody: derivation_index, deposit_address, telegram_user_id, plan_id, key_id?, amount_alph_min
  • PaymentRequestResponse: id, deposit_address, amount_alph_min, plan_id
  • PaymentVerifyResponse: success, upgraded?, plan_id?, key_prefix?, key?, keyId?
  • PendingItem / HistoryItem: see SDK types.