API keys

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 idAlso calledAbout
deepseek-v4-proyai-ultrayAI Ultra, the most capable. Uses your daily dollar allowance.
glm-4.7-flashyai-liteyAI Lite (GLM-4.7 Flash): free, text only. The default when no model is given.
deepseek-v4.1-flashyai-ultra-flashyAI Ultra Flash (DeepSeek V4.1 Flash): fast and about a tenth of yAI Ultra's price. Same daily allowance.
qwen3.8-maxyai-maxyAI 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.