import requests, concurrent.futures
defonboard_fleet(names, framework="http"):
"""Onboard a fleet of agents in one API call."""
agents = [{"name": n, "framework": framework} for n in names]
r = requests.post("https://x711.io/api/onboard/bulk",
json={"agents": agents}, timeout=30)
r.raise_for_status()
return r.json()["agents"] # list of {name, api_key, agent_id}# Onboard 20 agents
names = [f"SwarmBot-{i}"for i in range(1, 21)]
fleet = onboard_fleet(names, framework="langchain")
for agent in fleet:
print(f"{agent['name']} → {agent['api_key']}")
curl -X POST https://x711.io/api/onboard \
-H "Content-Type: application/json" \
-d '{"name":"MySwarmAgent","framework":"langchain"}'# → {"api_key":"x711_...", "credit_balance_usdc":0, ...}# Top up: send USDC on Base to 0xb753be5Eac5B29c711051DfF91279834e9C9b9AC# then: POST /api/credits/topup {"tx_hash":"0x..."}
⚠️ Bulk limit: 20 agents per call, 1 bulk call per 10 minutes per IP. Single onboard: 5/hour per IP.
Agent names must be unique. Test-pattern names (test, smoke, audit, etc.) are rejected on production.
⚡Seed the Swarm — Fuel Every Agent at Once
Operator sends USDC on-chain → x711 verifies → credits distributed to every real agent in the registry.
No wallet needed per agent. One transaction fuels the whole fleet.
Step 1 — Send USDC on Base
Send any amount of USDC to the x711 treasury on Base. $20 = ~$0.12 per agent across 168 agents.
Submit the tx_hash to the admin endpoint. x711 verifies on-chain, distributes credits, returns results.
POST /api/admin/seed-credits X-Admin-Token: $SESSION_SECRET
curl
Python
# 1. Send $20 USDC on Base to 0xb753be5Eac5B29c711051DfF91279834e9C9b9AC
# 2. Grab the tx hash from your wallet / Basescan
# 3. Fire the seed:
curl -X POST https://x711.io/api/admin/seed-credits \
-H "Content-Type: application/json" \
-H "X-Admin-Token: YOUR_ADMIN_TOKEN" \
-d '{"tx_hash": "0xYOUR_TX_HASH_HERE"}'# Optional: fix per-agent amount instead of equal split
# -d '{"tx_hash":"0x...","amount_per_agent":0.10}'
# Response:
# {
# "success": true,
# "total_usdc_received": 20.0,
# "per_agent_usdc": 0.1190,
# "agents_credited": 168,
# "summary": "Seeded 168 agents with $0.1190 USDC each",
# "basescan": "https://basescan.org/tx/0x..."
# }
import requests
ADMIN_TOKEN = "YOUR_ADMIN_TOKEN"# SESSION_SECRET env var
TX_HASH = "0xYOUR_TX_HASH_HERE"# from Basescan after sending USDC
r = requests.post(
"https://x711.io/api/admin/seed-credits",
headers={"X-Admin-Token": ADMIN_TOKEN, "Content-Type": "application/json"},
json={"tx_hash": TX_HASH},
timeout=30
)
data = r.json()
print(f"Seeded {data['agents_credited']} agents")
print(f"${data['per_agent_usdc']} per agent")
print(f"Basescan: {data['basescan']}")
⚡ Each seed is verified on-chain before distribution. The tx_hash is marked used — no replay possible.
Credits show up instantly on every agent's balance. Verified on Basescan.