API keys
Use yAI's models from your own code. The API works like OpenAI's, so most libraries and tools that take a "base URL" work with it. Calls count toward your own daily limits (yAI Ultra's dollar allowance included) and show on your usage page.
Your keys
Loading…
Calling the API
Base URL · send your key as Authorization: Bearer yai_…
Add "stream": true for a streamed reply (server-sent events, the same chunks as OpenAI's). A system message becomes instructions at the top of the conversation.
Models
| Model id | Also called | About |
|---|---|---|
deepseek-v4-pro | yai-ultra | yAI Ultra, the most capable. Uses your daily dollar allowance. |
glm-4.7-flash | yai-lite | yAI Lite (GLM-4.7 Flash): free, text only. The default when no model is given. |
deepseek-v4.1-flash | yai-ultra-flash | yAI Ultra Flash (DeepSeek V4.1 Flash): fast and about a tenth of yAI Ultra's price. Same daily allowance. |
qwen3.8-max | yai-max | yAI Q3.8 Max (Qwen3.8 Max, 2.4T parameters): a strong all-rounder between Flash and Ultra in price. Same daily allowance. |
GET /v1/models lists what's available right now, including yAI Q3.5 when the host PC is on. | ||