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

# Add AI inside your app with Mythex

> Chat, summaries, or generation in the product you publish — using your own provider keys, not Mythex builder credits.

# Add AI inside your app with Mythex

This is **AI as a feature of the app you ship** (a support chatbot, summarizer, generator). It is separate from the Mythex coding agent.

<Note>
  Provider usage bills **your** OpenAI / Anthropic / other account. Store keys in [project secrets](/features/env-and-secrets). Never expose them to the browser.
</Note>

## When this is a good fit

* The product needs chat, classify, or generate-from-text
* You already have (or can create) a provider API key
* You can keep the first version to **one** AI action (e.g. “summarize this ticket”)

Skip this if you only needed Mythex to *build* a normal site — you don’t need an LLM in the published app.

## What you’ll have

* A UI (chat panel, “summarize” button, etc.)
* A **server-side** call using a secret env var
* Optional: save threads in a [database](/features/database)

## Starter prompt

```text theme={null}
Add a simple chat UI that calls [PROVIDER] using secret [ENV_NAME] on the server.
Stream responses if straightforward. Never expose the key to the browser.
Keep Mythex builder chat separate from this in-app chat.
```

More detail: [Add AI features with your own API keys](/recipes/add-ai-to-your-app).

## Build it

1. Create the key at your provider and add it in [project secrets](/features/env-and-secrets) (or via [secrets in chat](/features/secrets-in-chat)).
2. Prompt for **one** feature. RAG, tools, and multi-model routers can wait.
3. Confirm in Preview that the key never appears in client-side code.
4. `/test` send a message → a response appears (you’ll need the secret set).
5. [Publish](/publish/how-to-publish) — published apps need the same secrets available at runtime.

## Honest limits

* Mythex does not include a built-in “app AI” SKU with included tokens for *your users*
* No native knowledge-base product — you bring data and the API
* Rate limits, safety, and cost controls are yours to design

## Related

* [Use cases](/use-cases/overview)
* [Add AI to your app](/recipes/add-ai-to-your-app)
* [Integrate any API](/recipes/integrate-any-api)
* [Environment variables and secrets](/features/env-and-secrets)
