First job from an agent
Give a program an agent key and connect it over MCP, or let it pay one generation over x402 from its own wallet.
A program pays for Shader in one of two ways. With an agent key, it spends a wallet's credits inside caps the program enforces, and can rent GPUs as well as generate. With x402, it pays each generation in USDC from its own wallet, with no account and no key.
| Agent key | x402 | |
|---|---|---|
| Who pays | The wallet that made the key, from its credits | The agent's own wallet, per request |
| What it can buy | Rentals and generations | Generations |
| Limits | Per-request and per-day caps on chain | The price of each request |
| How it calls | The MCP server, the CLI, the SDK or the API, with a bearer token | The four /x402/generate endpoints, or the SDK with a wallet signer |
| Receipts | Under the wallet, filtered by key | Under the payer's wallet, kind x402 |
#With an agent key over MCP
Make the key
On Agents, create a key with a name and two caps in credits, sign, and copy the token. It is shown once. Create an agent key walks through it.
Connect the client
Add the server at
https://api.shader.win/mcpto your MCP client with the token as a bearer token:{ "mcpServers": { "shader": { "url": "https://api.shader.win/mcp", "headers": { "Authorization": "Bearer shdr_<YOUR_AGENT_TOKEN>" } } } }Work
The agent calls
get_balance, thenrent_gpuorgenerate. Every charge settles on chain against the key. Use the MCP server lists the eight tools.
A coding agent can learn the CLI and the MCP server from the skill.
#With x402 from a bare wallet
Fund a wallet
Put USDC in a Solana wallet. It needs no SOL: Shader pays the transaction fee.
Ask, pay, retry
Call a generation endpoint, read the price from the 402 answer, and retry with a signed USDC transfer in
PAYMENT-SIGNATURE. The 200 carries the job and its file.
Pay over x402 runs the whole exchange with a script, and the SDK does it in one call.