ANVIL Launch app
Docs

Use ANVIL, step by step

Everything that runs on ANVIL, from the first signature to a GPU over SSH.

Get started

Your wallet is your account. There is no email and no password.

  1. Open the app and press Connect wallet. ANVIL works with MetaMask, Rabby and any wallet your browser offers.
  2. Sign one message. It costs no gas and moves no funds.
  3. The Overview shows your credits, your spend and your running instances.

ANVIL runs on Elysium. When you buy credits, your wallet switches to it, and adds it first if it is new to your wallet.

ANVIL credits

One ANVIL credit pays for $1 of outputs and rentals at their listed prices. At launch a credit costs 0.70 USDC, so everything is 30% off.

  1. Open Billing and pick an amount from 5 to 1,000 dollars. The You get line shows the credits it buys: 5 USDC buys 7.1428 credits.
  2. Press Buy credits and confirm the transfer in your wallet. It goes to the ANVIL treasury, and your wallet pays the gas in HYPE.
  3. The credits show up as soon as Elysium confirms the transfer. Each deposit in your history links to the explorer.

Credits you do not use go back to the wallet that bought them. Open Billing and press Refund my balance. A credit returns at the price you paid for it, in the asset you paid with. A refund takes your whole balance, starts at 1 USDC, and waits while an instance of yours runs.

Make outputs

The Playground makes images, video and voice with ready models. An output takes its credits at the listed price when you press Make, and gives them back if it fails.

  1. Open the Playground and pick a model.
  2. Write a prompt of up to 2,000 characters, or the text of a voice of up to 1,000 characters.
  3. Pick a size: square, wide or tall. A video also takes a length. The price shows before you make it.
  4. Press Make. The output is made in the background, so you can leave the page.
  5. Find it under Outputs, where you can play it and download it. Files are kept for 24 hours.
ModelMakesUnitListed, in credits
Reading the catalog…

A video is priced per 5 seconds, so 10 seconds cost twice the listed price.

Free outputs

A wallet with at least 1,000 $ANVIL makes 50 images and 2 videos free in each UTC day. After that, its outputs take credits.

Rent a GPU

Rent a whole NVIDIA GPU with SSH and Jupyter, billed by the second in ANVIL credits.

ssh-keygen -t ed25519 -f ~/.ssh/anvil -C "anvil" cat ~/.ssh/anvil.pub
  1. Make an SSH key with the commands above and copy the line the second one prints.
  2. Open SSH keys, paste the line, give it a name and press Add key. A wallet keeps up to 10 keys and every new instance takes all of them.
  3. Open the Marketplace and press Rent on a GPU, or Rent the cheapest after setting how much memory you need. A busy GPU charges nothing.
  4. An instance starts when your credits pay for at least 10 minutes of it. Open My instances and wait for running.
  5. Copy the SSH command from the card, add -i ~/.ssh/anvil, and run it. PyTorch and CUDA come installed.
  6. For Jupyter, run the tunnel command and leave it running, then open http://localhost:8888.
  7. Press End instance when you are done. The instance and its 50 GB disk are deleted and its credits stop at that second.

Billing

Billing shows your balance, the price of a credit and your history. Every deposit, output and rental is one line. A rental is one line that grows while its instance runs.

API

Call ANVIL from your own code with an API key. Every request goes to /api/v1 and pays with the credits of your wallet, at the same listed prices.

  1. Open API & x402 and sign in with your wallet.
  2. Give the key a name, and a spend cap per day if you want one, and press Make key.
  3. Copy the key, which starts with avk_. ANVIL shows it once and keeps only its hash.
