AI assistant
The built-in AI assistant is a chat panel that can read the current request and response as context — useful for explaining an API, drafting a payload, debugging a failed response, or generating a test script.
Providers
Section titled “Providers”- OpenAI (
gpt-6.1-sol,gpt-6-astra,gpt-6-luna,gpt-5.4-mini,gpt-5.4-nano). - Anthropic (
claude-haiku-4-5,claude-sonnet-5-5,claude-opus-5-5,claude-fable-5-1). - OpenRouter — any model OpenRouter relays.
For each cloud provider, paste your own API key (stored as a SecretRef, never plaintext in the renderer). The model list is fixed. A fourth provider, OpenAI-compatible (local), takes a base URL and a model id and does not use an API key. Cloud cards do not have a custom base URL field.
Until the selected provider is usable, the chat shows a setup card that says what’s missing — an API key for a cloud provider, a base URL and model for a local one — with Open AI settings. In Settings → AI, Test connection checks a provider before you rely on it, and saving your first key switches the assistant to that provider when the current one isn’t usable.
What it can see
Section titled “What it can see”When you invoke a chat that references the current request, Restura builds a context snapshot:
- The request URL, as written — the host and path are sent to the provider. Environment-variable values of 8+ characters that appear in it are replaced with
[REDACTED]. Private or internal hosts are not stripped. - The request method. There is no separate protocol field in the snapshot.
- Headers (sensitive ones —
Authorization,Cookie,X-Api-Key— redacted). - The request body (JSON pretty-printed, large blobs truncated).
- The response status, headers, and body (with the same redaction rules).
- Environment variable names, with every value replaced by
[REDACTED]. The environment’s display name is not sent.
The snapshot is what goes to the provider. Secrets in headers and bodies and environment-variable values are redacted before the prompt is sent, but hostnames and URLs are not: don’t ask the assistant about requests whose internal hostnames you don’t want a third-party model provider to see.
The composer’s Send raw (skip redaction) switch sends one message with no redaction at all. It resets after each message.
Where it runs
Section titled “Where it runs”- Desktop — fully wired. The renderer streams chunks from the Electron main process over IPC; the main process talks to the provider directly. primary path
- Web — not available. There is no
/api/aiWorker route, so the AI assistant is Electron-only. (Web support is planned but requires care around browser-side API-key handling.)
What it can do
Section titled “What it can do”- Explain the current request or response in plain language.
- Generate a body, a header value, a test script, or a curl command for the current request.
- Debug — paste in the response and ask why it’s 4xx.
- Compose a saved request or explain how to carry values through collection scripts. OWS workflows do not provide response extraction semantics.
Replies render as markdown once they finish streaming, with Copy and Retry under each one.
Inline actions desktop
Section titled “Inline actions ”You don’t have to open the chat to use the assistant on the request you’re editing. The URL bar’s AI menu (the sparkle icon) and the test script tab expose one-click actions:
- Fix request — diagnoses the current request and its response, then proposes a corrected request.
- Generate tests — writes assertions for the response (status, fields, edge cases) into the test script.
- Enrich docs — writes markdown documentation for the request (it shows under the URL bar and in generated collection docs).
Each action opens the assistant and proposes a change as a card. The card shows each change as a before → after preview, with the raw tool input under Details. Nothing is applied until you click Apply — the same propose-&-apply consent model as the chat — and the toast after applying offers Undo. Without a configured provider the buttons are shown disabled with a hint to configure one; clicking opens Settings → AI.
Agent Mode desktop
Section titled “Agent Mode ”For multi-step work, click the robot icon in the assistant header and give it a goal — e.g. “make this request succeed and add tests for it.” The agent works one step at a time:
- It proposes a single action (a tool call).
- You review and Apply it (or Dismiss to stop).
- The updated request context is sent back and the agent proposes the next step.
It stops when the goal is met, when you hit Stop, or at a hard step limit. Every mutation is still explicitly approved — Agent Mode never changes your request without a click. A status banner shows the goal and step count while it runs.
- Keep prompts short and reference the current request explicitly — the snapshot is dense; you don’t need to repeat what’s already there.
- For long debugging sessions, save the chat to history — chat history lives alongside request history.
Related
Section titled “Related”- AI Lab — the desktop-only workbench for testing prompts and models (datasets, evals, LLM-as-judge, local runtimes).
- MCP server mode — expose Restura’s data to an external agent.
- Architecture / Security — secrets-at-rest, redaction.