Skip to content
AI Platforms & APIs

OpenAI alternatives

16 tools you can use instead of OpenAI, ranked by live GitHub stars and npm downloads. Anthropic, Ollama and Hugging Face are the most used. Stats updated 22 hours ago.

Short answer

Anthropic is the closest alternative, with the Claude apps and the Claude API. Mistral AI offers Le Chat and an API, and Perplexity AI is an answer engine that searches the web and cites sources. To run open models yourself, compare Ollama.

On this page

When OpenAI is not a good fit

It is a weaker choice for:

  • Teams that want to run models on their own hardware, since OpenAI's frontier models are not open weight
  • Fixed, predictable costs at high API volume, since spend scales with tokens used
  • Users who want full transparency into training data or model internals
OpenAI pricing, features and usage

The alternatives

Most used first.

1

Anthropic

AI research company that makes the Claude models, the Claude apps and the Claude API.

Pricing Pay as you goOpen source NoPaid from $20 a month for Claude Pro; API from $1 per million input tokens (Haiku 4.5)
OpenAI vs Anthropic
2

Ollama

Run open source AI models locally, with an optional hosted cloud and Pro plan.

Pricing FreemiumOpen source YesPaid from $20 a month for the Pro plan, including $60 of usage credit for cloud models
OpenAI vs Ollama
3

Hugging Face

Hub for open source AI models, datasets and demo apps, plus paid hosting for inference and Spaces.

Pricing FreemiumOpen source YesPaid from $9 a month for a PRO account
View Hugging Face
4

Mistral AI

French AI company building open-weight and proprietary language models, accessed via API or Le Chat.

Pricing Pay as you goOpen source NoPaid from $5.99 a month for Le Chat Pro (student pricing), $14.99 a month standard
View Mistral AI
5

Groq

AI inference company behind GroqCloud, a fast API for running open models on its own LPU chips.

Pricing Pay as you goOpen source No
View Groq
6

Replicate

Run and deploy machine learning models in the cloud through a simple API, billed by the second.

Pricing Pay as you goOpen source NoPaid from about $0.000025 a second for small CPU instances, varying by model and hardware
View Replicate
7

Cohere

Enterprise-focused AI company offering language, embedding and rerank models through an API.

Pricing Pay as you goOpen source NoPaid from $0.30 input / $0.60 output per million tokens on Command-light; current flagship Command A models are priced on request
View Cohere
8

Together AI

Cloud platform for running and fine-tuning open source AI models, with serverless inference and GPU clusters.

Pricing Pay as you goOpen source NoPaid from $0.042 per million input tokens (lowest-priced paid serverless model)
View Together AI
9

LM Studio

Desktop app for downloading and running open-weight language models locally, with a chat UI and local API.

Pricing FreemiumOpen source No
View LM Studio
10

Arcmira

YouTube transcript API and quote search across indexed YouTube videos, including podcasts, with an MCP server.

Pricing FreemiumOpen source NoPaid from $20 a month (Pro)
View Arcmira
11

TwitterAPI.io

Pay-per-use API and MCP server for public X data, from $0.15 per 1,000 tweets, with no X developer account.

Pricing Pay as you goOpen source NoPaid from $0.15 per 1,000 tweets
View TwitterAPI.io
12

XCrawl

Web scraping API that returns pages, crawls and search results as JSON, Markdown, HTML or screenshots.

Pricing FreemiumOpen source No
View XCrawl
13

AirCube

One REST API and pay-per-generation billing for image, video and audio models from many providers.

Pricing Pay as you goOpen source NoPaid from Per generation, for example $0.03 an image or $0.20 a second of video, depending on the model
View AirCube
14

OpenRouter

One API for 500+ AI models from 80+ providers, announced on 19 August 2026 that it is joining Stripe.

Pricing Pay as you goOpen source NoPaid from Pay as you go with a 5.5% platform fee (Standard)
View OpenRouter
15

