01
Short on time? Let your agent read it
Skip this guide. Give your agent this instruction file instead. It walks you through the wallet, then signs up, pays and tests the key itself. It asks before spending any TAO.
Read https://www.tokengauge.site/saygm-agent-signup.md and follow it to set me up with a SayGM API key.02
How it works
SayGM (opens in a new tab) has a sign-up route built for software. The agent proves it owns a crypto wallet by signing a message, and that signature creates the account. It tops up by sending TAO, a crypto token, from the same wallet. Once signed in, it can also top up with USDC on Ethereum from any wallet. No form, no password, no card.
03
Your part: three steps
01
Create a wallet
Create a TAO wallet in a browser extension such as Talisman. Your agent signs in and pays through btcli, the official command-line wallet for TAO. Install it with the btcli quickstart, then import your wallet with its recovery phrase.
02
Add TAO
Buy a few dollars of TAO on an exchange and withdraw it to the wallet address.
03
Point your agent at this page
Any agent with access to a Linux environment works, including WSL on Windows. Claude Code and Codex both qualify. It runs the commands below: signs up, creates an API key, pays and calls a model.
04
What the agent runs
1. Ask for a login code
ACCOUNT_API='https://account.saygm.com/v1'ADDRESS='<your wallet address>'curl -sS --fail-with-body "$ACCOUNT_API/oauth/challenge" \ -H 'Content-Type: application/json' \ --data "{\"address\":\"$ADDRESS\"}"Sends the wallet address to SayGM. Returns a one-time nonce, valid for 5 minutes.
2. Sign the code
NONCE='<nonce from step 1>'btcli wallet sign --wallet <your-wallet> --message "$NONCE" --jsonSigns the nonce with the wallet to prove ownership. The signed_message in the output is the signature.
3. Get a session
curl -sS --fail-with-body "$ACCOUNT_API/oauth/token" \ --data-urlencode 'grant_type=urn:taostats:params:oauth:grant-type:bittensor-signature' \ --data-urlencode 'client_id=saygm-cli' \ --data-urlencode "nonce=$NONCE" \ --data-urlencode "address=$ADDRESS" \ --data-urlencode "signature=$SIGNATURE" \ --data-urlencode 'device_name=my-agent'Trades the signature for an access_token, valid for 15 minutes. This creates the account.
4. Create an API key
curl -sS --fail-with-body -X POST "$ACCOUNT_API/keys" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H 'Content-Type: application/json' --data '{"name":"agent"}'The key is in the secret field and starts with gm_live_. It is shown once.
5. Send TAO
btcli wallet transfer --wallet <your-wallet> --network finney \ --dest 5FqbWhtCvoSD3X3iNxyWXogrKGmeVLnjZXoNWPx16yErYQd9 --amount <TAO>A plain transfer from the same wallet to SayGM's deposit address. No memo. Leave a little TAO for the fee.
6. Check the balance and call a model
curl -sS "$ACCOUNT_API/balance" -H "Authorization: Bearer $ACCESS_TOKEN"curl -sS https://api.saygm.com/v1/chat/completions \ -H "Authorization: Bearer $API_KEY" -H 'Content-Type: application/json' \ --data '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"gm"}]}'Credit usually lands within 1 to 2 minutes. Then call any model with the API key.
05
Four things that trip agents up
- The session lasts 15 minutes. An agent polling for credit can outlive it and start getting
401errors. Refresh withgrant_type=refresh_tokenand store the new token pair each time. - Claude uses a different endpoint. Claude models answer on
/v1/messagesthrough the Anthropic SDK. A Claude ID sent to/v1/chat/completionsreturnsunknown model. - Extra keys can split the balance. When
shared_balanceis false in the balance response, each key spends only its share. Create one key per account. - A failed transfer still costs a fee. Run
btcli wallet balancebefore retrying.
06
The one-request option: x402
SayGM also supports x402, the HTTP 402 standard for machine-to-machine payments. The agent calls POST https://saygm.com/x402/api-keys, receives a price quote, signs the payment without submitting it and resends the request. SayGM submits the payment, opens the account and returns the key in the same exchange. The minimum is $5, in $5 steps.
An agent that already has an account can buy credit the same way. POST https://account.saygm.com/v1/payments/x402 with its bearer token and an amount_cents body returns a 402 quote to sign.
Sources: SayGM agent sign-up guide and the top-up guide linked from SayGM's llms.txt.