feat(desktop): embed BoosAPI Desktop client as a subproject
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
# API Gateway
|
||||
|
||||
## What is the API Gateway?
|
||||
|
||||
BoosApi includes a built-in local API server that exposes your configured providers as **OpenAI-compatible**, **Claude-native**, and **Gemini-native** endpoints. Any tool or client that speaks one of these protocols can use BoosApi as its backend — no separate API keys or relay services required.
|
||||
|
||||
Use cases:
|
||||
|
||||
- Run **Claude Code CLI**, **OpenAI Codex CLI**, **Gemini CLI**, or **OpenCode** through BoosApi.
|
||||
- Feed your IDE extensions through a single, locally managed endpoint.
|
||||
- Share one set of provider keys across many tools with per-key rate limiting.
|
||||
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Open **Settings → API Gateway** (or press <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd>).
|
||||
2. Click **Start** to launch the gateway server.
|
||||
3. By default the server listens on `127.0.0.1:8080` (HTTP). You can change the listen address and port in the **Settings** tab.
|
||||
|
||||
::: tip
|
||||
Enable **Auto-start** in the gateway settings to launch the server automatically when BoosApi starts.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## API Key Management
|
||||
|
||||
The gateway authenticates incoming requests with its own API keys, separate from your provider keys.
|
||||
|
||||
1. Go to the **API Keys** tab.
|
||||
2. Click **Generate New Key**.
|
||||
3. Optionally add a **description** (e.g. *Claude Code*, *VS Code*) to identify each key.
|
||||
4. Copy the key — it is only displayed once.
|
||||
|
||||
Each key shows its **prefix**, **creation date**, and **last used** timestamp. You can **enable/disable** or **delete** keys at any time.
|
||||
|
||||
::: warning
|
||||
Treat gateway keys like any other API key. Anyone with the key can send requests to your local gateway while it is running.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## SSL/TLS
|
||||
|
||||
The gateway can serve HTTPS alongside or instead of HTTP.
|
||||
|
||||
### Auto-Generated Certificate
|
||||
|
||||
1. Open the **Settings** tab.
|
||||
2. Enable **SSL/TLS** and select **Generate** mode.
|
||||
3. BoosApi creates a self-signed certificate and private key at:
|
||||
|
||||
```
|
||||
~/.boosapi/ssl/cert.pem
|
||||
~/.boosapi/ssl/key.pem
|
||||
```
|
||||
|
||||
4. Set the **HTTPS port** (default `8443`).
|
||||
5. Optionally enable **Force SSL** to redirect all HTTP requests to HTTPS.
|
||||
|
||||
### Custom Certificate
|
||||
|
||||
Select **Upload** mode and provide the paths to your own certificate and private key files.
|
||||
|
||||
::: info
|
||||
The private key is stored with file mode `0600` on Unix systems to prevent other users from reading it.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Usage Analytics
|
||||
|
||||
The **Metrics** tab provides dashboards for monitoring gateway activity:
|
||||
|
||||
| View | Description |
|
||||
|------|-------------|
|
||||
| **By API Key** | Request volume and token usage broken down by each gateway key |
|
||||
| **By Provider** | Requests and tokens routed to each upstream AI provider |
|
||||
| **By Day** | Daily usage trends over time |
|
||||
|
||||
Use these dashboards to track cost, spot anomalies, and balance load across providers.
|
||||
|
||||
---
|
||||
|
||||
## Request Logs
|
||||
|
||||
The **Overview** tab shows recent request logs with the following details:
|
||||
|
||||
- **Timestamp**, **HTTP method**, **path**
|
||||
- **Status code** and **response time**
|
||||
- **Provider** and **model** used
|
||||
- **Token count** (prompt + completion)
|
||||
|
||||
Click any log entry to inspect the full request and response. Use the **Clear Logs** button to reset the log history.
|
||||
|
||||
---
|
||||
|
||||
## Configuration Templates
|
||||
|
||||
BoosApi ships with ready-made configuration snippets for popular CLI tools. Go to the **Templates** tab, pick a tool, and click **Copy** to get the configuration you need.
|
||||
|
||||
### Claude Code CLI
|
||||
|
||||
```bash
|
||||
claude config set --global apiUrl http://127.0.0.1:8080
|
||||
claude config set --global apiKey boosapi-xxxx
|
||||
```
|
||||
|
||||
### OpenAI Codex CLI
|
||||
|
||||
```bash
|
||||
export OPENAI_BASE_URL=http://127.0.0.1:8080/v1
|
||||
export OPENAI_API_KEY=boosapi-xxxx
|
||||
codex
|
||||
```
|
||||
|
||||
### OpenCode
|
||||
|
||||
Add to your OpenCode configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"provider": "openai",
|
||||
"baseURL": "http://127.0.0.1:8080/v1",
|
||||
"apiKey": "boosapi-xxxx"
|
||||
}
|
||||
```
|
||||
|
||||
### Gemini CLI
|
||||
|
||||
```bash
|
||||
export GEMINI_API_BASE=http://127.0.0.1:8080
|
||||
export GEMINI_API_KEY=boosapi-xxxx
|
||||
gemini
|
||||
```
|
||||
|
||||
### Custom Client
|
||||
|
||||
Any tool that accepts an OpenAI-compatible base URL can connect to the gateway:
|
||||
|
||||
```
|
||||
Base URL: http://127.0.0.1:8080/v1
|
||||
API Key: boosapi-xxxx
|
||||
```
|
||||
|
||||
Replace `boosapi-xxxx` with a key generated in the **API Keys** tab. If SSL is enabled, use `https://` and port `8443` (or your configured HTTPS port).
|
||||
|
||||
---
|
||||
|
||||
## Connecting External Tools
|
||||
|
||||
Below is a general pattern for connecting any OpenAI-compatible client:
|
||||
|
||||
1. **Generate a gateway API key** in BoosApi.
|
||||
2. **Set the base URL** in your tool's configuration to `http://127.0.0.1:8080/v1` (or the HTTPS equivalent).
|
||||
3. **Set the API key** to the gateway key you generated.
|
||||
4. **Select a model** that you have configured in one of your BoosApi providers.
|
||||
5. Start using the tool — all requests route through BoosApi to the upstream provider.
|
||||
|
||||
::: tip
|
||||
If a tool requires a specific API format (e.g. Claude or Gemini native), BoosApi automatically detects the request format and routes it to the correct provider. You do not need to configure separate endpoints per format.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Getting Started](./getting-started) — return to the quick start guide
|
||||
- [Configure Providers](./providers) — add the upstream providers the gateway routes to
|
||||
- [MCP Servers](./mcp) — connect external tools for AI tool calling
|
||||
@@ -0,0 +1,197 @@
|
||||
# Getting Started
|
||||
|
||||
## Installation
|
||||
|
||||
Download the latest installer from the [Download page](/download) or the [GitHub Releases](https://github.com/BoosApi-Desktop/BoosApi/releases).
|
||||
|
||||
### macOS
|
||||
|
||||
| Chip | File |
|
||||
|------|------|
|
||||
| Apple Silicon (M1 / M2 / M3 / M4) | `BoosApi_x.x.x_aarch64.dmg` |
|
||||
| Intel | `BoosApi_x.x.x_x64.dmg` |
|
||||
|
||||
1. Open the `.dmg` and drag **BoosApi** into the **Applications** folder.
|
||||
2. Launch BoosApi. If macOS blocks the app, go to **System Settings → Privacy & Security** and click **Open Anyway**.
|
||||
|
||||
::: warning macOS: "App Is Damaged" or "Cannot Verify Developer"
|
||||
If you see either of these messages, open Terminal and run:
|
||||
|
||||
```bash
|
||||
xattr -c /Applications/BoosApi.app
|
||||
```
|
||||
|
||||
Then launch the app again. This removes the quarantine flag that macOS applies to unsigned downloads.
|
||||
:::
|
||||
|
||||
### Windows
|
||||
|
||||
| Architecture | File |
|
||||
|--------------|------|
|
||||
| x64 (most PCs) | `BoosApi_x.x.x_x64-setup.exe` |
|
||||
| ARM64 | `BoosApi_x.x.x_arm64-setup.exe` |
|
||||
|
||||
Run the installer and follow the wizard. Launch BoosApi from the Start Menu or the desktop shortcut.
|
||||
|
||||
### Linux
|
||||
|
||||
| Format | Architecture | File |
|
||||
|--------|--------------|------|
|
||||
| Debian / Ubuntu | x64 | `BoosApi_x.x.x_amd64.deb` |
|
||||
| Debian / Ubuntu | ARM64 | `BoosApi_x.x.x_arm64.deb` |
|
||||
| Fedora / openSUSE | x64 | `BoosApi_x.x.x_x86_64.rpm` |
|
||||
| Fedora / openSUSE | ARM64 | `BoosApi_x.x.x_aarch64.rpm` |
|
||||
| Any distro | x64 | `BoosApi_x.x.x_amd64.AppImage` |
|
||||
| Any distro | ARM64 | `BoosApi_x.x.x_aarch64.AppImage` |
|
||||
|
||||
```bash
|
||||
# Debian / Ubuntu
|
||||
sudo dpkg -i BoosApi_x.x.x_amd64.deb
|
||||
|
||||
# Fedora / openSUSE
|
||||
sudo rpm -i BoosApi_x.x.x_x86_64.rpm
|
||||
|
||||
# AppImage (any distro)
|
||||
chmod +x BoosApi_x.x.x_amd64.AppImage
|
||||
./BoosApi_x.x.x_amd64.AppImage
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
### 1. Open Settings
|
||||
|
||||
Launch BoosApi and click the **gear icon** at the bottom of the sidebar, or press <kbd>Cmd/Ctrl</kbd>+<kbd>,</kbd>.
|
||||
|
||||
### 2. Add a Provider
|
||||
|
||||
Navigate to **Settings → Providers** and click the **+** button.
|
||||
|
||||
1. Enter a display name (e.g. *OpenAI*).
|
||||
2. Select the provider type (OpenAI, Anthropic, Google Gemini, etc.).
|
||||
3. Paste your API key.
|
||||
4. Confirm the **Base URL** — the official endpoint is pre-filled for built-in types. Change it only if you use a third-party relay or proxy.
|
||||
|
||||
::: tip
|
||||
You can add as many providers as you like. Each provider manages its own set of API keys and models independently.
|
||||
:::
|
||||
|
||||
### 3. Fetch Models
|
||||
|
||||
Click **Fetch Models** to pull the list of available models from the provider's API. You can also add model IDs manually if needed.
|
||||
|
||||
### 4. Set a Default Model
|
||||
|
||||
Go to **Settings → Default Model** and choose the provider and model that new conversations should use by default.
|
||||
|
||||
---
|
||||
|
||||
## Your First Conversation
|
||||
|
||||
1. Click **New Chat** in the sidebar (or press <kbd>Cmd/Ctrl</kbd>+<kbd>N</kbd>).
|
||||
2. Select a model from the model selector at the top of the chat.
|
||||
3. Type a message and press <kbd>Enter</kbd>.
|
||||
4. BoosApi streams the response in real time. Models that support thinking blocks (e.g. Claude, DeepSeek R1) display the reasoning process in a collapsible section above the answer.
|
||||
|
||||
---
|
||||
|
||||
## Key Concepts
|
||||
|
||||
### Conversation Branching
|
||||
|
||||
Edit or regenerate any message to create a branch. The original and new versions coexist in the same conversation tree — navigate between them with the arrow controls on each message.
|
||||
|
||||
### Message Versions
|
||||
|
||||
Every regeneration creates a new version. Switch between versions using the **◀ ▶** arrows on the message bubble.
|
||||
|
||||
### Context Attachments
|
||||
|
||||
Enrich your prompts by attaching files, search results, or MCP tool outputs directly to the conversation context.
|
||||
|
||||
---
|
||||
|
||||
## Shortcuts
|
||||
|
||||
Below are the default keyboard shortcuts. All shortcuts can be customized in **Settings → Shortcuts**.
|
||||
|
||||
| Shortcut | Action |
|
||||
|----------|--------|
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> | Show / hide the current window |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Alt</kbd>+<kbd>A</kbd> | Show / hide all windows |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>W</kbd> | Close window |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>N</kbd> | New conversation |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>,</kbd> | Open Settings |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>K</kbd> | Command palette |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | Toggle model selector |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>↑</kbd> | Fill last message |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> | Clear context |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Backspace</kbd> | Clear conversation messages |
|
||||
| <kbd>Cmd/Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> | Toggle API Gateway |
|
||||
|
||||
::: info
|
||||
Global shortcuts (show/hide window) work system-wide even when BoosApi is in the background. BoosApi detects conflicts with shortcuts from other applications and warns you in Settings.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Desktop Settings
|
||||
|
||||
Open **Settings** to configure the desktop experience.
|
||||
|
||||
| Setting | Options |
|
||||
|---------|---------|
|
||||
| **Theme** | Dark, Light, or System (auto) |
|
||||
| **Language** | English, 简体中文 |
|
||||
| **System tray** | Minimize to tray, close to tray |
|
||||
| **Auto-start** | Launch BoosApi when your computer starts |
|
||||
| **Always on top** | Keep the window above other applications |
|
||||
| **Proxy** | HTTP or SOCKS5 proxy with host and port |
|
||||
|
||||
---
|
||||
|
||||
## Data & Backup
|
||||
|
||||
### Data Directories
|
||||
|
||||
BoosApi stores data in two locations:
|
||||
|
||||
| Path | Contents |
|
||||
|------|----------|
|
||||
| `~/.boosapi/` | Application state — database, encryption keys, vector DB, SSL certificates |
|
||||
| `~/Documents/boosapi/` | User-visible files — images, documents, backups |
|
||||
|
||||
::: tip
|
||||
On Windows the paths are `%USERPROFILE%\.boosapi\` and `%USERPROFILE%\Documents\boosapi\`.
|
||||
:::
|
||||
|
||||
### Auto Backup
|
||||
|
||||
Go to **Settings → Backup** to configure automatic backups:
|
||||
|
||||
- **Enabled** — toggle automatic backups on or off.
|
||||
- **Interval** — how often to back up (in hours).
|
||||
- **Max count** — number of backups to keep before the oldest is deleted.
|
||||
- **Storage target** — local directory (default: `~/Documents/boosapi/backups/`) or WebDAV server.
|
||||
|
||||
### Manual Backup & Restore
|
||||
|
||||
Create a manual backup at any time from the Backup settings panel. To restore, select a backup from the history list and click **Restore**.
|
||||
|
||||
### Conversation Export
|
||||
|
||||
Right-click a conversation in the sidebar to export it as:
|
||||
|
||||
- **PNG** — rendered screenshot of the chat
|
||||
- **Markdown** — formatted with headers, code blocks, and LaTeX
|
||||
- **Plain text** — simple text with message separators
|
||||
- **JSON** — structured data with full metadata
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [Configure Providers](./providers) — add and manage AI providers
|
||||
- [MCP Servers](./mcp) — connect external tools to extend AI capabilities
|
||||
- [API Gateway](./gateway) — expose your providers as a local API server
|
||||
@@ -0,0 +1,205 @@
|
||||
# MCP Servers
|
||||
|
||||
## What is MCP?
|
||||
|
||||
The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that lets AI models interact with external tools and data sources. BoosApi acts as an MCP client — you add MCP servers, and the AI can call the tools they expose during a conversation.
|
||||
|
||||
---
|
||||
|
||||
## Transport Protocols
|
||||
|
||||
BoosApi supports three transport protocols for communicating with MCP servers:
|
||||
|
||||
| Protocol | Connection | Use Case | Configuration |
|
||||
|----------|-----------|----------|---------------|
|
||||
| **Stdio** | Local process | Tools installed on your machine, launched via `npx`, `uvx`, `python`, etc. | `command` + `args` + optional `env` |
|
||||
| **SSE** | Remote server | Server-Sent Events endpoint hosted on a remote machine or cloud service | `url` |
|
||||
| **StreamableHTTP** | Remote server | HTTP streaming endpoint, the newer alternative to SSE | `url` |
|
||||
|
||||
---
|
||||
|
||||
## Adding MCP Servers
|
||||
|
||||
### Form Creation
|
||||
|
||||
1. Go to **Settings → MCP Servers**.
|
||||
2. Click **Add MCP Server**.
|
||||
3. Enter a name and select the transport protocol.
|
||||
4. Fill in the fields for your chosen protocol:
|
||||
- **Stdio** — command to run, arguments (JSON array), environment variables (JSON object), timeout.
|
||||
- **SSE** — endpoint URL, timeout.
|
||||
- **StreamableHTTP** — endpoint URL, timeout.
|
||||
5. Click **Save**.
|
||||
|
||||
### JSON Import
|
||||
|
||||
Click **JSON Import** and paste a configuration object. BoosApi accepts the standard MCP JSON format:
|
||||
|
||||
#### Stdio server
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"fetch": {
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-fetch"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### SSE server
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-tools": {
|
||||
"type": "sse",
|
||||
"url": "https://example.com/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### StreamableHTTP server
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-http": {
|
||||
"type": "streamablehttp",
|
||||
"url": "https://example.com/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Multiple servers at once
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"fetch": {
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-fetch"]
|
||||
},
|
||||
"filesystem": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
|
||||
},
|
||||
"remote": {
|
||||
"type": "sse",
|
||||
"url": "https://example.com/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configuration Examples
|
||||
|
||||
### Web Fetching — `mcp-server-fetch`
|
||||
|
||||
Fetches web pages and converts them to readable text for the AI.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"fetch": {
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-fetch"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### File Operations — `@modelcontextprotocol/server-filesystem`
|
||||
|
||||
Gives the AI read/write access to specific directories on your machine.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"filesystem": {
|
||||
"command": "npx",
|
||||
"args": [
|
||||
"-y",
|
||||
"@modelcontextprotocol/server-filesystem",
|
||||
"/Users/me/documents",
|
||||
"/Users/me/projects"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Remote SSE Server
|
||||
|
||||
Connect to a remote tool server over Server-Sent Events.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"cloud-tools": {
|
||||
"type": "sse",
|
||||
"url": "https://mcp.example.com/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Stdio with Environment Variables
|
||||
|
||||
Pass API keys or configuration to the server process via environment variables.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"weather": {
|
||||
"command": "python",
|
||||
"args": ["-m", "weather_server"],
|
||||
"env": {
|
||||
"WEATHER_API_KEY": "your-api-key"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Built-in Tools
|
||||
|
||||
BoosApi ships with built-in tools that are available without adding any external MCP server:
|
||||
|
||||
| Tool | Description |
|
||||
|------|-------------|
|
||||
| **@boosapi/fetch** | Fetch web pages and HTTP resources |
|
||||
| **@boosapi/search-file** | Search for files on your local file system |
|
||||
|
||||
Built-in tools are listed in the MCP Servers settings alongside your custom servers and can be enabled or disabled individually.
|
||||
|
||||
---
|
||||
|
||||
## Tool Execution Panel
|
||||
|
||||
When the AI calls an MCP tool during a conversation, BoosApi displays a **tool execution panel** inline in the chat. The panel shows:
|
||||
|
||||
- The **tool name** and the **server** it belongs to.
|
||||
- The **input arguments** sent to the tool.
|
||||
- The **output** returned by the tool.
|
||||
- Execution status (running, succeeded, or failed).
|
||||
|
||||
Click on any tool call in the conversation to expand its details. This makes it easy to verify what the AI did and debug unexpected results.
|
||||
|
||||
---
|
||||
|
||||
## Tool Loop Limit
|
||||
|
||||
In Settings -> Conversation, MCP Tool Loop Max Iterations limits how many consecutive tool-call rounds one model response may run. Lower values reduce latency and cost; higher values allow longer autonomous tool workflows.
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [API Gateway](./gateway) — expose your providers as a local API server
|
||||
- [Getting Started](./getting-started) — return to the quick start guide
|
||||
@@ -0,0 +1,209 @@
|
||||
# Configure Providers
|
||||
|
||||
BoosApi connects to any number of AI providers simultaneously. Each provider has its own API keys, model list, and parameter defaults.
|
||||
|
||||
## Supported Providers
|
||||
|
||||
BoosApi includes first-class support for the following providers. Any service that exposes an OpenAI-compatible API also works out of the box.
|
||||
|
||||
| Provider | Example Models |
|
||||
|----------|---------------|
|
||||
| **OpenAI** | GPT-4o, GPT-4, o3, o4-mini |
|
||||
| **Anthropic** | Claude 4 Sonnet, Claude 4 Opus, Claude 3.5 Sonnet |
|
||||
| **Google** | Gemini 2.5 Pro, Gemini 2.5 Flash, Gemini 2.0 |
|
||||
| **DeepSeek** | DeepSeek V3, DeepSeek R1 |
|
||||
| **Alibaba Cloud** | Qwen series |
|
||||
| **Zhipu AI** | GLM series |
|
||||
| **xAI** | Grok series |
|
||||
| **Any OpenAI-compatible API** | Ollama, vLLM, LiteLLM, third-party relays, etc. |
|
||||
|
||||
---
|
||||
|
||||
## Adding a Provider
|
||||
|
||||
1. Go to **Settings → Providers**.
|
||||
2. Click the **+** button at the bottom left.
|
||||
3. Fill in the provider details:
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| **Name** | A display name for the sidebar (e.g. *OpenAI*) |
|
||||
| **Type** | Provider type — determines the default base URL and API behavior |
|
||||
| **Icon** | Optional icon for visual identification |
|
||||
| **API Key** | The secret key from your provider's dashboard |
|
||||
| **Base URL** | API endpoint (pre-filled for built-in types, changeable for relays) |
|
||||
| **API Path** | Request path — defaults to `/v1/chat/completions` |
|
||||
|
||||
::: tip
|
||||
For third-party relay services, keep the type set to **OpenAI** (or the matching upstream type) and change the **Base URL** to the relay's endpoint.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Importing from a Website Link
|
||||
|
||||
Provider websites can offer an **Open in BoosApi** link that opens the BoosApi desktop app and pre-fills the provider settings. BoosApi will switch to **Settings → Providers**, show a confirmation dialog, and import the provider only after the user confirms.
|
||||
|
||||
This is useful for API vendors, relay services, private model platforms, and local gateway dashboards that want to help users configure BoosApi without copying every field manually.
|
||||
|
||||
### User Flow
|
||||
|
||||
1. Install and open a version of BoosApi that supports provider links.
|
||||
2. Click the provider's **Open in BoosApi** link in your browser.
|
||||
3. Confirm the provider name, Base URL, provider type, and API key prefix in BoosApi.
|
||||
4. BoosApi creates a new provider or reuses an existing provider with the same **Base URL + type**, then adds the API key if it is not already present.
|
||||
|
||||
BoosApi does not validate the key or fetch models automatically. After importing, click **Fetch Models** or add models manually.
|
||||
|
||||
### Link Format
|
||||
|
||||
```text
|
||||
boosapi://providers?name=<name>&baseurl=<base-url>&apikey=<api-key>&type=<provider-type>
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```text
|
||||
boosapi://providers?name=OpenAI&baseurl=https%3A%2F%2Fapi.openai.com&apikey=sk-xxx&type=openai
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Required | Description |
|
||||
|-----------|----------|-------------|
|
||||
| `name` | Yes | Display name shown in BoosApi, for example `OpenAI` or `My Relay` |
|
||||
| `baseurl` | Yes | Provider Base URL, URL-encoded. Only `http` and `https` are accepted. Query strings and fragments are rejected. |
|
||||
| `apikey` | Yes | API key to save into BoosApi. BoosApi shows only a prefix in the confirmation dialog. |
|
||||
| `type` | Yes | Provider type. Allowed values: `openai`, `openai_responses`, `anthropic`, `gemini`, `custom`. |
|
||||
|
||||
`baseurl` can use BoosApi's existing force suffix, for example `https://example.com!`. BoosApi stores `api_path` as empty for imported providers and continues to use the default path for the selected provider type.
|
||||
|
||||
### Website Configuration
|
||||
|
||||
Use `encodeURIComponent` for every dynamic value:
|
||||
|
||||
```html
|
||||
<a id="open-boosapi" href="#">Open in BoosApi</a>
|
||||
|
||||
<script>
|
||||
const provider = {
|
||||
name: 'My Relay',
|
||||
baseurl: 'https://api.example.com',
|
||||
apikey: 'sk-user-key',
|
||||
type: 'openai',
|
||||
};
|
||||
|
||||
const params = new URLSearchParams({
|
||||
name: provider.name,
|
||||
baseurl: provider.baseurl,
|
||||
apikey: provider.apikey,
|
||||
type: provider.type,
|
||||
});
|
||||
|
||||
document.getElementById('open-boosapi').href = `boosapi://providers?${params.toString()}`;
|
||||
</script>
|
||||
```
|
||||
|
||||
If your service lets users generate API keys, create the link only after the user is signed in and has explicitly selected or created a key.
|
||||
|
||||
::: warning Security
|
||||
An API key in a URL may be visible to browser history, logs, extensions, or analytics tools. Do not place provider import links with real keys on public pages, in static HTML, or in third-party tracking redirects. Prefer generating the link on a private account page after user confirmation.
|
||||
:::
|
||||
|
||||
::: tip Testing
|
||||
Custom URI schemes are registered by the installed desktop app. If `boosapi://...` does not open BoosApi, install or rebuild the latest BoosApi app first; running only the website or Vite dev server does not register the system scheme.
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## Importing from CC Switch
|
||||
|
||||
BoosApi can scan CC Switch provider configurations from Settings -> Providers. Review each candidate, select the importable rows, then import providers, Base URLs, API keys and model lists into BoosApi. OAuth-only entries and entries without reusable keys are skipped with a visible reason.
|
||||
|
||||
## Advanced Model Request Body
|
||||
|
||||
Each model can define extra_body, a JSON object flattened into OpenAI-compatible Chat Completions requests. It is useful for vendor-specific options such as enable_thinking. BoosApi validates the JSON and blocks reserved fields such as model, messages, stream, tools and base sampling parameters.
|
||||
|
||||
## Multi-Key Rotation
|
||||
|
||||
BoosApi supports multiple API keys per provider for load distribution and rate-limit avoidance.
|
||||
|
||||
### Adding Keys
|
||||
|
||||
In the provider detail panel, click **Add Key** to add additional API keys. Each key shows its prefix, creation date, and last-used timestamp.
|
||||
|
||||
### How Rotation Works
|
||||
|
||||
BoosApi rotates through enabled keys automatically using a round-robin index. When a request completes, the rotation index advances to the next key. If a key is disabled or fails validation, it is skipped.
|
||||
|
||||
### Validating Keys
|
||||
|
||||
Click the **validate** button next to a key to verify it against the provider's API. The validation result and any error message are recorded for reference.
|
||||
|
||||
---
|
||||
|
||||
## Model Management
|
||||
|
||||
### Fetching Models
|
||||
|
||||
Click **Fetch Models** in the provider detail panel to pull the full list of available models from the provider's API. The discovered models are added to your local list automatically.
|
||||
|
||||
### Adding Models Manually
|
||||
|
||||
If a model is not returned by the API (e.g. a fine-tuned model or a new release), you can add it by typing the model ID directly.
|
||||
|
||||
### Per-Model Parameters
|
||||
|
||||
Each model can have its own default parameter overrides. Open the model's settings to configure:
|
||||
|
||||
| Parameter | Description |
|
||||
|-----------|-------------|
|
||||
| **Temperature** | Controls randomness (0 = deterministic, higher = more creative) |
|
||||
| **Max Tokens** | Maximum number of tokens in the response |
|
||||
| **Top P** | Nucleus sampling threshold |
|
||||
| **Frequency Penalty** | Reduces repetition of token sequences |
|
||||
| **Presence Penalty** | Encourages the model to introduce new topics |
|
||||
|
||||
### Model Capabilities
|
||||
|
||||
BoosApi tracks capabilities per model — such as **Vision**, **Function Calling**, and **Reasoning** — and displays them as tags. These capabilities affect which features are available during a conversation.
|
||||
|
||||
---
|
||||
|
||||
## Custom & Local Endpoints
|
||||
|
||||
BoosApi works with any endpoint that implements the OpenAI chat completions API.
|
||||
|
||||
### Ollama (Local Models)
|
||||
|
||||
1. Install and start [Ollama](https://ollama.com/).
|
||||
2. In BoosApi, create a new provider with type **OpenAI**.
|
||||
3. Set the **Base URL** to `http://localhost:11434`.
|
||||
4. Click **Fetch Models** to discover the models you have pulled locally.
|
||||
|
||||
### vLLM / TGI
|
||||
|
||||
Point the **Base URL** to the address of your inference server (e.g. `http://localhost:8000`) and fetch or add models as usual.
|
||||
|
||||
### API Relay Services
|
||||
|
||||
For relay or aggregator services (e.g. OpenRouter, one-api), set the type to **OpenAI**, enter the relay's base URL, and provide the relay's API key.
|
||||
|
||||
---
|
||||
|
||||
## Default Model Settings
|
||||
|
||||
### Default Assistant Model
|
||||
|
||||
Go to **Settings → Default Model** to choose the provider and model that new conversations use by default. You can always override the model on a per-conversation basis from the model selector.
|
||||
|
||||
### Topic Naming Model
|
||||
|
||||
BoosApi can automatically generate a title for each conversation. In the default model settings, you can assign a separate, lightweight model for topic naming to save cost and latency. Configure a custom prompt and context window size for title generation.
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
|
||||
- [MCP Servers](./mcp) — connect external tools to extend AI capabilities
|
||||
- [API Gateway](./gateway) — expose your providers as a local API server
|
||||
Reference in New Issue
Block a user