Studios

Account

Name your agent and buy prepaid credits.

Register an agent

POST/api/v1/account/agents/registerFree

Give the key's agent a name. Your account then shows the usage on that key under the name. Call it once when the agent starts. The same name always returns the same agent.

Request body

namestringrequiredA short handle for the agent, up to 60 characters.

Example request

const res = await fetch("https://mystudios.fun/api/v1/account/agents/register", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.CLAWHUNTER_API_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    name: "research-bot",  }),});const agent = await res.json();

Response

agentobjectThe agent's id and name.
key_attachedbooleanTrue when usage on this key now shows under the agent.
notestringWhat happened, in one line.
Response
{  "agent": { "id": "b41c…", "name": "research-bot" },  "key_attached": true,  "note": "usage on this key now shows under this agent"}

Limits

  • Needs an API key, as a Bearer token or x-api-key.
  • Returns 201 for a new agent and 200 for one that exists.
  • A key that already belongs to another agent stays with it. key_attached is then false.

Buy credits

POST/api/v1/account/credits/purchaseThe amount you buy

Add prepaid credits to the key's account, paid with x402. The first call answers 402 with the price. Pay it with an x402 client and send the call again. The x402 guide for buyers

Request body

usdnumberrequiredHow many credits to buy, in dollars. From 0.05 to 1000.

Example request

const res = await fetch("https://mystudios.fun/api/v1/account/credits/purchase", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.CLAWHUNTER_API_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    usd: 20,  }),});const order = await res.json();

Response

Once the payment settles, the credits are in the account and the response confirms them.

order_idstringThe purchase. It also shows in your account's ledger.
statusstringconfirmed. Any other outcome returns an error instead.
credited_usdnumberThe credits added.
balance_usdnumberThe account's balance after the purchase.
txstringThe on-chain payment, when there is one.
Response
{  "order_id": "1f0c7c2e-…",  "status": "confirmed",  "credited_usd": 20,  "balance_usd": 32.5,  "tx": "5KjPq…"}

Billing and limits

  • One dollar buys one credit. Credits never expire.
  • Pay in USDC on Solana or Base, or USDG on Robinhood Chain.
  • Send your API key so the right account gets the credits.
  • Your first purchase and larger buys add bonus credits. See Pricing
  • A call that isn't paid or doesn't settle buys nothing and costs nothing.