> For the complete documentation index, see [llms.txt](https://tribalfs.gitbook.io/accountant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tribalfs.gitbook.io/accountant/ai-accountant/setting-up-ai.md).

# Setting up AI Accountant

Choose an on-device or cloud AI provider for AI Accountant, receipt reading and insights.

**What you'll do:** pick an AI provider so you can chat with AI Accountant, read receipts with AI, and see AI insights on Home.

AI is optional. Without it, everything else in Accountant works, and receipts use a basic on-device reader.

## Choose a provider

Open **Settings › AI features › AI provider**.

<figure><img src="https://1159945679-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8bd5VZpQZgURnFb41Grh%2Fuploads%2Fgit-blob-d140339ec7a3d14cd66597a3a65ba53d61e421e0%2Fai-provider.png?alt=media" alt="AI provider" width="300"><figcaption><p>Choosing an AI provider</p></figcaption></figure>

| Provider                        | Where it runs | You need                                                                       | Good to know                                                                                                                                       |
| ------------------------------- | ------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| **On-device: downloaded model** | Your phone    | A 64-bit phone with enough memory, and space for a model download (several GB) | Private and free. *Limited capabilities; performance depends on your device.* Replies can take a few minutes on some phones. Can't search the web. |
| **Cloud: Gemini**               | Google        | A Gemini API key                                                               | Fast and capable. Uses your Google AI account.                                                                                                     |
| **Cloud: OpenAI**               | OpenAI        | An OpenAI API key                                                              | Fast and capable. Choose the **OpenAI model**.                                                                                                     |
| **Cloud: Claude**               | Anthropic     | A Claude API key                                                               | Fast and capable. Choose the **Claude model**.                                                                                                     |
| **Off**                         | —             | —                                                                              | AI features are turned off.                                                                                                                        |

## Set up an on-device model

1. Choose **On-device: downloaded model**.
2. Tap **On-device model** and pick one: **Gemma4 2B IT** or **Gemma4 4B IT**.
3. Tap **Download model**. The first time, Google Play first adds **On-device AI**, the part of the app that runs models (*Downloading on-device AI*). Then the model downloads in the background (*Downloading… 45%*). Use Wi-Fi: the files are large.
4. When it shows **Ready to use**, you're done.

If the connection drops, the download waits and then carries on where it stopped. If you already have a model but not the on-device AI part, the row reads **Download on-device AI**.

{% hint style="info" %}
**Which phones can use it?** On-device AI needs a 64-bit phone. **Gemma4 2B IT** needs a phone with about 6 GB of memory, and **Gemma4 4B IT** about 8 GB. Models your phone can't run aren't listed, and if none fit, the on-device provider isn't offered.
{% endhint %}

**Processor** is set to **Automatic**, which uses the GPU if it gives accurate results on your phone and the CPU otherwise. You can force **GPU** or **CPU**. To free up space later, use **Delete downloaded model**.

## Set up a cloud provider

1. Create an API key with the provider:
   * **Gemini:** in Google AI Studio
   * **OpenAI:** in the OpenAI platform dashboard
   * **Claude:** in the Claude Console at console.anthropic.com
2. In Accountant, choose **Cloud: Gemini**, **Cloud: OpenAI** or **Cloud: Claude**.
3. Tap **Gemini API key**, **OpenAI API key** or **Claude API key**, and paste the key.
4. For OpenAI and Claude, tap **OpenAI model** or **Claude model** and pick one. The list comes from the provider, so it includes their latest models.

A cloud provider can also search the web for you. [Bank details](/accountant/accounts/bank-details.md) uses this to **Look up** a bank's published rates and fees. Your provider may charge extra for web searches.

{% hint style="warning" %}
**Costs and privacy.** Cloud providers bill your account with them, so check their pricing and usage limits. When you use an AI feature, the app sends what that feature needs, such as your question, the ledger figures the AI looks up, or a receipt's picture and text, **only to the provider you chose**. Your key is stored only on your phone, encrypted. Read more in the [Privacy Policy](/accountant/agreements/privacy-policy.md).
{% endhint %}

## Automatically add missing accounts

**Automatically add missing accounts:** when no account or category fits a transaction drafted from a chat or a scanned receipt, AI may add one as a **Draft**. Draft accounts become regular accounts once you post the transaction that uses them.

## Common messages

| Message                                                                                      | What to do                                                                                        |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| *The AI provider didn't accept your API key.*                                                | Check the key in AI settings.                                                                     |
| *Your AI provider account has no credits left.*                                              | Add credits in the provider's billing settings.                                                   |
| *The AI provider's usage limit has been reached.*                                            | Wait for the limit to reset, or choose another provider.                                          |
| *The AI provider is busy right now.*                                                         | Try again shortly.                                                                                |
| *This request is too long for the local model.*                                              | Ask a shorter question, or choose another model.                                                  |
| *Couldn't download on-device AI. Try again later.*                                           | Check your connection and try again.                                                              |
| *Not enough storage to download on-device AI.*                                               | Free up some space, then try again.                                                               |
| *Web search is off for this Claude account. Its admin can turn it on in the Claude Console.* | Ask your Claude organization's admin to allow web search, or use Gemini or OpenAI for the lookup. |

Next: [Using AI Accountant](/accountant/ai-accountant/using-ai-accountant.md).
