The short answer
To add AI to your app, tell your connected coding agent to create an AI key. It saves the key into your app's environment as OPENROUTER_API_KEY. You add money to a prepaid wallet in your browser, by UPI or card, and your agent redeploys so the app can call models. The key works with any OpenAI-compatible client. When the wallet is empty, the key stops.
Say this to your coding agent
Add an AI chat feature to this app and create the key it needs.
If your agent is not connected yet, paste this first: Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
What your agent does, and what you do
Your agent creates the key, saves it into the app's environment, and gives you the top-up link. It can also revoke keys.
You add money to the wallet in your browser. Only you can. An agent can never spend your money by itself.
-
Your agent creates a key for your app
It is saved into that app's environment, so there is nothing to copy. A key is shown once, or saved into the app, and never shown again.
-
You top up the wallet
Open Settings, then Billing, and add money by UPI or card. A top-up is ₹100 to ₹10,000 and carries a 15% fee that is shown before you pay.
-
Your agent redeploys
A redeploy builds the last version again with the new variable, so the app can call models.
How your code calls a model
Point any OpenAI client at OpenRouter's base address, pass your key, and name the model with its OpenRouter id. Change the id to change the model.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://openrouter.ai/api/v1",
apiKey: process.env.OPENROUTER_API_KEY,
});
const reply = await client.chat.completions.create({
model: "openai/gpt-4o-mini",
messages: [{ role: "user", content: "Say hello" }],
});
# Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key=os.environ["OPENROUTER_API_KEY"],
)
How the wallet works
- Usage is charged at OpenRouter's price for the model your app used, converted to rupees at the rate shown in your wallet
- Wallet money does not expire, and top-ups are non-refundable except where the law requires it
- When the wallet runs out, your keys stop working until you add more
- Pro and Scale include ₹100 of AI credit each month