Function Calling API — Tool Use for AI Agents

Let AI models call your functions. Define tools, handle multi-turn flows, build agents. Works with GPT-4o, Claude, Gemini. Full code examples. 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"}]}'

Back to documentation