Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>Code ProNew to Visual Studio Code? Get it now.
Code Pro

Code Pro

Aakash Rajbanshi

|
1 install
| (0) | Free
Professional API token manager for AI providers (OpenAI, Anthropic, Google, Groq, Ollama, OpenRouter, custom). Secure storage, multi-provider support, model switching.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

API Token Manager

A VS Code extension to securely store and manage API tokens for multiple AI providers. Switch between providers and models seamlessly.

Features

  • Secure Storage: Tokens stored in OS keychain via VS Code's SecretStorage — never in settings or disk
  • Multi-Provider Support: Built-in configs for OpenAI, Anthropic, Google (Gemini), Groq, Ollama, OpenRouter
  • Custom Providers: Add your own providers with custom base URLs, auth headers, and models
  • Model Selection: Switch models per provider with metadata (context window, vision, tools)
  • Connection Testing: Verify tokens work with one click
  • Zero Config: Works out of the box with sensible defaults

Installation

From VSIX (Recommended)

# Build the extension
npm run compile
vsce package

# Install in VS Code
code --install-extension api-token-manager-0.1.0.vsix

From Source

git clone https://github.com/your-username/api-token-manager
cd api-token-manager
npm install
npm run compile
# Press F5 in VS Code to launch Extension Development Host

Quick Start

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Run API Token Manager: Set API Token
  3. Select your provider (e.g., OpenAI)
  4. Paste your API key
  5. Run API Token Manager: Test API Connection to verify

Commands

Command Description
Set API Token Store a token for a provider (secure input)
Clear API Token Remove a stored token
Test API Connection Verify token works with provider's API
Select Provider Switch active provider (OpenAI, Anthropic, etc.)
Select Model Switch active model for current provider
Configure Provider Add/edit/remove custom providers

Supported Providers

Provider Models Vision Tools Notes
OpenAI GPT-4o, GPT-4o-mini, GPT-4, GPT-3.5 ✅ ✅
Anthropic Claude 3.5 Sonnet, Haiku, Opus ✅ ✅
Google Gemini 1.5 Pro, Flash, 1.0 Pro ✅ ✅
Groq Llama 3.1 70B/8B, Mixtral, Gemma ❌ ✅ Fast inference
Ollama Llama 3.1/3.2, Mistral, CodeLlama ❌ ❌ Local (localhost:11434)
OpenRouter 100+ models via single API ✅ ✅ Aggregator

Custom Providers

Add any OpenAI-compatible API:

  1. Run Configure Provider → Add Custom Provider
  2. Fill in:
    • ID: Unique identifier (e.g., my-company)
    • Name: Display name
    • Base URL: https://api.mycompany.com/v1
    • Auth Header: Authorization: Bearer {token} (or custom)
    • Test Endpoint: /models (or /health)
    • Models: Comma-separated id:Name pairs
  3. Set token via Set API Token

Example for Azure OpenAI:

Base URL: https://my-resource.openai.azure.com/openai/deployments/my-deployment
Auth Header: api-key: {token}
Test Endpoint: /chat/completions?api-version=2024-02-15

Architecture

src/
├── config/
│   └── providers.ts          # Built-in provider definitions
├── services/
│   ├── tokenManager.ts       # SecretStorage wrapper (per-provider)
│   └── providerManager.ts    # Active provider/model state (globalState)
├── api/
│   └── clientFactory.ts      # Provider-specific API clients
├── commands/
│   ├── setToken.ts
│   ├── clearToken.ts
│   ├── testConnection.ts
│   ├── selectProvider.ts
│   ├── selectModel.ts
│   └── configureProvider.ts
└── extension.ts              # Activation entry point

Security

  • Tokens encrypted in OS keychain (Windows Credential Manager, macOS Keychain, Linux Secret Service)
  • Never written to settings.json, globalState, or logs
  • Input boxes use password: true masking
  • No telemetry by default

Settings

Setting Default Description
api-token-manager.defaultProvider openai Provider on first run
api-token-manager.requestTimeout 60000 Request timeout (ms)
api-token-manager.enableTelemetry false Anonymous usage stats

Development

npm install          # Install dependencies
npm run compile      # Compile TypeScript
npm run watch        # Watch mode
npm run lint         # ESLint
npm run package      # Create .vsix

License

MIT — see LICENSE

Contributing

  1. Fork the repo
  2. Create a feature branch
  3. Add tests for new providers
  4. Submit a PR

Built for developers who switch between AI providers daily.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft