Agent credentials
Register an agent wallet, mint its API key, set spend caps, revoke — step-by-step.
An agent on Linkex is a bring-your-own wallet paired with a dedicated API key. Linkex verifies you own the wallet once, then stores only the public address — no private key ever touches the platform. The wallet is the agent's identity; the key is what it authenticates with.
Create an agent
Open the Agents page
Go to Console → Agents. Agent management is gated behind a wallet-verified session — if prompted, connect and verify your account wallet first (SIWE). Click Create Agent.
Name it and pick a chain
Give the agent a label (up to 128 characters) and choose the credential chain:
- EVM — one address works across Base and BNB Chain
- Solana
Prove wallet ownership
Connect the wallet that will be the agent and sign a one-time ownership proof:
- EVM — an EIP-712 typed-data signature. Domain name
linkexai-agent-ownership, primary typeAgentOwnership { agent, nonce, issuedAt }. - Solana — an ed25519 signature over the canonical message
linkexai-agent-ownership\nagent: <address>\nnonce: <nonce>\nissuedAt: <unix>.
The nonce is single-use and the timestamp must be fresh (within 5 minutes), so a captured signature can't be replayed.
Save the API key — shown only once
On success Linkex mints the agent's API key (sk-...) and displays it one time only. Download the backup JSON or copy the key now; it cannot be retrieved later (revoke and re-register if lost).
Programmatic creation uses the same two endpoints — POST /api/user/self/agents/siwe/nonce then POST /api/user/self/agents; see the API reference.
Spend caps
Each agent carries three optional USD caps, enforced when the agent funds itself over x402 (settlement fails with SPEND_CAP_EXCEEDED beyond them):
| Cap | Meaning |
|---|---|
per_call_cap_usd | Max USD per single top-up |
daily_cap_usd | Max USD per calendar day |
total_cap_usd | Lifetime max USD |
0 means uncapped. Current spend counters (spent_today_usd, spent_total_usd) are visible on the Agents page and in GET /api/user/self/agents.
Using the agent key
The agent key works everywhere a normal key does:
# inference
curl https://linkex.ai/v1/chat/completions -H "Authorization: Bearer sk-AGENT_KEY" ...
# check its balance (shared account balance)
curl https://linkex.ai/api/user/self/balance -H "Authorization: Bearer sk-AGENT_KEY"
# create a top-up order — automatically bound to this agent, caps enforced
curl -X POST https://linkex.ai/api/user/topup/x402/orders \
-H "Authorization: Bearer sk-AGENT_KEY" -d '{"amount_usd": 5}'When authenticated with an agent key, x402 orders are force-bound to that agent's wallet — an agent_wallet_id in the request body is ignored. This is what makes the caps tamper-proof from the agent's side.
Revoke
Click Revoke on the Agents page (or DELETE /api/user/self/agents/{agent_id}). In a single transaction the API key is disabled and the wallet unlinked. Revocation is idempotent, and the same wallet can be re-registered later — it gets a fresh key.
Limits
- Up to 50 agents per account.
- EVM addresses are stored lowercased; Solana addresses are case-sensitive base58.
- One wallet address can be registered as an agent only once at a time (re-registerable after revocation).