From holdings
to building.

How to earn and claim AI credits with $LEAF and other assets, trade your credits, and use them in your tools.

The SDK is available in alpha. Holder claims and funded keys remain in development.

What is Leaf?

Leaf is designed to turn LEAF trading fees into SayGM AI credits for holders and support for builders on Robinhood Chain. LEAF is planned to launch on Pons. Each trade contributes a 2% fee paid in ETH: 80% funds holder allocations and 20% supports builders.

Leaf’s chosen inference provider is SayGM, not OpenRouter. The goals are discounted inference and early model access when available. Discounts depend on model, workload and supply; early access is not a guaranteed entitlement or release schedule. SayGM’s API docs describe access through familiar model interfaces. The planned holder-specific key would let you spend credit directly with SayGM in compatible apps and coding tools, without a Leaf inference proxy.

Earned allocation
Your recorded share of a completed day’s ETH fees.
Claimable allocation
Earned ETH you have not yet converted into AI credit on a new key.
Available AI credit
Unspent SayGM credit accessible through an issued, active holder key.

For $100 of equivalent trading activity, $2 in equivalent fees means $1.60 for holders and $0.40 for builders. Fees are denominated in ETH. Holder credits fund usage; reduced inference prices stretch that credit. These are separate benefits.

Who qualifies?

Each wallet needs a daily average direct balance of at least 100,000 LEAF. The average is weighted by how long each balance was held during the UTC day.

  • Only individual trader and holder wallets count. Treasury, liquidity-pool, exchange and burn addresses are excluded from eligibility and eligible supply.
  • Each wallet is assessed separately. Transfers change its balance from the time of transfer; balances and holding history are not combined across wallets.
  • Buying just before midnight counts only for the time actually held. There is no separate requirement to hold continuously for 24 hours.

Illustrative example: holding 200,000 LEAF for 12 hours and zero for the other 12 hours gives a daily average of 100,000 LEAF. Holding 100,000 for only half the day gives an average of 50,000 and does not qualify.

How daily earnings work

At 00:00 UTC, Leaf closes the previous 24-hour period. The daily record captures time-weighted wallet balances and the ETH fees collected during that same period.

Your daily earned allocation

daily average = sum(balance × seconds held) / 86,400
holder allocation = daily ETH fees × 80%
your earned ETH = (your eligible daily average / total eligible daily averages) × holder allocation

Only qualifying wallets enter the denominator. Each day’s fees are allocated once. Earned allocations are saved for their wallets, never redistributed to later holders. No trading fees means no new fee-funded allocation for that day. If no wallets qualify, no wallet allocation can be calculated; treatment of that day’s holder portion must be specified before launch.

Earn, sell, claim later: illustrative example

  1. Monday’s trades collect 10 ETH in fees. At Tuesday’s 00:00 UTC close, 8 ETH goes to holder allocations and 2 ETH to the builder treasury.
  2. Alice’s qualifying daily average is 1% of the total eligible daily averages. She earns 0.08 ETH.
  3. Alice sells her LEAF on Tuesday. Monday’s 0.08 ETH remains claimable.
  4. She claims the following week. Her quote determines the net SayGM credit, with up to $200 assigned to each new key. Any allocation not claimed stays available for another claim.
  5. She uses the key later. Under the planned Leaf policy, selling or waiting does not expire her credit; a revoked key can no longer be used. Provider terms still apply.

What happens after selling?

Selling LEAF affects subsequent earnings. Your previous allocations remain claimable. A sale changes your average balance for the day in progress and later days. It does not change completed daily allocations or unused credit on active keys.

Claim from the wallet that earned the allocation, even if its current LEAF balance is zero. Transferring tokens does not transfer past allocations.

How to claim

Saved daily allocations accumulate. The planned claim flow combines several days in one claim, with a maximum of $200 in SayGM credit per new key. Each claim creates a separate key; it does not top up an existing one.

  1. Connect the earning wallet and choose from its unclaimed allocations.
  2. Review the included days, daily averages, recorded fees, claimable ETH, conversion quote and net credit. Amounts above the $200 key limit remain claimable through additional claims.
  3. Authorize the claim with a gasless EIP-712 wallet signature. No token approval or transfer is required. Verify the signing domain, chain, amounts, nonce and deadline before signing. Claim signing will become available with claims.
  4. Allow a few minutes for conversion and key setup, then copy the key shown once. Delivery time is a target, not a guarantee.

A failed claim must be retryable without losing its allocation or issuing duplicate credit. There is no daily claim deadline. Review the ETH amount and net SayGM credit in your quote before signing. Claims provide AI credit, not cash or ETH withdrawals.

Holder-specific key issuance, isolated spending limits, funding and revocation still need validation with SayGM. Its public docs describe keys linked to account credit; they do not establish Leaf’s $200-per-key claim mechanism. Leaf must verify credit isolation before distributing funded keys. No live claims are available yet.

