---
title: AI Writing and Insights
description: Configure an AI provider, create or rewrite text, and chat with the open note on iPhone
---

Octarine for iPhone can create text at the cursor, rewrite a selection, and answer questions about the note you have open. These tools use a model and API provider you choose.



> Requests use the provider's API and may incur charges from that provider.

## Set Up a Provider

Open **Settings → AI**, then:

1. Choose a provider and enter its API key. Octarine validates the key before saving it.
2. Return to the AI page and open **Selected Model**.
3. Choose a text model from one of the providers you connected.

The iPhone app currently supports OpenAI, Anthropic, DeepSeek, Google Gemini, Groq, Mistral AI, Perplexity, Together AI, and xAI. You can connect more than one provider and switch the selected model at any time. Use the refresh button in the model picker if a newly available model does not appear.

### Custom Providers

To use another OpenAI- or Anthropic-compatible service, such as a gateway, a hosted model, or a model server on your local network, tap **+ Custom** next to **Providers** and fill in:

- **API format:** **OpenAI** or **Anthropic**.
- **Name:** how the provider appears in Octarine.
- **Base URL:** for example `https://example.com/v1` for OpenAI-format endpoints. Leave off the trailing slash. Anthropic-format endpoints add `/v1` automatically.
- **API Key:** required for remote endpoints. You can leave it blank for a local `http://` server.

Tap **Add provider**. Octarine validates the endpoint and loads its models before saving. To connect to a server on your local network, allow local network access when iOS asks. Open a custom provider again later to edit it or tap **Remove provider**.

API keys are stored securely on the device. Removing a provider's key disconnects it and clears the selected model if that provider was active.

## Create Text at the Cursor

Place the cursor where the new text should appear, then tap the sparkle button in the keyboard toolbar. Describe what you want to create and send the instruction.

Octarine uses the full current note, including its title, as context. This makes prompts such as these useful:

- "Add a short conclusion."
- "Turn the open tasks into a plan for tomorrow."
- "Write an introduction that matches the rest of this note."

The generated Markdown is inserted at the cursor. Tap **Stop** while Octarine is working if you do not want to finish the request.

## Rewrite Selected Text

Select text in the editor and tap the sparkle button. Enter your own instruction, or open **Rewrite options** and choose one of the built-in actions:

- Proofread
- Rewrite
- Friendly
- Professional
- Concise

Octarine replaces the selection with the generated Markdown and preserves structures such as headings, lists, tasks, links, and tables where possible. If the selected text changes while the model is working, Octarine leaves it alone and asks you to select it again.

## Chat With the Open Note

Tap the sparkle button in the editor header to open **Insights**. Start with **Summarize this note**, **Surface open questions**, or **Suggest next steps**, or type your own question.

Insights sends the current note as context and keeps the conversation associated with that note. You can:

- Ask follow-up questions.
- Stop or retry a response.
- Copy a response.
- Close Insights and return to the saved conversation later.
- Start a new chat, which permanently clears the chat saved for that note.

Insights only knows about the open note. It does not search other notes, follow links, or use the workspace-wide index. For questions across your workspace, use [Ask Octarine](./ask-octarine).

## Privacy and Context

Creating text sends your instruction and the full current note to the selected provider. Rewriting sends your instruction and selected text. Insights sends the current note and the conversation for that note.

Your notes remain Markdown files in the workspace. Chat history is saved locally for each note, while prompts and note context are processed according to the selected provider's terms and retention policy.

#### Quick Answers

### Can AI search my whole workspace on iPhone?

Yes, with Ask Octarine. Insights in the editor uses only the open note.

### Where is my AI provider key stored?

Octarine stores it securely on the device and only retrieves it when making a request to that provider.

### Can I use a local or self-hosted model on iPhone?

Yes, if it exposes an OpenAI- or Anthropic-compatible API. Add it under **Settings → AI → + Custom**.

### Does note chat persist after I close it?

Yes. Insights saves a separate conversation for each note until you start a new chat.
