The best AI APIs in 2026: language models, voice, images, search and video
What an AI API gives you
An API lets your own software call an AI model directly, without a chat window. Developers use APIs to add AI features to apps, automate workflows, process documents in bulk and build agents. You pay for what you use, usually per million tokens for text, per character or credit for voice, per image for images and per second for video. There is no monthly fee on most APIs, though some require prepaid credits.
| API | What it does | Pricing unit | Entry price |
|---|---|---|---|
| OpenAI | Text, images, speech, embeddings, realtime voice | Per million tokens | $0.05 input, gpt-5-nano |
| Anthropic | Claude text and vision, tool use, agents | Per million tokens | $0.10 input, Haiku 5.5 |
| Google Gemini | Text, images, video, audio | Per million tokens | Free tier, then $0.10 input |
| ElevenLabs | Text-to-speech, voice cloning, dubbing, speech-to-text | Credits | Plans from $6 a month |
| Stability AI | Image generation and editing | Credits per image | About $0.08, Stable Image Ultra |
| Perplexity | Web-grounded answers and search results | Tokens and requests | $1 per million tokens, Sonar |
| Runway | Video generation and editing | Credits per second | $0.01 a credit |
Language models: OpenAI, Anthropic and Google
OpenAI's API covers the widest range of tasks. Its current text models span from gpt-5-nano for cheap, high-volume work to gpt-6-astra for the hardest reasoning. It also offers image generation with GPT Image models, speech-to-text, text-to-speech, embeddings and the Realtime API for voice agents.
| OpenAI model | Input per 1M tokens | Output per 1M tokens |
|---|---|---|
| gpt-6-astra | $10.00 | $50.00 |
| gpt-6.1-sol | $2.00 | $10.00 |
| gpt-6-luna | $0.10 | $0.50 |
| gpt-5-nano | $0.05 | $0.40 |
Anthropic's API serves the Claude models. Developers often choose Claude for coding, long documents and agents, and the API supports tool use, computer use, prompt caching, file inputs and the Claude Agent SDK.
| Claude model | Input per 1M tokens | Output per 1M tokens |
|---|---|---|
| Fable 5.1 | $10.00 | $50.00 |
| Opus 5.5 | $4.00 | $20.00 |
| Sonnet 5.5 | $2.00 | $10.00 |
| Haiku 5.5 (prompts up to 100K) | $0.10 | $0.50 |
| Haiku 4.5 | $1.00 | $5.00 |
Both companies take 50% off for batch jobs that can finish within 24 hours, and both discount cached input when you reuse the same long prompt.
Google's Gemini API has the most generous free tier, covering Flash and Flash-Lite models plus 2.5 Pro with rate limits. Google says free-tier data may be used to improve its products, so production apps should use the paid tier. Paid prices start at $0.10 input and $0.40 output for 2.5 Flash-Lite, with 3.8 Flash at a promotional $0.75 input and $3.75 output through December 31, 2026, and 3.1 Pro Preview at $2 and $12. Gemini 4 Argon reached the paid API in October 2026.
Voice: ElevenLabs
ElevenLabs offers text-to-speech in dozens of languages, voice cloning, dubbing, sound effects, speech-to-text and a platform for voice agents. API usage draws credits from the same plans as the web app: Starter at $6 a month for 30,000 credits, Creator at $22 for 121,000, Pro at $99 for 600,000 and Scale at $299, with usage-based billing above that. Its newest speech model, Eleven v4, launched October 1, 2026. For high-volume speech where cost matters more than voice quality, Amazon Polly starts at $4 per million characters for standard voices. Our voice tools guide compares more providers.
Images: Stability AI
Stability AI's platform API serves Stable Diffusion 3.5 and its Stable Image models for generation, upscaling, inpainting and background removal, billed in prepaid credits. Stable Image Ultra, its top model, costs about $0.08 an image. Competing image APIs are often cheaper: Google's Nano Banana 2.1 costs $0.0336 for a 1K image and OpenAI's GPT Image 2 about $0.053 at medium quality. If you have GPUs, Stable Diffusion 3.5 weights are free to self-host for businesses under $1 million in revenue.
Search: Perplexity
Perplexity's API gives your app answers grounded in live web results, with citations. The Sonar models start at $1 per million tokens, plus a per-request search fee that depends on search depth. The Search API, which returns ranked web results without a written answer, costs $5 per 1,000 requests. Developers use it for research assistants, news summaries and fact-checking steps inside agents.
Video: Runway
Runway's API generates and edits video with the same models as its app. Credits cost $0.01 each, and Gen-4.5 uses 12 credits per second, so a 10-second clip costs $1.20. Faster and older models cost less per second. Google's Veo 3.1 through the Gemini API and Kling 3.0 are the main alternatives. OpenAI shut down its Sora API on September 24, 2026.
Estimating and controlling cost
To estimate cost, multiply average input and output tokens per request by monthly requests, then by the model's price per million. Then lower it:
- Start small. Run your prompts on the cheapest model first, and move up only where quality falls short.
- Cache long prompts. Anthropic, OpenAI and Google all discount repeated input such as system prompts and documents.
- Batch what can wait. Overnight jobs cost half as much at OpenAI and Anthropic.
- Set spending limits. Each provider's console lets you cap monthly spend and alert on spikes.
- Route by task. Send simple classification to a small model and hard reasoning to a large one.
Routers such as OpenRouter offer many providers' models through one API and one bill, which helps when you want to switch models without changing code.
Related: best AI tools for developers, privacy-first AI tools, AI coding tools.
Frequently asked questions
Which AI API is the cheapest?
For text, the cheapest current models are OpenAI's gpt-5-nano at $0.05 per million input tokens and $0.40 per million output tokens, and Google's Gemini 2.5 Flash-Lite at $0.10 input and $0.40 output. Anthropic's Haiku 5.5 costs $0.10 input and $0.50 output for prompts up to 100,000 tokens. Google's Gemini API also has a free tier for Flash and Flash-Lite models, though Google says free-tier data may be used to improve its products. Batch processing at OpenAI and Anthropic halves prices for jobs that can wait up to a day.
Is the OpenAI API or the Anthropic API better?
Both offer a full range of models at similar prices. OpenAI's gpt-6-astra and Anthropic's Fable 5.1 both cost $10 per million input tokens and $50 per million output tokens at the top end. Many developers choose Anthropic's Claude models for coding and agent work and OpenAI for its wider set of extras, such as image generation, speech and the Realtime API. Test both on your own prompts, since quality differences depend heavily on the task.
How much does an AI API cost per month?
It depends entirely on usage. A small app sending 1,000 requests a day with 2,000 input tokens and 500 output tokens each uses about 60 million input and 15 million output tokens a month. On a mid-range model such as Claude Sonnet 5.5 or GPT-6.1 Sol at $2 input and $10 output, that comes to about $270 a month. On Haiku 5.5 or GPT-6 Luna at $0.10 and $0.50, it is about $13.50. Prompt caching and batch processing lower these figures further.
Do AI APIs train on my data?
OpenAI and Anthropic say they do not train on data sent through their paid APIs by default. Google says it does not use paid Gemini API data to improve products, but the free tier's data may be used for that, so do not send private data through the free tier. Most providers keep API data for a limited period for abuse monitoring, and offer zero data retention agreements to qualifying business customers.
What is a token?
A token is the unit AI models read and write, roughly three quarters of an English word on average, so 1,000 tokens is about 750 words. APIs price input tokens, the prompt and any documents you send, separately from output tokens, the model's reply. Output usually costs four to eight times as much as input. Long system prompts and conversation history count as input on every request unless you use prompt caching.






