Developer docs

Built for agents.
Works for humans too.

The Calyx API lets any agent — or developer — create a wallet, lock escrow before a job, rent a GPU, and receive a cryptographically signed compute receipt. Four endpoints. No sales call required.

Overview

Calyx is a GPU compute marketplace built for the agentic economy. Unlike existing platforms designed for humans clicking a UI, Calyx is API-first — every action an agent needs to take is a single HTTP request.

The core flow is:

flow.txt
1. Create a wallet → POST /wallets 2. Top up with credits → POST /wallets/{id}/topup 3. Submit a job + lock escrow → POST /wallets/{id}/spend 4. Job runs on GPU 5. Settle + receive receipt → POST /wallets/{id}/earn 6. Verify the receipt → POST /receipts/verify

Authentication

Every request requires an API key in the X-API-Key header. You receive your key when you join the waitlist and are approved for API access.

request
curl https://api.getcalyx.io/v1/wallets \ -H "X-API-Key: cyx_live_your_key_here" \ -H "Content-Type: application/json"
Agent keys vs human keys. Each wallet has its own API key. An agent's key can only spend from its own wallet — it cannot access its parent wallet or other agents' wallets. Spend caps and GPU allowlists are enforced at the key level.

Agent wallets

Every agent gets its own wallet with programmable spend controls. A human owner creates the top-level wallet and allocates budget to child agent wallets. Agents can only spend from their own wallet — they cannot access the parent.

Wallet policies you can set per agent:

PolicyTypeDescription
spend_cap_per_jobfloatMaximum FLOPS an agent can lock for a single job. Enforced before escrow.
approval_thresholdfloatJobs above this amount require human approval before proceeding.
allowed_gpu_typesstring[]Whitelist of GPU models the agent is allowed to rent. e.g. ["RTX 4090", "A100"]
spend_cap_per_hourfloatMaximum FLOPS the agent can spend in a rolling 60-minute window.

POST /wallets

Create a new wallet for a human owner or an agent. Agent wallets must reference a parent human wallet.

POST /v1/wallets Create a wallet

Request body

ParameterTypeDescription
owner_type requiredstring"human" or "agent"
owner_id requiredstringYour internal ID for this owner — user ID, agent name, etc.
parent_wallet_idstringRequired for agent wallets. The human wallet that funds this agent.
spend_cap_per_jobfloatMax FLOPS per single job. Null = no cap.
allowed_gpu_typesstring[]GPU allowlist. Null = all GPUs allowed.
approval_thresholdfloatHuman approval required above this spend. Null = no gate.
example request
POST /v1/wallets { "owner_type": "agent", "owner_id": "research-agent-v1", "parent_wallet_id": "wlt_human_abc123", "spend_cap_per_job": 5.00, "approval_threshold": 20.00, "allowed_gpu_types": ["RTX 4090", "A100"] }
Response — 201 Created
response
{ "id": "wlt_agent_xyz789", "owner_type": "agent", "owner_id": "research-agent-v1", "status": "active", "balance": 0.0, "spend_cap_per_job": 5.0, "approval_threshold": 20.0, "allowed_gpu_types": ["RTX 4090", "A100"], "created_at": "2026-04-01T21:00:00Z" }

GET /wallets/{id}

Returns wallet metadata and live balance computed from the ledger. Balance is never stored — always calculated as the sum of all ledger entries.

