Hylon AI API

Hylon AI billing and node-program endpoints on OrbNET, including tier resolution, usage, API keys, checkout, node setup codes, and the node-agent task plane.

Overview

The Hylon AI product runs on the OrbNET platform under /api/v1/hylon/*. The surface splits into four groups:

  • Public reads: pricing and the plan catalog, no auth.
  • User endpoints: entitlement, usage, checkout, API keys, and the node-owner endpoints. Authenticated by an OrbNET JWT session or a Hylon API key (Authorization: Bearer hyl_sk_...).
  • Node-agent endpoints: the task plane spoken by the Hylon node binary. Authenticated by X-Node-UUID and X-Node-Key headers, never a JWT.
  • Internal: metered usage ingest, reachable only with the server-to-server internal API key.

All endpoints share the standard OrbNET response envelope:

{ "success": true, "data": { } }

Base URL: https://api.orbai.world

Chat completions live on the serving gateway

Model inference itself is not on this API. Chat requests go to the OpenAI-compatible Hylon serving gateway (POST /v1/chat/completions on https://hylon-gateway.ambitiousmushroom-c83407ea.eastus.azurecontainerapps.io), which authenticates against these endpoints and settles usage back into them. See the user guide: Plans, Credits & API Keys.


Pricing

GET/api/v1/hylon/pricing

Active per-model credit rates (credits per million tokens).

Authentication:No Auth Required
curl https://api.orbai.world/api/v1/hylon/pricing
{
  "success": true,
  "data": {
    "models": [
      {
        "model": "Qwen/Qwen2.5-3B-Instruct",
        "input_credits_per_mtok": 20,
        "output_credits_per_mtok": 60,
        "cached_input_credits_per_mtok": 0,
        "is_active": true
      }
    ]
  }
}

Plans

GET/api/v1/hylon/plans

Purchasable Hylon tiers, cheapest first. The general /api/v1/plans endpoint never includes Hylon plans.

Authentication:No Auth Required

Each plan carries id, slug, name, tier (pro, pro_max, max), price_cents, duration_days, checkout_enabled, and a features block (included_mtok_month, models, max_effort, concurrent_sessions).


Me (entitlement)

GET/api/v1/hylon/me

The caller's resolved Hylon entitlement: tier, included quota and usage, free daily allowance, and credit balance.

Authentication:Bearer Token

A paid tier comes from an active Hylon subscription; otherwise the account resolves to the free tier. The response also reports how the call was authenticated (authenticated_via: session or api_key, plus api_key_id for key calls) so integrations can attribute usage.

{
  "success": true,
  "data": {
    "user_id": 12345,
    "tier": "free",
    "plan_id": 0,
    "plan_slug": "",
    "status": "FREE",
    "is_paid": false,
    "models": null,
    "max_effort": "",
    "concurrent_sessions": 0,
    "included_mtok_month": 0,
    "included_tokens_used": 0,
    "free_daily_tokens": 100000,
    "credit_balance": 0,
    "expires_at": null,
    "authenticated_via": "session",
    "api_key_id": null
  }
}

Usage

GET/api/v1/hylon/usage

Credit balance plus recent metered usage events, newest first. Optional ?limit= (default 50; a value above 200 falls back to 50).

Authentication:Bearer Token

Each event records the model, input/output/cached token counts, cost_credits, the charge_source (free, included_quota, or credits), and the balance before and after.


Checkout

POST/api/v1/hylon/checkout

Start a Stripe checkout for a paid Hylon tier.

Authentication:Bearer Token
ParameterTypeRequiredDescription
plan_idinteger RequiredA plan id from GET /api/v1/hylon/plans.
success_urlstringOptionalWhere Stripe redirects after a successful payment.
cancel_urlstringOptionalWhere Stripe redirects if the user cancels.
emailstringOptionalPrefills the Stripe checkout email.

Fail-closed: answers 503 when Stripe is not configured on the deployment and 400 for an invalid or non-Hylon plan.


API keys

POST/api/v1/hylon/api-keys

Mint a programmatic API key. The full secret is returned exactly once.

Authentication:Bearer Token
ParameterTypeRequiredDescription
namestringOptionalDisplay name for the key.
scopesstring[]OptionalOptional scope labels.
expires_in_daysintegerOptionalDays until the key expires. Omit for no expiry.

Session-only creation

Keys must be minted from a signed-in session. A request authenticated with an API key gets 403, so a leaked key can never mint fresh keys.

GET/api/v1/hylon/api-keys

List the caller's keys. Only non-secret prefixes are returned, never secrets.

DELETE/api/v1/hylon/api-keys/{id}

Revoke a key the caller owns. Returns 204 on success.

Key format: hyl_sk_<8 hex chars>_<secret body>. The stored record keeps only a SHA-256 hash; verification is constant-time.


Node program (owner side)

POST/api/v1/hylon/nodes/setup-code

Mint a single-use node setup code, valid 15 minutes.

Authentication:Bearer Token

Session-only, like API-key creation: calls authenticated with a Hylon API key are refused (403). Returns the code, its expiry, the paste-ready command, and the program's beta status and honesty note.

GET/api/v1/hylon/nodes

The caller's enrolled nodes with status, tier, points, and truthful contribution counters.

Authentication:Bearer Token
{
  "success": true,
  "data": {
    "nodes": [
      {
        "id": 8,
        "name": "my-mac",
        "device_type": "desktop",
        "deployment_type": "HOME",
        "tier": "server",
        "status": "online",
        "last_seen": "2026-07-28T10:00:00Z",
        "points": 6,
        "contributions": {
          "tasks_completed": 6,
          "compute_units": 0,
          "inference_requests": 0
        }
      }
    ],
    "program_status": "beta",
    "note": "Beta: nodes run verification and benchmark tasks. Rewards are points in the node-program ledger; no token payouts are made or promised."
  }
}

Node-agent task plane

These endpoints are spoken by the node binary. See the operator guide: Run a Hylon Node.

POST/api/v1/hylon/node-agent/register

Exchange a single-use setup code for node credentials. The setup code is the credential; no other auth.

Authentication:No Auth Required
ParameterTypeRequiredDescription
setup_codestring RequiredThe 8-character code minted by the owner. Single use, 15-minute expiry.
namestringOptionalDisplay name for the node (defaults to "Hylon Node").
capabilitiesobjectOptionalHardware profile: cpu_cores, ram_mb, has_gpu, device_type. The server derives the node tier from it.

Returns node_id, node_uuid, node_key (returned exactly once; only its hash is stored), and the derived tier. An unknown, expired, or already-used code gets 401 setup_code_invalid.

POST/api/v1/hylon/node-agent/tasks/lease

Lease up to max_tasks queued tasks (batch cap 10). Leases are exclusive for 5 minutes.

Authentication:API Key

Authentication: X-Node-UUID and X-Node-Key headers, validated constant-time and fail-closed against the node record. A lease call also refreshes the node's heartbeat. Each leased task carries id, kind (verify.recompute or bench.cpu), a payload (seed, rounds), and lease_expires_at.

POST/api/v1/hylon/node-agent/tasks/{id}/complete

Report a leased task's result. The server recomputes the digest chain itself before awarding any points.

Authentication:API Key
ParameterTypeRequiredDescription
statusstring Requiredok, failed, or unsupported.
resultobjectOptionalFor ok: { "digest": "<hex sha256>" }. bench.cpu may add ops_per_sec (informational only; the digest is what gets verified).
duration_msintegerOptionalSelf-reported execution time.

Responds with accepted and points_awarded. Points are awarded once per task ever (idempotent), and only when the server's own recomputation matches.


Internal: usage ingest

POST/api/v1/hylon/usage/ingest

Server-to-server settlement of metered usage, called by the Hylon serving gateway after it has authenticated the end user.

Authentication:API Key

Protected by the internal API key (X-API-Key); unauthenticated calls get 401. Idempotent per request_id. Settlement charges in the order free daily allowance, included monthly quota, prepaid credits, and answers 402 insufficient_credits or 422 model_not_priced when it cannot settle.


Honesty guarantees baked into the API

  • Node rewards are points in a ledger, never token amounts. Every node-program response repeats this in program_status and note fields.
  • Contribution counters report only work that actually happened; compute and inference counters stay at zero until those workloads ship.
  • Billing fails closed: unpriced models are rejected, balances never go negative, and unauthenticated settlement is refused.