Postchat
Postchat is a VS Code extension that brings an AI-powered API client directly into your editor. It bridges the gap between API documentation and live testing, all without leaving VS Code.
Features
- Chat with AI about your APIs — ask questions, find endpoints, understand authentication, and get usage examples
- Explore endpoints in a structured browser with search and filtering
- Send requests from a dedicated request tab with a full editor for headers, body, and parameters
- View syntax-highlighted responses with status codes, headers, and body
- Smart context filtering — only sends relevant endpoint data to the AI, reducing token usage and improving response quality
- Multiple collection sources — connect via Postman Cloud, URL import, workspace detection, Git tracking, or local files
Getting Started
1. Set up an LLM provider
Open VS Code Settings and configure one of the supported providers:
| Provider |
Settings |
| Anthropic (default) |
postchat.apiKey — your Anthropic API key |
| OpenAI |
postchat.provider → openai, postchat.openaiApiKey — your OpenAI API key |
| Ollama (local) |
postchat.provider → ollama, postchat.ollamaEndpoint — server URL (default http://localhost:11434) |
2. Connect a collection
Open the Postchat sidebar and choose a source. See Connecting Your Collections below.
3. Start chatting
Ask questions about your API in the chat panel. The AI has full context of your endpoints, parameters, request bodies, and authentication schemes.
Connecting Your Collections
Postchat supports five ways to load your API collections. All sources are managed from the Source Manager panel in the sidebar.
Load from File
The simplest method. Click Load Collection and pick a local file.
Supported formats:
- Postman Collection v2.1 (
.json)
- OpenAPI 3.0 (
.yaml, .yml, .json)
- Swagger 2.0 (
.yaml, .yml, .json)
Postman Cloud
Connect directly to your Postman workspace and sync collections automatically.
- Run
Postchat: Connect to Postman Cloud from the Command Palette (Cmd/Ctrl+Shift+P)
- Enter your Postman API key (get one from Postman Settings)
- Select a workspace and collection
- Choose a sync interval (30 seconds, 2 minutes, 5 minutes, or manual)
The collection auto-syncs in the background. Changes in Postman are detected via content hashing and reflected automatically.
Import from URL
Fetch a spec from any HTTPS URL with automatic refresh.
- Run
Postchat: Import Collection from URL from the Command Palette
- Paste the URL to your spec file
- Choose a refresh interval (1 minute, 5 minutes, 1 hour, or manual)
Smart URL resolution is built in:
- GitHub —
github.com/.../blob/... links are converted to raw URLs automatically
- GitLab — raw file URLs are resolved
- Postman share links — followed to the actual JSON
Detect in Workspace
Postchat can scan your workspace for API specs automatically.
- Runs on first activation if no previous session is found
- Can be triggered manually:
Postchat: Detect Workspace Collections from the Command Palette
It searches for common patterns like openapi.yaml, swagger.json, *.postman_collection.json, and files in /docs or /api directories. Candidates are ranked by confidence score (filename, location, file size, recency).
Track with Git
Monitor a spec file with Git-aware change detection.
- Run
Postchat: Track Collection with Git from the Command Palette
- Select the spec file in your repository
- Confirm — Postchat shows the file's recent git history
Once tracked, the collection auto-reloads on:
- File saves (file system watcher)
- Git operations — commits, branch switches, pulls (Git state listener)
Explorer
The Explorer tab gives you a structured view of your loaded collection and keeps chat actions connected to endpoint context.
How to use
- Connect a collection using any method above.
- Open the Explorer tab.
- Select an endpoint to view its details.
- Use Ask AI to send contextual questions to chat.
- Press
Enter or click View Request to open the endpoint in a request tab.
- Use View Request buttons on assistant messages to jump to endpoints.
Chat bridge
- Ask AI from Explorer generates endpoint-aware prompts in chat.
- View Request buttons on assistant messages open the endpoint in a dedicated request tab where you can inspect and edit headers, body, and parameters before sending.
- View in Explorer links in chat jump to the endpoint in the sidebar.
Keyboard shortcuts
| Shortcut |
Action |
Cmd/Ctrl+F |
Focus endpoint search (Postman explorer) |
Escape |
Clear search or deselect endpoint |
Enter |
Open selected endpoint in request tab |
Cmd/Ctrl+Enter |
Send request (when request tab is focused) |
Cmd/Ctrl+Shift+A |
Ask AI about selected endpoint |
Extension Settings
| Setting |
Default |
Description |
postchat.provider |
anthropic |
LLM provider: anthropic, openai, or ollama |
postchat.apiKey |
— |
Anthropic API key |
postchat.anthropicModel |
claude-sonnet-4-5-20250929 |
Anthropic model to use |
postchat.openaiApiKey |
— |
OpenAI API key |
postchat.openaiModel |
gpt-4o |
OpenAI model to use |
postchat.ollamaEndpoint |
http://localhost:11434 |
Ollama server URL |
postchat.ollamaModel |
llama3 |
Ollama model to use |
postchat.contextFilter.enabled |
true |
Smart context filtering to reduce token usage |
postchat.contextFilter.budgetMode |
auto |
Token budget: auto, conservative, balanced, or generous |
Commands
All commands are available from the Command Palette (Cmd/Ctrl+Shift+P):
| Command |
Description |
Postchat: Start |
Open the Postchat sidebar |
Postchat: Manage Collection Sources |
Open the source manager |
Postchat: Connect to Postman Cloud |
Set up Postman Cloud sync |
Postchat: Import Collection from URL |
Import a spec from a URL |
Postchat: Detect Workspace Collections |
Scan workspace for API specs |
Postchat: Track Collection with Git |
Track a spec file with Git |
Postchat: Open Request Tab |
Open the request tab for the selected endpoint |
Postchat: Run Current Tab |
Execute the request in the active request tab |
Postchat: Close All Request Tabs |
Close all open request tabs |