Back to blog
Technical Practice · Vortap Team

5-Minute Integration: Change base_url, Zero Changes to Existing Code

Fully compatible with the OpenAI format. Change just two lines of configuration to access global large models directly at high speed from within China.

Migrating to Vortap is virtually cost-free—just point the request base_url to our gateway and replace it with your Vortap API Key.

Python Example

from openai import OpenAI

client = OpenAI(
    base_url="https://api.vortapapi.com/v1",
    api_key="YOUR_VORTAP_KEY",
)

resp = client.chat.completions.create(
    model="claude-opus-4",
    messages=[{"role": "user", "content": "你好"}],
)
print(resp.choices[0].message.content)

The same Key lets you switch between OpenAI, Claude, Gemini, DeepSeek, and all other models without changing the rest of your business code. For more details, see the Documentation Center.