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 Host" auto-appends /v1/chat/completions. Stop the URL at the host (or /v1); append # to disable auto-append.
Keep your API key private
#3. Check it works
- Pick the model in the app and send a short message such as “hello”.
- A reply means you are connected. The call shows up in Console → Usage.
- If the app rejects the key, check whether it wants the address with or without /v1.
#MCP tools
Model connection and MCP are separate
For Codex, add a remote MCP server with the CLI or place the equivalent block in ~/.codex/config.toml:
# 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
#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.