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://www.yiairouter.com/api/v1
03
Call Any Model
Use any OpenAI SDK with no application-code rewrite.
Endpoint Reference
POST
/chat/completionsChat completions with streaming supportPOST
/completionsLegacy text completionsGET
/modelsList all available modelsPOST
/images/generationsImage generationPOST
/audio/transcriptionsSpeech to textPOST
/audio/speechText to speechPOST
/embeddingsText embeddings