Quick Answer
Remember this: OpenAI models need
/v1, Claude uses root domain only, Gemini needs /v1beta. Incorrect Base URL is the most common integration issue.Why Different Base URLs for Different Models?
This is determined by each vendor’s SDK implementation:- OpenAI SDK: Appends resource paths after
base_url, so/v1must be included - Anthropic SDK: Internally appends
/v1/messages— adding/v1yourself results in/v1/v1/messages(404 error) - Google GenAI SDK: Uses
/v1betapath, SDK handles concatenation automatically
Code Examples
OpenAI-Compatible Models (GPT / DeepSeek / Llama etc.)
Claude Models (Anthropic SDK)
Gemini Models (Google GenAI SDK)
Domain Node Selection
APIYI provides 4 domain nodes with identical features, differing in network routing and deployment architecture:🌏 Global Direct (Recommended for Overseas)
vip.apiyi.comDirect connection to backend, lowest latency. Recommended for all non-China-mainland customers.🇨🇳 China Default (Recommended for Mainland)
api.apiyi.comOptimized for China mainland network. Default for China mainland customers.🏢 China Backup / Business
b.apiyi.comBackup node and Business enterprise line. Use when primary node is unavailable.⚡ Cloudflare CDN Global Acceleration
api-cf.apiyi.comCloudflare global CDN acceleration. For text-only API calls. Has a 100-second timeout limit.Common Error Troubleshooting
Full Configuration Reference
OpenAI-Compatible Models
Claude Models (Anthropic SDK)
Gemini Models
When using the Google GenAI SDK for Gemini, set
base_url to the root domain and api_version: "v1beta" — the SDK will automatically construct the full path.