# AI Accounting
**Turn receipt photos and notes into a multi-currency Markdown ledger. The AI drafts each entry, you check it, then it is saved.**
[中文说明 →](README.zh.md) · [日本語](#日本語)
## What it does
- **Reads receipts and notes for you.** Drop a photo or a note into an inbox folder, or run a command on the current note; receipts embedded in the note are read too. An AI service fills in date, shop, category, amount, currency and payment method.
- **Never writes a guess straight into your books.** Every result waits as a draft until you check it. Closing the dialog keeps the draft; nothing is entered until you confirm.
- **Keeps the books as plain Markdown.** One table per month in your vault, readable and editable without the plugin.
## Start here
1. Install and enable **AI Accounting**, then click the pie-chart icon in the left ribbon.
2. On an empty ledger, click **Load samples**. Three made-up rows appear (a purchase, a fare and a refund), marked as samples; **Remove samples** deletes them.
3. Click **Add** to record your own expense by hand. No AI service is needed for that, or for charts, budgets and CSV export.
4. To read receipts, open **Settings → AI Accounting → AI services → Add service**. DeepSeek is suggested first; pick another service if you like, choose your key, then click **Test**.
## What it needs and what it costs
| | |
|---|---|
| Obsidian | 1.13 or later, desktop and mobile |
| The plugin | Free, MIT licence. No account, no server of ours, no analytics. |
| AI model | Optional. You use your own key and pay your AI provider for what you send; the plugin adds nothing. A receipt is usually a few thousand tokens. Local models through an OpenAI-compatible server cost nothing. |
| Exchange rates | Free, from `frankfurter.app`, cached in the plugin folder |
## Where your data goes
| What | Sent to | When |
|---|---|---|
| The receipt image or note text you process, and the images that note embeds | The AI services you set up, in the order listed | When you run the command, or as soon as a file lands in an inbox folder |
| Currency pair and date (nothing else) | `frankfurter.app` | When a row's currency differs from the report currency |
| A request for the model list, then a tiny "reply with ok" request | The service you are testing | Only when you click **Test** (or **Fetch list**, which sends only the model-list request) |
The plugin makes no other network requests.
- **API keys** live in Obsidian's secret storage on this device. The plugin's settings file keeps only the key's name, so keys are not synced with your vault: on a new device, choose the key again in settings.
- **Ledgers, drafts and settings** stay in your vault (`Finances/YYYY-MM.md` and the plugin's `data.json`).
- **Inbox folders send right away.** While an inbox folder is set, every image or text file put in it goes to the AI service at once. Leave the folder empty to turn this off.
- **Several services may see one receipt.** If the first service fails, the next enabled one is tried. Keep only services you trust in the list.
- **Diagnostics** (the copy button next to **Test**) contain the service, address, model, step and error, but no key and no ledger content.
- **Clipboard:** that copy button is the plugin's only use of the clipboard. It writes the diagnostics when you click it, and the plugin never reads the clipboard.
## Recording