Developer documentation
One API. Leading AI models.
Create an API key, set the base URL, and start using supported models through a compatible endpoint.
1. Create an API key
Open the console, go to API Keys, create a key with the model group you need, and store it securely.
Base URL
https://modviax.com Use the TianWaiAI address when visiting tianwaiai.com.Test your connection with a compatible chat completion request:
curl https://modviax.com/v1/chat/completions \
-H "Authorization: Bearer $MODVIAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"Hello"}]}'2. Configure Claude Code
Install Claude Code, then add the following environment variables to your shell or settings file:
ANTHROPIC_AUTH_TOKEN=sk-your-api-key ANTHROPIC_BASE_URL=https://modviax.com ANTHROPIC_MODEL=claude-opus-5
Update Claude Code with claude update when needed.
3. Configure Codex
Install the Codex CLI and place your key in ~/.codex/auth.json. Set the compatible provider in config.toml:
model_provider = "custom" model = "gpt-5.6-sol" model_reasoning_effort = "xhigh" disable_response_storage = true [model_providers.custom] name = "custom" wire_api = "responses" requires_openai_auth = true base_url = "https://modviax.com/v1"
4. Use CC-Switch
CC-Switch makes it easy to manage Claude Code and Codex profiles. Add a profile, enter your API key and base URL, select the model, then save and activate it.
5. Connect OpenCode
Add a provider in ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"provider": {"anthropic": {"npm": "@ai-sdk/anthropic", "name": "modviax", "options": {"baseURL": "https://modviax.com/v1", "apiKey": "sk-your-api-key"}}}
}