Anthropic API
Top choice for coding and agentic reliability (Claude Sonnet 5.5).
- Best for
- Agents and code generation
- Pricing
- Per-token, see site
- Stack fit
- REST, Python/TS SDKs
The models powering your app and your agents.
Last updated · 6 tools ranked
On this page: Ranking · Best API providers: which model API to pick (checked 2026-11-13) · Who keeps your prompts?
Top choice for coding and agentic reliability (Claude Sonnet 5.5).
Broadest platform; new Agents API (beta) exposes the Codex harness.
Strong models, long context and a free tier.
Heads-up, : From Nov 2, Firebase automatically enforces App Check for Firebase AI Logic in every project that isn't already enforcing it, so any request without a valid App Check token is blocked — including from released app versions that never implemented App Check. If Gemini calls through Firebase AI Logic suddenly stop, check Security > App Check > APIs in the Firebase console; you can temporarily push the enforcement date back, but not past Jan 21, 2027. Firebase warns that leaving it off exposes your Gemini API access to abuse. Ranking unchanged. Source
Grok models via API; competitive for reasoning.
One key for hundreds of models; easy fallback.
Fast hosted open-weight models.
This page ranks model and LLM API providers: the companies you call from your own code to get text, code and agent output from AI models. It is not a ranking of app-store or ranking-data APIs. The ranking above is the one list we keep; this section does not change it. It adds what each provider's own pages say about how you pay, so you can compare before you sign up. Rankings are never for sale. Last verified
| Provider (ranking order) | Best for | How you pay, per its own pages | Official source |
|---|---|---|---|
| Anthropic API | Agents and code generation | Pay per token. Claude Sonnet 5.5 is listed at $2 input and $10 output per million tokens. New users get free credits to test; there is no ongoing free tier. | Anthropic pricing |
| OpenAI API | General apps and hosted agents | Pay per token. GPT-6.1 Sol is listed at $2 input and $10 output per million tokens on the standard tier; other models cost more or less. | OpenAI API pricing |
| Google Gemini API | Cost-sensitive and multimodal apps | Has a free tier for some models and a paid per-token tier; a Batch API gives a 50% cost reduction. One paid model's listed price doubles on December 1, 2026, so check the model you plan to use. | Gemini API pricing |
| xAI API | Grok-powered apps | Pay per token. Grok 4.7 is listed at $2 input and $6 output per million tokens for prompts under 200k tokens, and double that at 200k tokens or more. The pricing page does not describe a free tier. | xAI models and pricing |
| OpenRouter | Comparing and switching models | One API key for many providers. It passes provider prices through with no markup and charges 5.5% ($0.80 minimum) when you buy credits. Free models are capped at 50 requests a day, or 1,000 a day once you have bought at least 10 credits. | OpenRouter FAQ |
| Together AI | Open models at scale | Pay per token for open-weight models, priced per model (for example gpt-oss-120B is listed at $0.15 input and $0.60 output per million tokens). Dedicated endpoints are available for larger workloads. | Together AI pricing |
If you build agents or write code with the model, start with the top of the ranking and test it on your own tasks. If cost matters most, compare the per-token prices above and try the Gemini free tier first. If you want to switch models without rewriting code, an aggregator such as OpenRouter lets you change the model name instead of the provider. If you will send sensitive data, read the "Who keeps your prompts?" table below before you pick.
Prices change; confirm on the official pages before you buy: Anthropic · OpenAI · Google · xAI · OpenRouter · Together AI.
What each provider in this ranking says it does with the prompts and outputs you send to its API: how long it keeps them by default, whether zero data retention (ZDR) is offered and to whom, and whether your data trains its models. Taken from each provider's own docs and terms. Listed in ranking order; this table is not a ranking and does not affect it.
| Provider | Default API retention | Zero data retention | Used for training? | Official source | Verified |
|---|---|---|---|---|---|
| Anthropic API | Inputs and outputs deleted within 30 days by default. Content flagged for Usage Policy violations can be kept up to 2 years; features you store data in (e.g. Files API) keep it until deleted. | Yes, by arrangement: an organization requests it from Anthropic sales. Covers eligible Messages API features only; some models require 30-day retention and are excluded. | No by default for API (commercial) data. Used only if you send feedback (e.g. thumbs up/down) or otherwise opt in. | Retention Training ZDR | |
| OpenAI API | Abuse-monitoring logs, which can include prompts and responses, kept up to 30 days. Some endpoints keep more: the Responses API stores responses 30 days by default (unless store=false); Files, Assistants and Batches keep data until deleted. | Yes, for eligible customers approved by OpenAI (contact sales); Modified Abuse Monitoring is the other option. Not every endpoint is ZDR-eligible. | No by default since March 1, 2023. Used only if you explicitly opt in to share data. | Data controls | |
| Google Gemini API | Paid tier: prompts and responses logged 55 days for abuse monitoring. Grounding with Google Search or Maps: stored 30 days. Developer-visible logs are on by default in projects created on or after Oct 26, 2026 (7 to 55 days; can be turned off). | Not guaranteed on the Gemini Developer API; Google points workloads that need guaranteed ZDR to Vertex AI. | Free (unpaid) tier: yes, used to improve Google products, and human reviewers may read it (paid-tier rules apply in the EEA, Switzerland and UK). Paid tier: no, unless you share logs/datasets or join the invite-only Contributor Tier. | Terms Abuse monitoring ZDR Logs | |
| xAI API | All API requests and responses stored (encrypted) 30 days for abuse auditing, then deleted automatically. | Yes, team-wide: a team admin can turn it on in the xAI Console where self-serve is available (otherwise via sales). Disables stored-data features such as Files, Collections and the Batch API. | No. xAI says it never trains on API inputs or outputs without your explicit permission. | Security FAQ | |
| OpenRouter | OpenRouter does not store prompts or responses unless you opt in to logging (content flagged as potential CSAM excepted); it keeps request metadata. The upstream provider your request is routed to applies its own retention. | Yes, for any account: restrict routing to ZDR endpoints in privacy settings, per guardrail, or per request (provider.zdr). | OpenRouter: no, unless you opt in (for a 1% discount). Upstream providers follow their own policies; you can block routing to providers that may train. | Data collection ZDR Provider policies | |
| Together AI | Stores prompts and responses by default and may use them for product improvements; you can delete them. Passthrough models follow the upstream provider's policy. | Yes, self-serve: an organization admin sets "Store prompts and model responses" to No (Limited tier must add a payment method first). This also turns off passthrough models. | No by default. Training use is a separate opt-in that is off by default. | ZDR Privacy |
Policies change, and plans, regions and features (files, batches, stored conversations, grounding/search tools) often have their own rules. This is a summary, not legal advice: read the linked source and your own contract before sending sensitive data.
Official status pages, checked 2026-11-20: Anthropic API · OpenAI API · Gemini API (Google AI Studio) · xAI API (Grok) · OpenRouter. All status pages
Vendor-documented MCP servers, checked 2026-11-21: OpenAI API. All official MCP servers
As of November 9, 2026, AgentRank ranks Anthropic API #1: Top choice for coding and agentic reliability (Claude Sonnet 5.5). Best for: Agents and code generation.
OpenAI API is ranked #2: Broadest platform; new Agents API (beta) exposes the Codex harness. Best for: General apps and hosted agents.
Per official pricing pages checked 2026-11-09: Google Gemini API, OpenRouter. No free tier: Anthropic API, OpenAI API. Others: check the official site.
Per-token, see site (verified 2026-10-15; prices change, confirm on the official site).
Editorial scoring on capability (30%), developer experience (25%), price (20%), reliability (15%) and momentum (10%). No pay-to-rank.
Weekly: new AI dev-tool releases, price changes and free-tier catches. Free, unsubscribe anytime.