This document explains how to integrate Nexhina into mainstream AI coding tools such as Cursor, Windsurf, and Continue, so that these tools can use your own models and quotas.
Add model| Use Case | Model Name | Description |
|---|---|---|
| Daily coding | gpt-4o | Top-tier multimodal, strong general coding |
| Complex reasoning | o3 | Enhanced reasoning, good for debugging, math, and logic |
| General conversation | gpt-4o-mini | Fast and cost-effective, great for everyday chat |
| Long context | gpt-4.1 | 1M context window, handles large codebases |
| Professional writing | claude-sonnet-4-20250514 | Claude Sonnet 4, strong at long-form generation and analysis |
| Config Item | Value |
|---|---|
| API Key | sk-your-Nexhina-key (your Nexhina token) |
| Base URL | https://token.nexhina.ai/v1 |
Verify after filling in. A success message indicates the configuration is complete.Cmd+L / Ctrl+L)@Docs feature can inject external documents as context into the conversation, allowing the model to answer questions based on your API documentation.Add new doc| Config Item | Value |
|---|---|
| Name | Nexhina Docs |
| URL | https://token.cshuacai.cn (your documentation site URL) |
| Start URL (optional) | Documentation home page URL |
Save@Docs and select Nexhina Docs@Nexhina Docs How do I use Function Calling?@Nexhina Docs Help me write a Python function to call the Embedding API| Config Item | Value |
|---|---|
| API Base URL | https://token.nexhina.ai/v1 |
| API Key | sk-your-Nexhina-key |
| Model | gpt-4o or other available models |
~/.windsurf/settings.json:{
"aiProvider": "openai-compatible",
"openaiCompatible": {
"baseUrl": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key",
"models": [
{ "id": "gpt-4o", "name": "GPT-4o" },
{ "id": "o3", "name": "o3" },
{ "id": "gpt-4o-mini", "name": "GPT-4o mini" },
{ "id": "claude-sonnet-4-20250514", "name": "Claude Sonnet 4" }
]
}
}~/.continue/config.json (or ~/.continue/config.yaml):{
"models": [
{
"title": "Nexhina GPT-4o",
"provider": "openai",
"model": "gpt-4o",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina o3",
"provider": "openai",
"model": "o3",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina GPT-4o mini",
"provider": "openai",
"model": "gpt-4o-mini",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
},
{
"title": "Nexhina Claude Sonnet 4",
"provider": "openai",
"model": "claude-sonnet-4-20250514",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
}
],
"tabAutocompleteModel": {
"title": "Nexhina Autocomplete",
"provider": "openai",
"model": "gpt-4o-mini",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
},
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
}
}| Field | Description |
|---|---|
models | List of conversation models, appears in Continue's model selection dropdown |
tabAutocompleteModel | Code completion model, recommended to use a fast model (gpt-4o-mini) |
embeddingsProvider | Embedding model for codebase indexing |
github.copilot.chatNote: Copilot's support for custom models is continuously evolving, and the specific configuration method may change between versions. If custom models are not supported, we recommend using Cursor or Continue as alternatives.
| Config Item | Value |
|---|---|
| Server URL | https://token.nexhina.ai/v1 |
| API Key | sk-your-Nexhina-key |
| Model | gpt-4o or other |
Test Connection to verify| Client | Platform | Configuration |
|---|---|---|
| ChatBox | Desktop | Settings → API Base URL + Key |
| NextChat | Web | Settings → Endpoint + Key |
| LobeChat | Web/Desktop | Settings → Model Service → Proxy URL + Key |
| Open WebUI | Web | Settings → API URL + Key |
| Cherry Studio | Desktop | Settings → API URL + Key |
| Config Item | Value |
|---|---|
| API Base URL | https://token.nexhina.ai/v1 |
| API Key | sk-your-Nexhina-key |
| Check Item | Correct Value |
|---|---|
| Base URL | https://token.nexhina.ai/v1 (ends with /v1) |
| API Key | Starts with sk-, no extra spaces |
| Model name | Must be an id returned by GET /v1/models, watch out for case sensitivity |
| Network connectivity | curl https://token.nexhina.ai/v1/models should return normally |
gpt-4o not GPT-4o)gpt-4o-minio3) for completiontabAutocompleteModelmodel_not_found error in chat?apiBase in the models array.embeddingsProvider is configured correctly:{
"provider": "openai",
"model": "text-embedding-3-large",
"apiBase": "https://token.nexhina.ai/v1",
"apiKey": "sk-your-Nexhina-key"
}| Config Item | Value |
|---|---|
| Base URL | https://token.nexhina.ai/v1 |
| API Key | sk-your-Nexhina-key |
| Tool | Configuration Entry | Description |
|---|---|---|
| Cursor | Settings → Models → API Key | Fill in Base URL + Key |
| Windsurf | Settings → AI Provider | Select Compatible |
| Continue | ~/.continue/config.json | Edit config file |
| JetBrains | Settings → Tools → AI Assistant | Select Custom Provider |
| ChatBox | Settings → API | Fill in URL + Key |
| LobeChat | Settings → Model Service | Fill in Proxy URL + Key |
| NextChat | Settings → Endpoint | Fill in URL + Key |
| Open WebUI | Settings → API | Fill in API URL + Key |