AI Assistant - amitsri/rostyman-releases GitHub Wiki
AI Assistant
Rostyman includes a built-in AI assistant that helps you work with APIs faster — generate requests, explain responses, write test scripts, debug errors, and more.
Opening the AI Panel
- Press
Ctrl+Alt+P(orCmd+Opt+Pon Mac) to toggle the AI panel - Or click the AI tab in the right panel (
Ctrl+J)
Setting Up
1. Add Your API Key to the Vault
The AI assistant uses API keys stored securely in the Vault (AES-256-GCM encrypted).
- Open Settings > Vault (or click Vault in the status bar)
- Add a new secret with your API key (e.g., key name:
anthropic-key, value: your API key) - Enable the secret with the checkmark
2. Configure the AI Provider
- Open the AI panel and click the Settings (gear) icon
- Select your provider: Claude (Anthropic), OpenAI, or Ollama (local)
- Choose a model from the dropdown — pricing is shown per 1M tokens
- Select your vault secret from the API key dropdown
Ollama is free and runs locally — no API key needed. Just install Ollama and start it with ollama serve.
Providers & Models
| Provider | Models | Pricing (input/output per 1M tokens) |
|---|---|---|
| Anthropic | Opus 4, Sonnet 4, Haiku 3.5 | $0.80–$75 |
| OpenAI | GPT-4o, 4o-mini, 4.1, 4.1-mini, 4.1-nano, o3, o4-mini | $0.10–$10 |
| Ollama | Any installed model (llama3, mistral, etc.) | Free (local) |
Quick Actions
When starting a new conversation, 7 quick action buttons appear:
| Action | What It Does |
|---|---|
| Generate | Create an API request from a natural language description |
| Explain | Explain the current response in plain English |
| Tests | Generate rm.test() scripts from the current response |
| Fix | Analyze error responses and suggest fixes |
| Mock Data | Generate realistic sample JSON request bodies |
| Document | Create markdown documentation for the current request |
| Validate Schema | Compare response structure against expected schema |
Conversational Chat
The AI assistant supports full multi-turn conversations:
- Type a message and press Enter to send (Shift+Enter for new line)
- The AI has context about your current request — method, URL, headers, body, response
- Conversations are saved to the database and persist across sessions
- After 20+ messages, older messages are automatically summarized to save context
Action Buttons
Code blocks in AI responses have contextual action buttons:
- JSON blocks → "Apply as Body", "Create Request"
- JavaScript blocks → "Apply as Test Script", "Apply as Pre-request Script"
- cURL/bash blocks → "Import as Request"
Click any button to apply the code directly to your current request or create a new one.
cURL Import
Paste a cURL command into the chat input — Rostyman auto-detects it and creates a new request tab with the parsed method, URL, headers, and body.
Managing Conversations
- Click the List icon to see all past conversations
- Rename a conversation by clicking the pencil icon
- Delete a conversation by clicking the trash icon
- Click + to start a new conversation
Tips
- The AI works best when you have a request open — it uses the active tab's context
- For Ollama, use
llama3or larger models for best results - API keys never leave the main process — they're resolved from the vault at call time and never stored in the renderer
- Use "Validate Schema" to catch breaking API changes before they hit production