Getting work done · Best AI for
Function calling & JSON
Calling your API with the right arguments and returning clean, valid JSON.
Top tested so far: Claude Opus 4.5 (Anthropic)

Claude Opus 4.5 from Anthropic is the best tested so far (100/100), followed by Claude Sonnet 4.5 and Gemini 3 Pro. Most of today's newest top models haven't taken these tests yet. The Berkeley Function-Calling Leaderboard (BFCL) checks thousands of tool calls: the right function, the right arguments, and knowing when not to call anything.
Heads up: most of today's newest top models haven't taken these tests yet, so this ranking leans on older results. Check the grid for the newest models.
Top 15 for function calling & JSON
Score = share of today's AI models it beats on the tests below (100 = best of all).
- 1Claude Opus 4.5Anthropic · a few tests100
- 2Claude Sonnet 4.5Anthropic · a few tests98
- 3Gemini 3 ProGoogle · a few tests95
- 4GLM-4.6Z.ai (Zhipu) · a few tests93
- 5Grok 4.1 FastxAI · a few tests90
- 6Claude Haiku 4.5Anthropic · a few tests88
- 7o3OpenAI · a few tests85
- 8Grok 4xAI · a few tests83
- 9Kimi K2 (Jul 2025)Moonshot AI (Kimi) · a few tests80
- 10Command A+Cohere · a few tests78
- 11DeepSeek-V3.2-ExpDeepSeek · a few tests76
- 12Gemini 2.5 Flash (Sep 2025)Google · a few tests73
- 13GPT-5.2OpenAI · a few tests71
- 14GPT-5 miniOpenAI · a few tests68
- 15GPT-4.1OpenAI · a few tests66
Best overall
Score 100 · Anthropic · $0.022 per job
Best under $1
Score 76 · DeepSeek · <$0.001 per job
Best open source
Score 93 · Z.ai (Zhipu) · $0.0025 per job
What it costs to make one tool call
≈ 3K tokens read and 300 written per job, at each model's list API price. Monthly chat-app plans don't charge per job.
| Model | Score | Per job | Per 1,000 jobs | Memory |
|---|---|---|---|---|
| Claude Opus 4.5 | 100 | $0.022 | $22.50 | 200K |
| Claude Sonnet 4.5 | 98 | $0.013 | $13.50 | 200K |
| Gemini 3 Pro | 95 | — | — | — |
| GLM-4.6best value | 93 | $0.0025 | $2.46 | 205K |
| Grok 4.1 Fast | 90 | — | — | — |
| Claude Haiku 4.5 | 88 | $0.0045 | $4.50 | 200K |
| o3 | 85 | $0.0084 | $8.40 | 200K |
| Grok 4 | 83 | — | — | — |
| Kimi K2 (Jul 2025) | 80 | — | — | — |
| Command A+ | 78 | $0.011 | $10.50 | 256K |
| DeepSeek-V3.2-Exp | 76 | <$0.001 | $0.933 | 164K |
| Gemini 2.5 Flash (Sep 2025) | 73 | $0.0016 | $1.65 | 1M |
| GPT-5.2 | 71 | $0.0095 | $9.45 | 400K |
| GPT-5 mini | 68 | $0.0014 | $1.35 | 400K |
| GPT-4.1 | 66 | $0.0084 | $8.40 | 1M |
Highlighted: the cheapest model within 15% of the top score.
Tests behind this ranking
Share = how much each test counts towards the score.
| Berkeley Function Calling Leaderboard (BFCL)Can it use tools and apps the right way when asked? | 89% |
| APEX-AgentsCan it do the work of a banker, consultant or lawyer? | 11% |
Tips
- Use the provider's structured-output or JSON mode. It removes most broken-JSON errors whatever the model.
Quick answers
Which AI is best at function calling?
Claude Opus 4.5 from Anthropic is the best tested so far (100/100), followed by Claude Sonnet 4.5 and Gemini 3 Pro. Most of today's newest top models haven't taken these tests yet.
About Claude Opus 4.5 →What's the best cheap AI for function calling & JSON?
DeepSeek-V3.2-Exp: 76/100 for about $0.3 per million tokens. One job (make one tool call) costs about <$0.001.
See the details →What's the best open-source AI for function calling & JSON?
GLM-4.6 from Z.ai (Zhipu), scoring 93/100. You can download it and run it yourself.
See the details →How much does it cost to make one tool call with AI?
With Claude Opus 4.5, about $0.022 (≈ 3K tokens read, 300 written, at list API prices). GLM-4.6 scores nearly as well for $0.0025. Chat apps on a monthly plan don't charge per job.
How is this decided?
The Berkeley Function-Calling Leaderboard (BFCL) checks thousands of tool calls: the right function, the right arguments, and knowing when not to call anything.
How scores work →