Chat Completions API — GPT-4o, Claude, Gemini
Complete API reference for chat completions. Request/response format, streaming, parameters, code examples, and model selection. TokenMix is an OpenAI-compatible AI API relay using Base URL https://api.tokenmix.ai/v1.
TokenMix API endpoint
- Base URL:
https://api.tokenmix.ai/v1 - Use one TokenMix API key to call the current supported model catalog.
- OpenAI SDK compatible; usually only base_url needs to change.
curl https://api.tokenmix.ai/v1/chat/completions \ -H "Authorization: Bearer $TOKENMIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'