GET /v1/wallets/{wallet_id} Get wallet + live balance
example
curl https://api.getcalyx.io/v1/wallets/wlt_agent_xyz789 \ -H "X-API-Key: cyx_live_..."
Response — 200 OK
response
{ "id": "wlt_agent_xyz789", "balance": 12.40, // live sum from ledger "txn_count": 8, "status": "active" }

POST /wallets/{id}/spend

Lock FLOPS into escrow before a job starts. This is the escrow step — it checks all wallet policies and deducts from your balance. The funds are held until the job settles.

Returns 402 if balance is insufficient. Returns 403 if spend cap, approval threshold, or GPU allowlist is violated.

POST /v1/wallets/{wallet_id}/spend Lock escrow for a job
ParameterTypeDescription
job_id requiredstringYour unique ID for this job. Used to link escrow to settlement.
amount requiredfloatFLOPS to lock. Must be ≤ spend_cap_per_job if set.
gpu_typestringGPU being rented. Checked against allowed_gpu_types if set.
example request
POST /v1/wallets/wlt_agent_xyz789/spend { "job_id": "job-441", "amount": 4.00, "gpu_type": "RTX 4090" }
Response — 200 OK
response
{ "txn_id": "txn_abc...", "job_id": "job-441", "amount_locked": 4.0, "new_balance": 8.40 // 12.40 - 4.00 }

POST /wallets/{id}/earn

Called when a job completes. Releases escrow, deducts the 15% platform fee, credits the host wallet, and generates a signed compute receipt. All four steps happen atomically — either all succeed or none do.

POST /v1/wallets/{wallet_id}/earn Settle a job — pay the host
ParameterTypeDescription
job_id requiredstringMust match the job_id used in the spend call.
gross_amount requiredfloatTotal FLOPS earned before fee. Platform takes 15%, host gets 85%.
output_hash requiredstringsha256 of the job's output artifact. Goes into the signed receipt.
gpu_model requiredstringThe GPU that ran the job. Recorded in the receipt.
duration_seconds requiredintHow long the job ran. Recorded in the receipt.
response
{ "txn_id": "txn_def...", "gross_amount": 3.80, "platform_fee": 0.57, // 15% "net_payout": 3.23, // 85% "new_balance": 3.23, "receipt_id": "rcpt_ghi..." }

Full example — agent runs a job

This is the complete flow from an agent's perspective using the Python SDK (coming Q3 2026). The same flow works with raw HTTP calls today.

agent_job.py
import calyx # Wallet created once, reused forever wallet = calyx.Wallet( api_key="cyx_live_...", spend_cap_per_job=5.00, allowed_gpus=["RTX 4090", "A100"] ) # Check balance before submitting print(wallet.balance) # 12.40 FLOPS # Submit job — escrow locked automatically job = wallet.submit( image="pytorch/pytorch:2.3", command="python train.py --epochs 10", gpu_type="RTX 4090", max_budget=4.00 ) # Stream logs while job runs for line in job.logs(): print(line) # Wait for completion — returns signed receipt receipt = job.wait() # Verify the receipt is authentic assert receipt.verified == True print(f"Spent: {receipt.flops_spent} FLOPS") # 3.42 print(f"Output: {receipt.output_hash}") # sha256:4d8e... print(f"GPU: {receipt.gpu_model}") # RTX 4090 print(f"Duration: {receipt.duration_seconds}s") # 10082s

FLOPS credits

FLOPS are Calyx's internal credit unit. 1 FLOPS = $0.01 USD. We use FLOPS internally so agents can transact at zero cost without touching a payment processor on every micro-transaction.

Credits circulate between agents at zero cost and instant settlement. Only when someone cashes out to real money (bank transfer, Stripe) does external payment infrastructure get involved. This is what makes agent-to-agent micro-transactions economically viable.

Append-only ledger

Every balance in Calyx is computed from an append-only ledger — a table of credit movements that can never be edited or deleted. Your balance is always SUM(amount) across all your ledger entries.

This means there is no stored balance field that can drift out of sync, no way to silently lose credits, and a permanent audit trail for every dollar your agent ever spent.

Compute receipts

When a job completes, Calyx generates a signed compute receipt — a JSON document signed with Calyx's ed25519 private key. The receipt contains the output hash, GPU model, duration, and cost. Anyone with Calyx's public key can verify it independently.

This means your agent can prove to any third party — including its human owner — exactly what compute it purchased and what output it produced, without trusting Calyx's word for it.

Ready to build on Calyx?

Join the waitlist for API access. First 50 developers get $20 in free FLOPS.

Get API access