Skip to main content
  1. Posts/

Python Developers: Connect to AI APIs in 5 Minutes

·31 words·1 min·
Author
XiDao
XiDao provides stable, high-speed, and cost-effective LLM API gateway services for developers worldwide. One API Key to access OpenAI, Anthropic, Google, Meta models with smart routing and auto-retry.
Table of Contents

Quick Start
#

from openai import OpenAI
client = OpenAI(
    api_key="your-xidao-api-key",
    base_url="https://global.xidao.online/v1"
)
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Write quicksort in Python"}]
)

👉 Get your API Key: global.xidao.online