# How to add AI to your app.

URL: https://antideploy.com/blog/how-to-add-ai-to-your-app

Your app can call hundreds of AI models with one key. You pay from a prepaid wallet in rupees, so there is no foreign card and no surprise bill.

## At a glance

- **Hundreds of models**: OpenAI, Anthropic, Google, Meta and more
- **One key**: Saved straight into your app
- **A rupee wallet**: Top up by UPI or card
- **A ceiling by design**: When it is empty, the key stops

Published 7 October 2026. Facts checked 7 October 2026. 3 min read.

## 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.

### 1. 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.

### 2. 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.

### 3. 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.

**Node**

```
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

## AI questions, answered.

Anything else? Write to us and a person answers.

[support@antideploy.com](mailto:support@antideploy.com)

### Do I need an OpenRouter account?

No. Antideploy issues the key and pays for it from your prepaid wallet. You need no OpenRouter account and no foreign card.

### Can I use my own provider key instead?

Yes. Use any provider's key as an ordinary secret in your environment variables. Antideploy does not get in the way.

### Why did a key say "Key limit exceeded" when the wallet has money?

The wallet is shared across your keys, and each key's share follows recent use, updated about once a minute. A key can need a minute to catch up. A busy app should use one key rather than several.

### Can my agent add money?

No. It can create and revoke keys and tell you the top-up link, but only you can add money.

### Can a runaway loop drain my money?

It can only spend what the wallet holds. Together the keys can never spend more than the wallet, so a loop stops when the money does.

## More guides, and the platform.

Each platform page covers one part of Antideploy: what it does, where it stops and the questions people ask. [See the whole platform](https://antideploy.com/platform), or [all the guides](https://antideploy.com/blog).

- [How to set environment variables and secrets](https://antideploy.com/blog/how-to-set-environment-variables-and-secrets): Encrypted and write-only. What you set, what is filled in for you, and how a change reaches the app.
- [How to deploy a Gradio app](https://antideploy.com/blog/how-to-deploy-a-gradio-app): Your entry file is found and run with python. Launch on 0.0.0.0 and PORT, and mind the 1 GB of memory.
- [Is Antideploy free? What happens at the limit?](https://antideploy.com/blog/is-antideploy-free): Yes, there is a Free plan. What it includes, what happens at each limit, and what paid plans cost.

- [AI models](https://antideploy.com/platform/ai-models)
- [Environment variables](https://antideploy.com/platform/environment-variables)
- [Deployments](https://antideploy.com/platform/deployments)
- [Agent API](https://antideploy.com/platform/agent-api)

Facts on this page were checked against the live platform on 7 October 2026.

## Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

To set this up, give your coding agent this sentence:

```text
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
```