curl ORIGIN/api/v1/outputs \ -H "Authorization: Bearer $ANVIL_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "flux-schnell", "prompt": "A lighthouse at dusk"}' curl ORIGIN/api/v1/outputs/OUTPUT_ID \ -H "Authorization: Bearer $ANVIL_KEY"
GET /credits?days=7Your balance, and your spend of the last days (1 to 14).
GET /modelsThe models that make outputs now. No key needed.
POST /outputsMakes an image, a video or a voice, paid with your credits, or with x402 and no key.
GET /outputsYour outputs of the last day, newest first.
GET /outputs/{id}One output: making, ready with its file in base64, or failed with its credits back.
GET /outputs/{id}/fileThe file of a ready output itself.
GET /gpusThe GPUs and their rates. No key needed. Add ?vram=48 to see what anvil/auto would pick.
POST /instancesRents a GPU: {"gpu": "RTX 4090"} or {"gpu": "auto", "vram": 48}.
GET /instances, /instances/{id}Your instances, each with its SSH command once it runs.
POST /instances/{id}/terminateEnds an instance. Its credits stop at that second.
GET, POST /ssh-keys, DELETE /ssh-keys/{id}The SSH keys a new instance takes.
GET /receiptsYour receipts.

MCP server

Connect an AI agent to ANVIL once over MCP. The agent then makes outputs and rents GPUs on its own, with the credits of your wallet and inside the cap of its key.

claude mcp add --transport http anvil ORIGIN/mcp \ --header "Authorization: Bearer $ANVIL_KEY" { "mcpServers": { "anvil": { "url": "ORIGIN/mcp", "headers": { "Authorization": "Bearer ${env:ANVIL_KEY}" } } } }

The 14 tools: get_balance, list_models, make_output, get_output, list_outputs, list_gpus, rent_gpu, list_instances, get_instance, end_instance, list_ssh_keys, add_ssh_key, remove_ssh_key, list_receipts.

x402

An agent pays for each output itself with x402: one signature of its own wallet, in USDC on Elysium, with no API key and no account. ANVIL submits the transfer and pays the gas.

  1. Send POST /api/v1/outputs with no Authorization header. ANVIL answers 402, with the price in the header PAYMENT-REQUIRED.
  2. The agent signs a permit for exactly that much USDC (EIP-2612 Permit, spender the ANVIL treasury, token domain USDC, version 1) and sends the same request again, with the payment in the header PAYMENT-SIGNATURE.
  3. ANVIL checks the signature, settles the transfer on Elysium and makes the output. A fast output comes back in the same answer. A slower one answers 202 with its id. The header PAYMENT-RESPONSE names the transaction.
  4. Read GET /api/v1/outputs/{id} with no key until the output is ready.
{ "x402Version": 2, "accepts": [{ "scheme": "exact", "network": "eip155:99901", "asset": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65", "amount": "2937", "payTo": "the ANVIL treasury", "maxTimeoutSeconds": 120, "extra": { "name": "USDC", "version": "1" } }] }

Receipts

Every paid output and every rental writes a receipt: what ran, for how many GPU seconds, and what it cost. Each hour, the receipts of that hour are hashed into a Merkle root, and the root is written into the data of an Elysium transaction.

  1. The leaf is the SHA-256 of the fields id|wallet|kind|ref|what|micro|seconds|ts joined with a bar.
  2. Each step of the proof is hashed with the running hash, smaller value first.
  3. The last hash is the root of the hour, which is the text in the transaction data: anvil:receipts:v1:HOUR:ROOT.

The Receipts page does this in your browser when you press Check. GET /api/receipts/{id}/proof returns the same proof for your own code.

$ANVIL

$ANVIL does two things on the network. Holding 1,000 makes 50 images and 2 videos free each day. Paying with it buys credits that are spent first, and the tokens behind used credits are burned each hour. Unused ones refund as the same tokens.

Run your own

ANVIL is one Node.js 22 program with no dependencies. npm start runs it and npm test runs the end-to-end checks.

TREASURYThe Elysium address that receives deposits and x402 payments.
RUNPOD_API_KEYConnects the GPUs and the model endpoints. Outputs and rentals open when it is set.
TREASURY_SECRETA 32-byte hex private key. Lets the server send refunds, burn $ANVIL, write the hourly root and settle x402 payments.
TOKEN_ADDRESSThe contract of $ANVIL. Turns on paying with it, free outputs and the burn.
RPC_URL, DATA_PATH, MARKUP, SITE_URL, X_URL, GH_URL, ADMIN_KEYThe chain RPC, where the ledger is kept, the rate over provider cost, and links.