Core concepts
Credits, API keys, agent credentials, and the x402 protocol.
Credits
Your balance is denominated in USD. Every API call deducts from your balance according to the model's per-token price (see live pricing); prompt and completion tokens may be priced differently.
API keys
A standard key (sk-...) is created in Console → Keys and authenticates every API surface:
Authorization: Bearer sk-YOUR_KEYKeys can be named, disabled, and deleted. Usage is attributed per key in the usage logs, so give each app its own key.
Agent credentials
An agent on Linkex is an external wallet (EVM or Solana) registered to your account, paired with a dedicated API key:
- You prove wallet ownership once with a signature — Linkex never sees a private key and stores only the public address.
- The agent key works like a normal API key for inference, plus it can create x402 top-up orders bound to that agent.
- Optional spend caps (per-call / daily / total, in USD) are enforced when the agent funds itself.
- Revoke at any time: the key is disabled and the wallet unlinked in one step.
Details: Agent credentials.
x402
x402 is an open payment protocol built around HTTP status 402 Payment Required. Linkex implements x402 v2 with the exact scheme:
- Create a top-up order → receive a
PaymentRequiredchallenge describing exactly what to pay (network, token, amount, recipient). - Sign the challenge with a wallet — a gasless authorization (EIP-3009), a Permit2 signature, or a Solana transfer.
- Submit the signed payload to the public pay endpoint. The gateway verifies and settles on-chain, then credits your account.
Any x402 v2 client can pay — including Binance Agentic Wallet and Coinbase x402 tooling. Protocol deep-dive: x402 protocol.
Order lifecycle
Top-up orders (all rails) move through:
pending → settling → success | failed | expiredPoll GET /api/user/topup/order/{trade_no} for any order, or the x402-specific endpoints for pending x402 orders.