Endpoints — Markdown source
Raw Markdown for copying or feeding to AI agents.
> **AI Agents**: Index `/api/llms.txt` | Full EN `/api/llms-full-en.txt` | Full ZH `/api/llms-full-zh.txt` | OpenAPI `/api/openapi.yaml`
> Base URL (Global): `https://api.supanexus.ai/v1` | CN: `https://api.supanexus.io/v1`
# Endpoints
SupaNexus provides two endpoints that share the **same account and API key**. Request paths, authentication, model list, and billing are identical — use either.
Replace `<BASE_URL>` in other docs with a base URL from the table below.
## Base URLs
| Site | Base URL | When to use |
|------|----------|-------------|
| Global | `https://api.supanexus.ai/v1` | Default endpoint |
| CN | `https://api.supanexus.io/v1` | Backup endpoint |
## How to choose
- Use Global by default.
- If Global is unreachable or unstable, switch to the CN backup endpoint.
- When switching, change only `base_url` / `SNX_BASE_URL` / `OPENAI_BASE_URL` (or equivalent). API key and other code stay the same.
## OpenAI SDK
OpenAI-compatible paths include `/v1`:
```python
from openai import OpenAI
client = OpenAI(
base_url="https://api.supanexus.ai/v1", # or "https://api.supanexus.io/v1"
api_key="your-api-key",
)
```
## Anthropic SDK
Anthropic SDK `base_url` does **not** include `/v1`:
```python
import anthropic
client = anthropic.Anthropic(
api_key="sk-snx-...",
base_url="https://api.supanexus.ai", # or "https://api.supanexus.io"
)
```
## Related
- [Quickstart](./quickstart.md)
- [OpenAI SDK Integration](./openai-sdk-integration.md)
- [Anthropic SDK Integration](./anthropic-sdk-integration.md)