aisplice

Getting started

Use it in an app

Use your key in apps you already have, without writing code. Pick the app, copy its settings, and you are done. These steps are for GPT models.

#1. Pick your app

Chat and translation apps

Coding tools

Your own code

#2. Copy the settings

Cherry Studio

Open: Settings (设置) → Model Providers (模型服务) → OpenAI

API Key

API Host

Model

"API Host" auto-appends /v1/chat/completions. Stop the URL at the host (or /v1); append # to disable auto-append.

Keep your API key private

Store the key in an environment variable or secret manager. Never paste a permanent key into browser code, screenshots, or a repository.

#3. Check it works

  1. Pick the model in the app and send a short message such as “hello”.
  2. A reply means you are connected. The call shows up in Console → Usage.
  3. If the app rejects the key, check whether it wants the address with or without /v1.

#MCP tools

Model connection and MCP are separate

aisplice provides the model connection. MCP servers provide external tools and data. Configure the aisplice provider and each MCP server separately inside Codex, Cursor, or your other client.

For Codex, add a remote MCP server with the CLI or place the equivalent block in ~/.codex/config.toml:

Codex MCP
# CLI
codex mcp add my-tools --url https://mcp.example.com/mcp

# equivalent ~/.codex/config.toml
[mcp_servers.my-tools]
url = "https://mcp.example.com/mcp"

MCP authentication is separate

Your aisplice API key authenticates model requests only. Follow the MCP server provider’s instructions for OAuth, headers, or environment variables, then restart the client so it reloads the configuration.

#Moving from the OpenAI SDK

#The two-line diff

For most codebases this is the entire PR. Because the wire format is OpenAI-compatible, streaming, tool calling, vision, and structured outputs continue to work with the code you already have.

const client = new OpenAI({
- baseURL: "https://api.openai.com/v1",
+ baseURL: "https://www.aisplice.store/v1",
- apiKey: process.env.OPENAI_API_KEY,
+ apiKey: process.env.GATEWAY_API_KEY,
});

Still stuck?

Send us the request ID or the error message and we will look into it.