> For the complete documentation index, see [llms.txt](https://docs.papers.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.papers.ai/using-ai/ai-models-and-your-own-model.md).

# Adding and managing models

You need at least one enabled model before the AI panel will respond. Papers AI includes several built-in cloud models, and you can also connect a model you control: one running locally, or a hosted OpenRouter account.

## Enable a model

{% stepper %}
{% step %}

### Open Manage models

Open **Manage models** from the model selector in the AI panel.
{% endstep %}

{% step %}

### Turn a model on

Turn on a built-in cloud model from the **Cloud models** tab, or switch to **Your models** to connect your own.
{% endstep %}

{% step %}

### Select the model in the AI panel

Pick the model you want to use from the selector in the AI panel.
{% endstep %}
{% endstepper %}

## Connect your own model

In **Manage models**, switch to the **Your models** tab. There are two ways to connect a model you control.

{% tabs %}
{% tab title="Local models" %}
Run a model on your own machine with Ollama or LM Studio.

{% stepper %}
{% step %}

### Switch to Local models

In **Your models**, switch to the **Local models** tab.
{% endstep %}

{% step %}

### Enter the server address

Enter your server's address, for example `http://localhost:1234`.
{% endstep %}

{% step %}

### Add an API key (optional)

Add an API key if your server requires one.
{% endstep %}

{% step %}

### Connect

Click **Connect**, then select the model in the AI panel and send a test prompt.
{% endstep %}
{% endstepper %}
{% endtab %}

{% tab title="OpenRouter" %}
Connect a hosted OpenRouter account instead of running a model yourself.

{% hint style="warning" %}
Connecting an OpenRouter account currently requires a **Plus** plan.
{% endhint %}

{% stepper %}
{% step %}

### Switch to OpenRouter

In **Your models**, switch to the **OpenRouter** tab.
{% endstep %}

{% step %}

### Enter your API key

Enter your OpenRouter API key.
{% endstep %}

{% step %}

### Connect

Click **Connect**, then select a model from OpenRouter in the AI panel and send a test prompt.
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
External models run outside Papers AI's control. Responses may be inaccurate or produce unexpected edits.
{% endhint %}

API keys are never written to disk. They clear when you close the tab or disconnect.

{% hint style="success" %}
If privacy is the main reason you're connecting your own model, remember it only covers what you send to the AI. See [Using AI](/using-ai/using-ai.md#privacy) for what that includes.
{% endhint %}

## Things to know

* A separate **Usage** tab in **Manage models** shows your usage against your plan's quota.
* The OpenRouter option is limited to Plus plans; local models aren't.

## Troubleshooting

<details>

<summary>Connection fails</summary>

Check the server address or API key, that your local server is running, and that it allows browser connections.

</details>

<details>

<summary>No models listed</summary>

Refresh the server's model list.

</details>

<details>

<summary>The AI only chats and won't take actions</summary>

Your server or model doesn't support tool use. Try a different one.

</details>

<details>

<summary>Settings don't persist</summary>

Model choice is saved per browser; API keys clear on tab close by design. That's expected, not a bug.

</details>

## Next steps

* [Using AI](/using-ai/using-ai.md)
* [Reviewing AI changes](/using-ai/reviewing-ai-changes.md)
