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-UUIDandX-Node-Keyheaders, 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
/api/v1/hylon/pricingActive per-model credit rates (credits per million tokens).
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
/api/v1/hylon/plansPurchasable Hylon tiers, cheapest first. The general /api/v1/plans endpoint never includes Hylon plans.
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)
/api/v1/hylon/meThe caller's resolved Hylon entitlement: tier, included quota and usage, free daily allowance, and credit balance.
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
/api/v1/hylon/usageCredit balance plus recent metered usage events, newest first. Optional ?limit= (default 50; a value above 200 falls back to 50).
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
/api/v1/hylon/checkoutStart a Stripe checkout for a paid Hylon tier.
| Parameter | Type | Required | Description |
|---|---|---|---|
plan_id | integer | Required | A plan id from GET /api/v1/hylon/plans. |
success_url | string | Optional | Where Stripe redirects after a successful payment. |
cancel_url | string | Optional | Where Stripe redirects if the user cancels. |
email | string | Optional | Prefills 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
/api/v1/hylon/api-keysMint a programmatic API key. The full secret is returned exactly once.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Display name for the key. |
scopes | string[] | Optional | Optional scope labels. |
expires_in_days | integer | Optional | Days 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.
/api/v1/hylon/api-keysList the caller's keys. Only non-secret prefixes are returned, never secrets.
/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)
/api/v1/hylon/nodes/setup-codeMint a single-use node setup code, valid 15 minutes.
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.
/api/v1/hylon/nodesThe caller's enrolled nodes with status, tier, points, and truthful contribution counters.
{
"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.
/api/v1/hylon/node-agent/registerExchange a single-use setup code for node credentials. The setup code is the credential; no other auth.
| Parameter | Type | Required | Description |
|---|---|---|---|
setup_code | string | Required | The 8-character code minted by the owner. Single use, 15-minute expiry. |
name | string | Optional | Display name for the node (defaults to "Hylon Node"). |
capabilities | object | Optional | Hardware 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.
/api/v1/hylon/node-agent/tasks/leaseLease up to max_tasks queued tasks (batch cap 10). Leases are exclusive for 5 minutes.
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.
/api/v1/hylon/node-agent/tasks/{id}/completeReport a leased task's result. The server recomputes the digest chain itself before awarding any points.
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Required | ok, failed, or unsupported. |
result | object | Optional | For ok: { "digest": "<hex sha256>" }. bench.cpu may add ops_per_sec (informational only; the digest is what gets verified). |
duration_ms | integer | Optional | Self-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
/api/v1/hylon/usage/ingestServer-to-server settlement of metered usage, called by the Hylon serving gateway after it has authenticated the end user.
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_statusandnotefields. - 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.