Building with an AI agent? See the Agents guide for how to do this programmatically from code.
Get Your Forward Token
Go to Developers > Secrets in your dashboard and copy your secret key. Then create a forward token — a base64-encoded JSON containing your secret key:
- Bash
- TypeScript
A forward token with only a
secret_key charges your own merchant wallet — no customer or meter required. This is the simplest way to get started. Learn more in the Forward Proxy guide.Make Your First Request
Your forward token goes in the
Authorization header, and the request body stays unchanged from the provider’s API.- cURL
- TypeScript
Check the Dashboard
Go to Analytics > Requests in your dashboard. Find your request by timestamp or request ID to see token counts, cost breakdown, model, and provider — all captured automatically.See the Forward Proxy guide for multi-provider examples, streaming, error handling, and advanced configuration.
What’s Next?
Charge Your First Customer
Set up pricing and checkout to monetize your AI service
How Lava Works
Understand Lava’s architecture, gateway routing, and key concepts
Troubleshooting
Where is my secret key?
Where is my secret key?
Go to Gateway > Secrets. If the section is missing, verify you’re logged into a merchant account (not a wallet-only account).
401 Unauthorized
401 Unauthorized
402 Insufficient Balance
402 Insufficient Balance
Your Lava wallet needs funds. Go to Wallet > Billing to add a payment method.
What's the difference between a secret key and a forward token?
What's the difference between a secret key and a forward token?
A secret key is your base credential. A forward token is a base64-encoded JSON that always includes your
secret_key. With just the secret key, costs are charged to your merchant wallet. For customer billing, add a customer_id and meter_slug to the token to charge the customer’s wallet with your pricing. See the SDK for generating per-customer tokens.