Agent API: your own wallet
API keys
Higher limits for an app calling from its own server: get a key, send it, its limits.
For an app on the Agent API that calls us from its own server for many users: a key for higher limits. Every endpoint works without a key. A key raises your limits and shows your usage: for an app that calls us from its own server, where all its users share one IP address. A key never acts for a wallet: plans stay unsigned and your users sign them.
Get a key
Keys are open to whitelisted wallets for now. Need one? Feel free to reach me on Telegram ↗.
Step 1: Sign in
Open giftedstock.com/developers (the app's page, not these docs), connect your wallet and sign in.
Step 2: Create
Name your key and press Create key. Your wallet signs; no transaction.
Step 3: Copy
Copy the key now: it is shown once. It starts with gsk_ and has 43 characters after it.
One key a wallet. Roll a key for a new one (the old one stops within 30 seconds) or revoke it on the same page.
Send it
curl "https://www.giftedstock.com/api/agent/v1/history?wallet=0xYou" \
-H "X-Api-Key: gsk_…"- In the
X-Api-Keyheader, from your server. Never in a URL, never in a web page: browsers can't send it (our CORS refuses the header). - An unknown or revoked key answers
401 bad_key. A value that doesn't start withgsk_(another service's key) is ignored, so check yours is sent as it is, with no Bearer in front. Leave the header out to use the keyless limits. Answers our CDN serves from its cache (the index,/boxes,/tokens,/wallet) don't check it. - Answers that aren't cached carry
x-ratelimit-remaining-minuteandx-ratelimit-remaining-day.
Limits
| Keyless | Free key | |
|---|---|---|
| Whole API | 120 a minute per IP address | 300 a minute |
| Each endpoint | its own number (Requests, plans and errors) | 2 times that |
| A day (UTC) | no daily cap | 20,000 |
A key's minute and day count calls by weight, what each costs us in chain reads: /wallet counts 5, tx/gift, tx/basket and tx/basket/create 3 each, an open with no ids 2, a wallet read or a plan through MCP 6 and every other call 1. Answers our CDN serves from its cache aren't counted. A few limits stay the same with a key, counted for the key: an open with no ids 10 a minute, GET /verify?fresh=1 10 and a gift list of over 1,000 wallets 3.
Over a limit: 429 rate_limited with retry-after and retryIn in seconds and limit naming the one you hit. A refused call isn't counted. Need more? Feel free to reach me on Telegram ↗.