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

# Add a Model

> How to add a new AI model or expose an existing provider model in the UI

# Add a New AI Model

Adding a model is usually quick. You're not rewriting the whole app -- you're plugging into an existing system.

## The Process

<Steps>
  <Step title="Check provider support">
    Make sure the provider is already supported in the repo (OpenAI, Anthropic, Google, Groq, xAI, DeepSeek, Replicate). If it's a new provider, you'll need to add it first.
  </Step>

  <Step title="Add the provider API key">
    Set the provider's API key in your `.env.local` file if you haven't already.
  </Step>

  <Step title="Choose the right registry">
    Not every model lives in the same file:

    * `lib/ai/models.ts` -- shared chat/text model registry
    * `app/(apps)/image-studio/lib/models.ts` -- Image Studio catalog
    * `app/(apps)/video-studio/lib/models.ts` -- Video Studio catalog
  </Step>

  <Step title="Answer these questions about your model">
    Before you expose it in the UI, think through:

    * Does it support text?
    * Does it support vision (image input)?
    * Does it support browsing/web search?
    * Does it support thinking/reasoning controls?
    * Should it be free or credit-gated?

    These answers affect the user experience just as much as the model name.
  </Step>

  <Step title="Test in Chat first">
    The Chat app is the best place to verify a new model works. Test streaming, tool usage, and any special capabilities.
  </Step>

  <Step title="Expose in other apps (if it fits)">
    Only add the model to other apps (Image Studio, Vision, etc.) if it actually fits those workflows. Not every model belongs everywhere.
  </Step>
</Steps>

## The Main Files

* `lib/ai/models.ts` -- shared chat/text model catalog
* `app/(apps)/image-studio/lib/models.ts` -- image generation catalog
* `app/(apps)/video-studio/lib/models.ts` -- video generation catalog

Start with the catalog that matches the app surface you are changing.

## Common Mistakes

<Warning>
  Watch out for these pitfalls when adding models:

  * **Forgetting the provider key** -- you added the model name but didn't set the API key
  * **Wrong capability flags** -- exposing a text-only model in a vision flow
  * **Assuming shared capabilities** -- just because one model from a provider supports browsing doesn't mean they all do
  * **Too many similar models** -- exposing 5 variations of the same model makes the UI harder to use, not better
</Warning>

<Tip>
  When in doubt, start with fewer models and expand later. A clean model picker with 4-5 great options beats a cluttered dropdown with 15 confusing choices.
</Tip>
