# Arlu Arlu is a credit for AI on Elysium (chain ID 99901). One credit pays for one dollar of model usage. Every credit is backed by one USDC held in an onchain vault. Credits stay in the holder's wallet until they are spent. ## How an agent uses Arlu 1. Hold credits. Deposit USDC into the vault and receive the same number of credits, or receive credits from another wallet. Credits are an ERC-20 token with 6 decimals. 2. Set a limit. Approve the vault to take up to a number of credits from the wallet. The gateway can never take more than this. Set it to 0 to stop all spending. 3. Create a key. GET /v1/auth/nonce, sign the message below with the wallet, POST it to /v1/keys. No gas, no email, no account. 4. Call a model. The API follows the OpenAI chat completions format. ## API Base URL: https://api.arlu.io/v1 Auth: Authorization: Bearer POST /v1/chat/completions Send messages to a model. Supports stream: true. GET /v1/models Models and prices in dollars per token. One dollar is one credit. GET /v1/balance Balance, allowance, pending and spendable credits for the key's wallet. GET /v1/usage Spend by model and the most recent requests. GET /v1/keys List keys on the wallet. DELETE /v1/keys/{id} Revoke a key. GET /v1/stats Public totals. No key needed. ## Key creation message Sign this exact text with personal_sign. The wallet address is lower case. Arlu wants you to create an API key. Only sign this on https://arlu.io Wallet:
Chain ID: 99901 Nonce: Issued At: Then POST /v1/keys with JSON: {"wallet", "nonce", "issuedAt", "signature"}. The key is returned once. ## Rules to know - Always set max_tokens. Before a request runs, its highest possible cost must fit inside the spendable credits. With no max_tokens the cap is 2,048 output tokens. - A request that does not produce a reply costs nothing. - 402 insufficient_credits means the balance or the limit is too low. Read "required" in the error. - 429 rate_limited means more than 120 requests in a minute on one key. - Credits can be redeemed for USDC at the vault at any time, minus a 0.5% fee. ## More Docs: https://arlu.io/docs Vault and contract addresses: https://arlu.io/vault