Perplexity AI

AI-powered answer engine that searches the web and cites sources, with a free tier and paid Pro/Max plans.

Pricing FreemiumOpen source NoPaid from About $20 a month (Pro plan)
View Perplexity AI
16

PopNow API

One API key for 249 image, video and audio generation models, billed per call from a USD balance.

Pricing Pay as you goOpen source NoPaid from Per call, for example from $0.03 per Suno v6 run
View PopNow API

OpenAI and its alternatives, side by side

ToolPricingFree planPaid fromOpen sourceGitHub stars
OpenAIFreemiumYes, in ChatGPT. The API has no free plan and is billed per token.$20 a month for ChatGPT Plus; API pricing varies by modelNo11.3k
AnthropicPay as you goYes, in the Claude apps. The API is billed per token.$20 a month for Claude Pro; API from $1 per million input tokens (Haiku 4.5)No2.2k
OllamaFreemiumYes, running models locally is always free$20 a month for the Pro plan, including $60 of usage credit for cloud modelsYes, MIT189k
Hugging FaceFreemiumYes: unlimited public model, dataset and Space hosting, free CPU and limited ZeroGPU compute$9 a month for a PRO accountYes, Open source libraries (e.g. Transformers) are Apache-2.0; hosted models and datasets carry their own individual licenses170k
Mistral AIPay as you goYes, in Le Chat, with limited usage$5.99 a month for Le Chat Pro (student pricing), $14.99 a month standardNoNone
GroqPay as you goYes, with rate limits that vary by model. The paid Developer plan raises them.Not listedNoNone
ReplicatePay as you goNo ongoing free plan; billing is pay-as-you-go with no monthly minimumabout $0.000025 a second for small CPU instances, varying by model and hardwareNo601
CoherePay as you goYes: evaluation API keys are free but limited in usage$0.30 input / $0.60 output per million tokens on Command-light; current flagship Command A models are priced on requestNoNone
Together AIPay as you goLimited free credits are typically available for new accounts to try the platform$0.042 per million input tokens (lowest-priced paid serverless model)NoNone
LM StudioFreemiumYes, the core app and running local models is freeNot listedNoNone
ArcmiraFreemiumYes: 1,000 credits a month and 2 monitored names, no card needed. Free accounts can't see media from the newest 30 days.$20 a month (Pro)No32
TwitterAPI.ioPay as you goYes: up to $1 (100,000 credits) for new accounts, no card needed. Free credits expire after 31 days.$0.15 per 1,000 tweetsNoNone
XCrawlFreemiumYes: 1,000 free credits for new accounts, no card needed.Not listedNoNone
AirCubePay as you goFree credits for new accounts, no card needed. The amount isn't published.Per generation, for example $0.03 an image or $0.20 a second of video, depending on the modelNoNone
OpenRouterPay as you goYes: access to 25+ free models from 4 providers.Pay as you go with a 5.5% platform fee (Standard)NoNone
Perplexity AIFreemiumYes: free tier available with standard search and limited access to advanced featuresAbout $20 a month (Pro plan)NoNone
PopNow APIPay as you goNo: calls and the Playground are paid from your API balance.Per call, for example from $0.03 per Suno v6 runNoNone

Pricing facts come from each tool's official pricing page, with the checked date on the tool's own page.

Questions

What is the most popular alternative to OpenAI?

By GitHub stars, Anthropic is the most used alternative to OpenAI listed on ScratchDB, with 2.2k stars.

Which OpenAI alternatives are open source?

Ollama and Hugging Face are open source.

Which OpenAI alternatives have a free plan?

Anthropic, Ollama, Hugging Face, Mistral AI, Groq, Cohere, LM Studio, Arcmira, TwitterAPI.io, XCrawl, OpenRouter and Perplexity AI have a free plan. The table on this page shows what each one includes.

All AI Platforms & APIs tools

OpenAI alternatives: 16 options compared (2026) | ScratchDB