Join early access ↗

Use and protect your key

The planned spending-limited SayGM key is for coding assistance, document summarization and applications built with model APIs. Model pricing determines how far the balance goes.

Keep your key private. Revoke it if exposed.

Save the key when it is shown. Store it in an environment variable or secret manager, never in source control, browser code, screenshots or shared messages. Anyone with the key can spend its accessible credit. Keep real keys in your local tool configuration.

Leaf plans to let you revoke an issued key from the app to stop further use. Revocation does not undo previous spending. Review usage before revoking a key; handling of unused credit after revocation must be confirmed before launch. For a key you created directly with SayGM, use its key management guide.

Leaf’s intended policy has no daily credit expiry: unused credit on active keys remains available until spent, subject to validated SayGM terms. Model requests go directly from your tool to SayGM, so Leaf would not receive your prompts or responses on that path. SayGM and the selected upstream provider’s data policies apply. Read SayGM’s privacy model before sending sensitive data.

API request and balance examples

These examples use real SayGM endpoints, but the key and model placeholders are inert. Replace them only in your local environment with authorized credentials and an available model. Requests with a funded key can incur charges. Placeholder keys cannot authenticate with SayGM.

First request

Follow the SayGM quickstart. Choose an exact model ID with available set to true for the required API shape; availability can change before a request runs.

export GM_API_KEY="leaf_key_not_configured"

curl -fsSL 'https://api.saygm.com/v1/models?api_shape=chat.completions'
export GM_MODEL="replace-with-available-chat-model-id"

curl --fail-with-body https://api.saygm.com/v1/chat/completions \
  -H "Authorization: Bearer $GM_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{
    \"model\": \"$GM_MODEL\",
    \"messages\": [
      { \"role\": \"user\", \"content\": \"Explain this code in one paragraph.\" }
    ]
  }"

TypeScript request

Run server-side or in a local Node.js process, never in browser code.

const apiKey = process.env.GM_API_KEY
const model = process.env.GM_MODEL
if (!apiKey || !model) throw new Error('Set GM_API_KEY and GM_MODEL')

const response = await fetch('https://api.saygm.com/v1/chat/completions', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model,
    messages: [{ role: 'user', content: 'Review this pull request.' }],
  }),
})

if (!response.ok) {
  throw new Error(`SayGM request failed: ${response.status}`)
}

console.log(await response.json())

Check spendable credit

curl --fail-with-body https://api.saygm.com/v1/credits \
  -H "Authorization: Bearer $GM_API_KEY"

# Illustrative response:
# {"object":"credit_balance","balance":{"usd":"12.345678901","nano_usd":12345678901}}

SayGM’s credit balance endpoint returns the current spendable prepaid balance for the authenticated key. Keep balance.usd as an exact decimal string. This response does not provide a per-key limit, lifetime usage, reset policy or expiry date. Do not treat an account-backed balance as proof of an isolated holder allowance. Use the SayGM usage dashboard for activity and spending. A 503 balance response means unavailable, not zero credit.

Coding tools

Configure Claude Code, Cursor, Pi or Codex CLI to call SayGM directly. Tools using the same key draw from the same accessible credit; they do not each receive a new allowance. Leaf-issued keys remain planned. The examples below require a real SayGM key and a model compatible with each tool’s API shape.

Show coding-tool configuration examples

Claude Code

Use SayGM’s Anthropic-compatible origin without /v1. Follow its Claude Code guide.

export GM_API_KEY="leaf_key_not_configured"
curl -fsSL 'https://api.saygm.com/v1/models?api_shape=messages'
export GM_MESSAGES_MODEL="replace-with-available-messages-model-id"
export ANTHROPIC_BASE_URL="https://api.saygm.com"
export ANTHROPIC_AUTH_TOKEN="$GM_API_KEY"
export ANTHROPIC_API_KEY=""
claude --model "$GM_MESSAGES_MODEL"

Cursor

Open Settings, Models, OpenAI API Key and enable Override Base URL. Add an available chat.completions model as a custom model if needed. See the Cursor guide.

OpenAI API Key: your SayGM key (not a placeholder key)
Override Base URL: https://api.saygm.com/v1
Model: an available chat.completions model ID

Pi

Add a custom SayGM provider to ~/.pi/agent/models.json. Merge it with existing providers; do not overwrite unrelated settings. Replace the model placeholder in both the file and command. Check the model’s context and output limits rather than relying on Pi’s defaults. See Pi’s custom model reference.

{
  "providers": {
    "saygm": {
      "baseUrl": "https://api.saygm.com/v1",
      "api": "openai-completions",
      "apiKey": "$GM_API_KEY",
      "models": [{ "id": "replace-with-available-chat-model-id" }]
    }
  }
}
export GM_API_KEY="leaf_key_not_configured"
pi --provider saygm --model replace-with-available-chat-model-id

