Skip to content

AI Providers

Pia works with multiple AI providers. You can use one provider for everything or assign different providers to different conversation modes (Optimize and Assistant).

These are the provider types Pia offers. This table is the canonical list — other pages link here rather than repeat it.

Provider Models API Key Required Web Search
Pia Cloud Server-proxied AI Pia account No
OpenAI GPT-4o, GPT-4o-mini Yes Optional
Anthropic Claude models Yes Optional
Azure OpenAI Your deployed models Yes No
OpenRouter Many models, many vendors Yes Optional
Mistral mistral-large, etc. Yes Via Mistral Agent
Ollama Local models on your machine No No
OpenAI-compatible Any endpoint speaking the OpenAI API Depends on the endpoint No
vLLM A vLLM server you run Depends on your server No

Ollama, OpenAI-compatible and vLLM are the routes to running Pia against a model on your own hardware, with no prompt leaving your machine.

Anthropic reaches Claude models on your own API key. Pick it in Settings → Providers, enter a Claude model name, and the endpoint fills in as https://api.anthropic.com. Two options are worth knowing about:

  • Enable web search lets Claude look things up itself while it answers, instead of relying on what it already knows.
  • Cache the prompt prefix (5 min) makes a long conversation re-read its history instead of paying for it again on every turn. It costs a little more on the first turn, so leave it off for short prompts and turn it on where the same long instructions come back turn after turn. This option exists on Anthropic providers only — no other provider here takes a cache directive.

An Anthropic provider does not enable image attachments or screen capture. Those still need Pia Cloud. See File Attachments.

  1. Open Settings → Providers
  2. Click Add Provider
  3. Choose a provider type from the list above (every type except Pia Cloud can be added by hand)
  4. Enter your API key (and endpoint URL if using Azure OpenAI, Ollama, OpenAI-compatible or vLLM)
  5. Select a model
  6. Click Save

Your API keys are stored locally on your device and are never sent to Pia servers.

The dialog, like the setup wizard, reminds you who receives what you send: “Your requests, attachments and conversation content go to whoever runs this address. Pia does not check that service.”

On a managed device, your IT administrator can limit which provider types and which addresses you may use. A type that isn’t allowed isn’t offered when you add a provider. A provider you already have that breaks the rules can’t be saved, and Pia refuses to send anything to it. The provider dialog then says “Your organization’s policy does not allow this provider type.” or “Your organization’s policy does not allow this address.” Pia Cloud is never affected. See Enterprise Policy.

Pia has two conversation modes — Optimize and Assistant. Each mode can use a different AI provider.

  1. Open Settings → Providers
  2. Check Use same provider for all modes
  3. Pick a provider from the dropdown
  1. Open Settings → Providers
  2. Uncheck Use same provider for all modes
  3. Use the separate dropdowns to assign a provider for each mode — Optimize and Assistant

The right side of the settings screen shows all your configured providers as cards. Each card displays:

  • Provider name and type
  • Endpoint and model name
  • Mode badges — colored labels showing which modes use that provider (Optimize, Assistant)
  • Capability badges — warnings if a provider is missing support for certain advanced features

If a provider has connection issues, a fail reason badge appears on its card.

Each provider card has actions you can use:

  • Test Connection — checks that your API key and endpoint are working. A spinner shows while the test runs.
  • Edit — update the provider’s settings, API key, or model.
  • Delete — remove the provider. Built-in providers like Pia Cloud cannot be deleted.

Timeout (seconds) in a provider’s settings is how long Pia waits for that provider to answer one request — 300 by default, up to 600. It applies to each request separately: a long answer that asks the provider many times, with tool work in between, gets the full time for every one of them. Raise it for a slow local model.

When a request runs past it, the chat ends with “Provider ‘…’ did not respond within 300 seconds.” (with your own timeout in place of 300). Time spent waiting for you on an approval card doesn’t count — no timer runs while a card waits.

OpenAI and OpenRouter providers can search the web to help answer your questions. To turn it on:

  1. Open Settings → Providers
  2. Click Edit on an OpenAI or OpenRouter provider
  3. Tick Enable web search
  4. Click Save

Your organization can switch the providers’ own web search off. Enable web search is then locked, and your own choice stays saved. Pia Cloud isn’t affected, because its search runs on the server.

When you edit a Mistral provider, there’s an optional Mistral Agent ID field. Leave it blank for normal Mistral use, or paste an Agent ID to connect a Mistral Agent that has built-in tools.

Web search for Mistral depends on the agent you connect — its tools determine what the agent can do.

Cloud Sync lets you keep your conversations and settings in sync across multiple devices and is required to use Pia Cloud. If Cloud Sync isn’t set up yet, a banner appears at the top of the AI Provider settings. Click the link in the banner to go to Cloud Sync settings and connect your Pia account.

Ready to start chatting? Head to Your First Conversation to learn about conversation modes.

For a side-by-side of what leaves your device in each setup, see Where your data goes.