API Reference

Integration Guide.

100% OpenAI-compatible. Drop in your base URL and you're live in under 2 minutes.

OpenAI-Compatible
Streaming Support
Offshore Routed
Multi-Modal
bash
# Install the OpenAI SDK (YiAI Router is 100% compatible)
pip install openai

# Set your API key
export YIAI_API_KEY="sk-your-key-here"

01

Create Account

Register and generate your API key in seconds.

02

Set Base URL

Point your SDK to https://api.yi-ai.cn/v1

03

Call Any Model

Use any OpenAI SDK with no application-code rewrite.

Endpoint Reference

POST/chat/completionsChat completions with streaming support
POST/completionsLegacy text completions
GET/modelsList all available models
POST/images/generationsImage generation
POST/audio/transcriptionsSpeech to text
POST/audio/speechText to speech
POST/embeddingsText embeddings
YiAI Router

Disclaimer: this gateway provides B2B routing infrastructure only. Data transit is completed through offshore non-jurisdictional nodes. Developers are responsible for complying with local laws and for the content they generate.

Account

Language

© 2026 YiAI Infrastructure.Zero Logs · Volatile Compute · Offshore Routed