Skip to main content
In this quickstart, you’ll route your first AI request through Lava’s AI Gateway to track usage and costs. Routing through Lava is just a REST POST request — you swap the base URL and auth header, and everything else stays the same.
Building with an AI agent? See the Agents guide for how to do this programmatically from code.
1

Get Your Secret Key

Use your existing secret key (aks_live_...). Secret keys are enabled on request: email support@lava.so to get API access for your account.
New developer Secret Key creation is temporarily paused for all accounts, including automatic creation through the dashboard and SDK/CLI login. Existing keys continue to work. This quickstart requires an existing key.
2

Make Your First Request

Use your secret key in the Authorization header. The request body stays unchanged from the provider’s API.
3

See Your Request

List your recent requests. Lava records the token counts, cost, model, and provider of each one automatically.
Each gateway response also carries an x-lava-request-id header, so you can match a response to its record.See the Forward Proxy guide for multi-provider examples, streaming, error handling, and advanced configuration.

What’s Next?

Supported Providers

Browse every provider you can reach through the gateway

How Lava Works

Understand Lava’s architecture, gateway routing, and key concepts

Troubleshooting

Secret keys are enabled on request. Email support@lava.so to get API access for your account.
Verify you included the Bearer prefix in the Authorization header and that your secret key matches the one in your dashboard. See the Forward Proxy troubleshooting for more details.
Your Lava wallet needs funds. Go to Wallet > Billing to add a payment method.
Using your secret key directly is the simplest way to get started, and costs are charged to your Lava wallet. To use your own provider API key instead of Lava’s managed keys, send a forward token: a base64-encoded JSON that bundles your secret key with a provider_key. See the Forward Proxy guide and SDK reference for details.