Integration Guide¶
The Serevix AI gateway lets you reuse a single API key across Claude Code, Cursor, OpenCode, and other AI tools to access Claude / GPT / Gemini and other LLMs — and you can also call the gateway directly from your own code through compatible protocols. This page focuses on tool integrations; protocol-level API details live in the sidebar.
1. Create an API Key and Confirm the Base URL¶
Sign in to the Serevix AI console and create your API key directly — no request form required. For larger quotas or technical support, contact aisupport@serevixai.com.
| Item | Value |
|---|---|
| Base URL | https://gateway.serevixai.ai |
| OpenAI-compatible path | https://gateway.serevixai.ai/v1 |
| Authentication | Authorization: Bearer YOUR_API_KEY |
2. Use with IDEs / Coding Assistants¶
2.1 Claude Code¶
Claude Code automatically reads the ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN environment variables — no further setup is required:
export ANTHROPIC_BASE_URL=https://gateway.serevixai.ai
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
claude
To make it persistent, add the export lines to your ~/.zshrc or ~/.bashrc.
2.2 Cursor¶
Cursor uses the OpenAI-compatible protocol. The base URL must end with /v1.
- Open Cursor → Settings → Models
- Paste your API key into the OpenAI API Key field
- Expand Override OpenAI Base URL and set it to:
https://gateway.serevixai.ai/v1 - Add the model IDs you want to use (e.g.
gpt-4o-mini,claude-sonnet-4-6— see the model catalog for the live list) - Click Verify / Save
2.3 OpenCode¶
OpenCode reads ~/.config/opencode/opencode.json (C:\Users\<USERNAME>\.config\opencode\opencode.json on Windows). Override baseURL for each provider in the file, then run opencode auth login to register the same API key against each provider — OpenCode does not store keys in the config file:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"anthropic": {
"name": "Anthropic",
"options": {
"baseURL": "https://gateway.serevixai.ai"
}
},
"openai": {
"name": "OpenAI",
"options": {
"baseURL": "https://gateway.serevixai.ai/v1"
}
},
"gateway": {
"npm": "@ai-sdk/openai-compatible",
"name": "Serevix AI Gateway",
"options": {
"baseURL": "https://gateway.serevixai.ai/v1"
}
}
}
}
anthropic— Claude models via the native Anthropic Messages protocolopenai— GPT models via the OpenAI-compatible protocolgateway— other vendors (Gemini, DeepSeek, ERNIE, …) via@ai-sdk/openai-compatible; declare the model IDs you want under amodelsfield on this block. Model IDs come from the model catalog.
3. Supported Models¶
The live list of supported models and pricing lives at the model catalog.
4. Calling the API Directly¶
If you aren't using an IDE assistant and want to call the gateway from your own services, jump to the protocol you need:
- Chat Completion (OpenAI-compatible)
- Chat Completion (Anthropic Messages)
- Chat Completion (Gemini native)
- Image Generation
5. FAQ¶
5.1 How is this different from calling the vendor APIs directly?¶
The Serevix AI gateway is fully compatible with the upstream OpenAI, Anthropic, and Gemini protocols — your existing code does not need to change. The difference is that the gateway adds multi-account rotation, load balancing, and rate-limit protection, giving better overall availability than a single-account direct connection.
5.2 Is streaming supported?¶
Yes. Streaming is enabled for every model that supports it on OpenAI, Anthropic, and Gemini. Usage is identical to the corresponding official APIs — no extra parameters required.
5.3 Can the same API key be used across multiple projects?¶
Yes. A single key has no project or concurrent-scope limit; Claude Code, Cursor, and your own backends can share it. Request additional keys only if you need source isolation or split quotas.
5.4 What should I do if my API key leaks?¶
Sign in to the Serevix AI console immediately, delete the compromised key, and create a new one. The old key is invalidated the moment it is deleted — remember to update every service that uses it.
5.5 How do I request more model access or technical support?¶
Contact the Serevix AI support team at aisupport@serevixai.com.