> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kelviq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up with AI

> Hand billing to your AI coding agent with a prompt generated from your Kelviq account

**Settings → Set up with AI** writes a prompt for your coding agent. Paste it into Claude Code, Codex, VS Code, Windsurf, Cursor, Lovable, Replit, Bolt, Emergent, or any agent that can edit files and run commands, and the agent integrates Kelviq into your app.

It asks before changing anything in Kelviq and never needs your keys in the chat. Start in sandbox: your agent builds and tests with test cards, and when everything works, one command copies your catalog to production.

![The Set up with AI page](https://mintcdn.com/kelviq/3OQ0BqRza7kbMC64/images/set-up-with-ai-integrate.webp?fit=max\&auto=format\&n=3OQ0BqRza7kbMC64\&q=85\&s=ad6ad051f2920ea9e88a374d2d374e7c)

## Two ways to start

**Integrate with my app** is for a catalog you have already built. The agent connects the plans you have published: it adds a checkout route, a billing portal route, feature checks, and a webhook route that verifies signatures. If your app has a public URL, it registers the webhook too.

**Set up everything** is for a new product. The agent reads your app and your requirements, proposes plans, prices, limits, license keys and discount codes, and shows you what it will create. Nothing is created in Kelviq until you approve. It then builds the integration the same way.

![The Set up everything path, with approval steps before anything is created](https://mintcdn.com/kelviq/3OQ0BqRza7kbMC64/images/set-up-with-ai-everything.webp?fit=max\&auto=format\&n=3OQ0BqRza7kbMC64\&q=85\&s=fe7bef4501a212432d945f534741ce7d)

## Steps

1. **Add your keys to the project.** Click **Copy for your .env file** and paste the block into your project's `.env.local` or `.env`, or into your app builder's secrets. The agent reads the keys from the file. Don't paste them into the chat.
2. **Describe what you want (optional).** Plain language is fine: "one plan at \$9/month with license keys, up to 3 devices per key, no free plan". Or add a common request, such as a monthly and yearly toggle or an upgrade button in settings. The agent follows these on top of its defaults and asks if something conflicts.
3. **Give the prompt to your agent.** Click **Copy prompt**, open your agent in your app's project, and paste it as the first message.

The agent checks your keys with the Kelviq CLI without printing them and builds the app. In sandbox, it ends with a test purchase you can try with a [test card](https://docs.kelviq.com/guides/sandbox.md).

## Sandbox or production

The page gives you keys and a prompt for the mode you're in. Start in sandbox, where your agent builds and tests with test cards. When everything works, run [`kelviq promote`](https://docs.kelviq.com/cli/commands#kelviq-promote) to copy your catalog to production, then add the production keys to your hosting settings.

If you open the page in production, it offers **Switch to sandbox**. If you carry on in production, the prompt targets your live account: the agent confirms with you before creating anything and stops at the checkout page instead of paying.

Three things stay with you: [business verification](https://docs.kelviq.com/getstarted/review-process.md) and payouts, production keys in your hosting settings, and a production webhook endpoint.

On Claude Code, install the [Kelviq plugin](https://docs.kelviq.com/guides/agent-toolkit.md) for extra tools. The prompt picks them up automatically.

## Related documentation

* [Agent Toolkit](https://docs.kelviq.com/guides/agent-toolkit.md)
* [MCP server](https://docs.kelviq.com/guides/mcp-server.md)
* [CLI overview](https://docs.kelviq.com/cli/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.