Getting started
Use it in an app
Connect the tools you already use with your APIKing key. Pick an app, follow the setup steps, and copy its settings. Claude Code uses Claude models; Gemini CLI uses Gemini models.
#1. Pick your app
Chat and translation apps
Coding tools
Your own code
#2. Copy the settings
Cherry Studio
Open: Settings → Model Providers → Add provider
- Create a custom OpenAI-compatible provider named APIKing. Enter the API key and host, then enable the provider.
- Sync models or add the exact Model ID manually. In a new chat, select the model under APIKing and send a test message.
Enter the site root in API Host. Cherry Studio appends the request path.
Keep your API key private
#3. Check it works
- Pick the model in the app and send a short message such as “hello”.
- Open Console → Usage and look for the test request with the model you selected.
- For a 401, check that the APIKing key is active. For a 404 or model error, check the URL and exact Model ID in the selected guide.
#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://apiking.ai/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.