Inkstone LogoInkstone
v0.1.7 Documentation / AI Provider

The AI Provider System

How Inkstone talks to OpenAI-format providers, streams responses, and handles API keys.

01

The AI Provider System

Inkstone doesn't ship with a brain. It lets you pick one.

Inkstone talks to whichever AI service you've set up, using the OpenAI API format — the industry standard most providers support. OpenRouter, DeepSeek, Z.AI, OpenAI, or any custom endpoint. Your API key is stored in your device's secure credential storage (the same system your phone uses for saved passwords). Never logged, never exposed.

Streaming

Watch responses appear word by word in real time. The parser is lenient — most providers work out of the box, even if they skip some metadata fields.

Error Handling

When something goes wrong, Inkstone extracts the most useful error it can. For streaming requests, it falls back to the HTTP status message. Always something actionable, never "Unknown error."

That's the whole machine. Each system is designed to stay out of your way when you don't need it and be there when you do.