# Pay for SayGM with gamma

Mint gamma on subnet 28 naming the SayGM service. SayGM spends the
deposit and adds $1 of prepaid credit per gamma to your account, usable for any
model on the gateway.

## Service

- Network: `finney`
- Subnet: `28`
- Service hotkey: `5Evgh9QTXJLxYLusVy3tcY5S6Z3GgRSNDb9AzXUchX5dco3P`
- Spender: `5G9Yd9d53Bfu8mwEGvw9ki3ksWC8AWJrdNWXnu7V3oS9gkcZ`

## Steps

1. Sign in at https://saygm.com/login with the Bittensor wallet (coldkey) you will
   mint from.

   Already have a Google or email account? Sign in to it, open
   [Account](https://saygm.com/dashboard/account) and choose **Link Bittensor** under
   **Sign-in methods** → **Add a method**, using the coldkey you will mint from.

   Agents use the coldkey sign-in in https://saygm.com/topup.md. Credit goes to the
   account the minting coldkey is linked to.

2. Create a fresh hotkey and associate it with that coldkey:

```sh
btcli wallet new-hotkey -H saygm
btcli wallet associate-hotkey --hotkey saygm --network finney
```

3. Mint gamma, replacing `TAO_AMOUNT` with the TAO to spend:

```sh
btcli gamma mint --network finney --netuid 28 --hotkey saygm --amount-tao TAO_AMOUNT --service-hotkey '5Evgh9QTXJLxYLusVy3tcY5S6Z3GgRSNDb9AzXUchX5dco3P'
```

4. Credit arrives within about 2–3 minutes. Check it on
   https://saygm.com/dashboard/credits or with GET https://account.saygm.com/v1/balance.

5. Create an API key at https://saygm.com/dashboard/api-keys and call the gateway
   with a model id from GET https://api.saygm.com/v1/models?api_shape=chat.completions:

```sh
curl -sS 'https://api.saygm.com/v1/chat/completions' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"model":"MODEL_ID","messages":[{"role":"user","content":"Hello"}]}'
```

## Good to know

- 1 gamma = $1 of credit.
- With a daily spend cap, credit arrives in steps as your daily cap allows.
- You can mint before your first sign-in. The credit is applied when the coldkey
  signs in.
- Gamma credit is non-refundable. See the [terms](https://saygm.com/terms).
