What you need
Send your first request
1
2
Call a model
Replace
YOUR_API_KEY, then run:3
Check the result
The answer is in
choices[0].message.content. Every call, with its usage and cost, shows up in Usage Logs. If the call fails, the error message says why — see Errors.Which base URL does my tool want?
Next steps
Generate a video
Async video tasks with MAGI-2, MiniMax-H3 and Wan.
Chat completions
Request fields, streaming and tool calls.
Claude Code
Use DeepSeek, Kimi or GLM as the model behind Claude Code.
Models
Which endpoint each model uses and how it is billed.