Codex CLI

Point Codex at SayGM’s OpenAI-compatible base URL and choose a Responses-compatible model. This follows SayGM’s Codex CLI guide.

export GM_API_KEY="leaf_key_not_configured"
curl -fsSL 'https://api.saygm.com/v1/models?api_shape=responses'
export GM_RESPONSES_MODEL="replace-with-available-responses-model-id"
export OPENAI_BASE_URL="https://api.saygm.com/v1"
export OPENAI_API_KEY="$GM_API_KEY"
codex --model "$GM_RESPONSES_MODEL"

Keep keys in environment variables, secret managers or protected user-level settings, never project files. Tool configuration can change; check the linked guides and your effective provider before sending requests. These configurations have not been tested with a funded Leaf-issued key.

Builder funding and buybacks

Twenty percent of LEAF trading fees is intended to support developers building on Robinhood Chain through funding, hackathons and incubation.

Buybacks and burns

Of the revenue Leaf receives under agreements with supported projects, 100% is intended for LEAF buybacks and burns. Each project’s revenue-sharing terms are negotiated separately. This revenue is separate from the 80/20 trading-fee split. No additional buyback allocation is announced for inference margin.

Support depends on treasury resources. Builder applications, buyback updates and execution references will need verified official links before launch.

Common questions

Do I need to trade to earn?

No. A qualifying daily average holding is enough. Trading activity across LEAF funds the pool.

Do I need to hold continuously for 24 hours?

No. Eligibility uses your balance averaged over the entire UTC day, with a 100,000 LEAF minimum average per wallet. Short holdings contribute only for their duration.

What if I sell?

Completed daily allocations stay yours. A sale affects your average for the current and subsequent days. Claim from the earning wallet, even with zero LEAF remaining.

Do allocations or credits expire?

The planned Leaf policy has no daily claim deadline or daily credit expiry. Unused credit on active keys would remain available until spent, subject to validated SayGM terms. Revoking a key stops its use.

Can I combine balances across wallets?

No. Each wallet qualifies and earns independently; transferring tokens does not transfer past allocations.

Can I withdraw cash or ETH?

No. The planned claims provide SayGM AI credit, not cash or ETH withdrawals for holder allocations.

Does Leaf see my prompts?

In the planned direct-key flow, requests go from your tool to SayGM, not through Leaf. SayGM and the selected upstream provider’s data policies apply. The current simulator sends no prompts.

Why did my estimated claim value change?

Your earned ETH amount stays recorded, but ETH prices, liquidity and conversion costs affect the dollar credit available when you claim.

Transparency and risks

The planned public records let holders check daily accounting inputs and treasury activity. They will be published with the protocol launch.

  • Daily records: UTC period, block references, time-weighted eligible balances, excluded addresses, total eligible averages and collected ETH fees.
  • Treasury records: fee inflows, the 80/20 split and transaction references. Holder claim records are not part of the planned public protocol data.
  • Credit value varies with trading activity and conversion. AI credit is consumable access, not a guaranteed cash return. Token prices can fall and holders can lose their investment.
  • Network, conversion, SayGM and model-provider availability can delay delivery or usage. Model prices and access terms can change.
  • Wallet accounting, claim authorization, retry safety, key funding and isolated limits require implementation and validation before launch. The $200 limit and no-expiry policy are Leaf requirements, not confirmed SayGM features.

The token, contracts, claims and provider integration are in development. No security certification or official Robinhood partnership is implied.

SDK and developer reference

@leafcredit/sdk is available on npm as version 0.1.0-alpha.0. It detects local coding tools, reviews and applies SayGM configuration, and reads spendable credit. It requires Node.js 22.13 or newer, ESM, and macOS or Linux for local configuration.

The SDK does not proxy inference, issue or fund keys, or process wallet claims. Cursor desktop uses manual setup instructions; Pi, Codex and Claude Code support local configuration.

Install

npm install --save-exact @leafcredit/sdk@alpha

Review and configure

Load GM_API_KEY securely into the tool’s environment and choose an available model. Configuration starts with a dry run. Applying changes requires its matching review token. The configuration stores the environment-variable name, not the key value.

import { Leaf } from '@leafcredit/sdk'

const leaf = new Leaf()
const input = {
  harness: 'codex' as const,
  model: 'replace-with-available-responses-model-id',
  apiKeyEnv: 'GM_API_KEY',
}

const preview = await leaf.harness.configure(input)
console.log(preview.changed, preview.instructions, preview.conflicts)

// Apply only after reviewing changes and resolving conflicts.
const result = await leaf.harness.configure({
  ...input,
  dryRun: false,
  review: preview.review,
})
console.log(result.outcome)

The alpha API may change. Refer to the maintained SDK guide for supported tools, credit reads, configuration status, removal and API details.