Free LLM APIs with an OpenAI-compatible endpoint

Free LLM APIs that expose an OpenAI-compatible endpoint — point the OpenAI SDK at a new base_url and you are done.

These providers expose an OpenAI-compatible endpoint (openai_compatible: true), so migrating is usually a one-line change: keep the OpenAI SDK, swap base_url and api_key. Grab each provider’s exact base URL from its linked docs.

35 of 69 tracked providers match.

ProviderOpenAI base URLWhat's freeThe catchVerified
Google Gemini API (AI Studio)
no cardno phonecommercial OKOpenAI-compat
https://generativelanguage.googleapis.com/v1beta/openai/Gemini 2.5 Flash, 2.5 Flash-Lite, 2.5 Pro (limited), embeddings, TTS modelsFree-tier prompts/outputs may be used by Google to improve its products outside the UK/CH/EEA/EU. Since the 2026-03-23 terms, only Paid Services may serve API clients to end users in the EEA/CH/UK 2026-08-02
Groq
no cardphonecommercial OKOpenAI-compat
https://api.groq.com/openai/v1Open-weight models (Llama, Qwen, GPT-OSS) plus Whisper, no credit card requiredLimits apply at the organization level, not per API key. Phone verification required at signup 2026-08-02
OpenRouter
no cardno phonecommercial OKOpenAI-compat
https://openrouter.ai/api/v1A rotating set of models with a :free suffix (~14 today; count fluctuates), single API across many providersToS (Jul 2026) prohibits reselling API access or building a competing service — platform-wide, not just the free models; per-model terms still apply 2026-08-02
Cloudflare Workers AI
no cardno phonecommercial OKOpenAI-compat
https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/v110,000 Neurons/day, all account plansResets daily at 00:00 UTC; overage on a Workers Paid plan bills at $0.011/1,000 Neurons. A few models (e.g. Kimi K2.6/K2.7-code, GLM-5.2) now require a Workers Paid plan 2026-08-02
Cohere
no cardno phoneeval onlyOpenAI-compat
https://api.cohere.ai/compatibility/v1Trial (evaluation) API keys covering chat, embed and rerankExplicitly for evaluation only — Cohere's terms prohibit production/commercial use on a trial key 2026-08-13
Cerebras
cardcommercial OKOpenAI-compat
https://api.cerebras.ai/v1$5 in free credits for new accounts, usable across all public modelsA verified payment method is required to activate Playground/API access (no charge until you buy credits). Credits expire 30 days after grant; whether any free access persists past expiry is not stated 2026-08-02
Mistral (La Plateforme)
no cardphoneeval onlyOpenAI-compat
https://api.mistral.ai/v1"Restrictive" free tier explicitly for "try and explore" — official docs say to upgrade for "actual projects and production use"Phone verification required to activate; no credit card required. Free tier is opt-in for data training. 2026-08-13
HuggingFace
no cardOpenAI-compat
https://router.huggingface.co/v1Free CPU Basic + ZeroGPU for Spaces; Inference Providers has a monthly credit ($0.10/mo on Free plan, $2.00/mo on PRO/Team/Enterprise)Credits only apply with "Routed by Hugging Face" billing, not with a Custom Provider Key 2026-08-13
SiliconFlow
no cardphoneOpenAI-compat
https://api.siliconflow.com/v1Several models permanently free (e.g. Qwen2.5-7B-Instruct and others) at $0 cost, plus a $1 welcome credit for paid modelsSignup requires SMS phone verification. Full "real-name authentication" (needed for recharging/billing) requires a mainland China, Hong Kong/Macao, or Taiwan ID document — this may limit full access for users without one, though basic use of free models appears reachable with standard account verification 2026-08-13
Z.ai (Zhipu AI / GLM)
no cardno phonecommercial OKOpenAI-compat
https://api.z.ai/api/paas/v4/GLM-4.5-Flash, GLM-4.7-Flash (text), and GLM-4.6V-Flash (vision) are officially listed as $0 cost (input, cached input, and output) on a permanent basisTerms of Use prohibit using the service to "develop, train, or improve" competing algorithms or models — otherwise general use, including commercial, isn't restricted 2026-08-13
IBM watsonx.ai (Lite plan)
cardOpenAI-compat
https://us-south.ml.cloud.ibm.com/ml/v1Lite plan: 300,000 tokens/month for foundation model inference, 20 CUH/month for ML tooling, 100 pages/month of document text extractionLite plan doesn't support fine-tuning of foundation or custom models; 1-day idle deployment timeout. Never expires or bills while inside quota, but a payment method (with a nominal ~$1 authorization hold) is required at signup 2026-08-13
OVHcloud AI Endpoints
cardOpenAI-compat
https://oai.endpoints.kepler.ai.cloud.ovh.net/v1Two Qwen3Guard models (Gen-8B and Gen-0.6B) are currently listed as Free in the catalog; access is available anonymously or with an API key tied to a Public Cloud projectEuropean provider (France), relevant for EU data-sovereignty/GDPR-conscious use. The authenticated tier needs a valid payment method on the project (though "Free" models themselves don't charge); anonymous access needs neither an account nor a card. A separate general $200 Public Cloud trial voucher also exists but is unrelated to this free-model tier 2026-08-03
Fireworks AI
no cardOpenAI-compat
https://api.fireworks.ai/inference/v1$1 trial creditFireworks uses prepaid credits. After the $1 credit is exhausted, add a payment method and credits (or enable auto top-up) to continue; account limits can rise with spend 2026-08-03
Baseten
OpenAI-compat
https://inference.baseten.co/v1New accounts receive free credits; Baseten's current pricing page does not state the amountBasic is $0/month, pay as you go. Current pricing confirms new-account credits but does not publish an amount or expiration date 2026-08-03
Nebius AI Studio
cardno phonecommercial OKOpenAI-compat
https://api.tokenfactory.nebius.com/v1$1 trial credit, valid for 30 daysProduct renamed to "Nebius Token Factory"; a bank card is required to set up billing 2026-08-13
Novita AI
no cardeval onlyOpenAI-compat
https://api.novita.ai/openai$100 Sandbox credits, valid for 90 daysOfficial signup advertises $100 Sandbox credits valid for 90 days; no credit card required. Novita Terms of Service state that the Site and Marketplace Offerings may not be exploited for any commercial purpose without express prior written permission. 2026-08-10
AI21 Labs
no cardOpenAI-compat
https://api.ai21.com/studio/v1$10 trial credit, valid 3 monthsCard not required for the trial credit itself, required once it expires 2026-08-03
Alibaba Cloud (Model Studio)
no cardOpenAI-compat
https://dashscope-intl.aliyuncs.com/compatible-mode/v11,000,000 tokens (example figure, varies by model), international/Singapore region onlyExcludes batch processing, context caching, fine-tuning, and dedicated deployment 2026-08-13
SambaNova Cloud
no cardcommercial OKOpenAI-compat
https://api.sambanova.ai/v1Rate-limited free tier (applies when no payment method is linked) across all modelsFree Tier applies when no payment method is linked to the account; SambaCloud ToS grants a commercial license (no evaluation-only clause). The previously-listed "$5 / 3 months" trial could not be re-confirmed on official pages (2026-07-30). 2026-08-13
Scaleway Generative APIs
no cardOpenAI-compat
https://api.scaleway.ai/v11,000,000 tokens free + 60 min Whisper transcription; billing starts at token 1,000,001European provider (France). Free allowance is a one-time token bucket, not time-limited. The 1M free tokens need no card; adding a card + passing KYC unlocks the official rate limits. 2026-08-13
NVIDIA NIM
no cardphoneeval onlyOpenAI-compat
https://integrate.api.nvidia.com/v1Trial credit, phone verification required"Evaluation only, not production" per NVIDIA's own Trial Terms of Service — NVIDIA may discontinue the trial at any time with no continuity obligation 2026-08-13
Vercel AI Gateway
no cardOpenAI-compat
https://ai-gateway.vercel.sh/v1Free tier: $5/month credit covering a subset of models (Free Tier eligible models) at lower rate limitsThe monthly $5 credit is stated in Vercel's own docs. Once you purchase credits, your account moves to the paid tier and the monthly free credit no longer applies. BYOK is not available on the free tier. 2026-08-14
Jina AI
no cardno phonecommercial OKOpenAI-compat
https://api.jina.ai/v110M free tokens (one-time) across all models — embeddings, rerankers, classifier; plus a keyless Reader (r.jina.ai) for basic useThe 10M-token balance is a one-time grant that does not replenish; the keyless Reader is genuinely ongoing. Hosted API is commercial-OK and data is not used for training. No card required. 2026-08-14
AssemblyAI
no cardno phonecommercial OKOpenAI-compat
https://llm-gateway.assemblyai.com/v1$50 free credit on signup (no card) — pre-recorded & streaming speech-to-text, Speech Understanding, and an OpenAI-compatible LLM Gateway (25+ models)One-time credit, not renewing. Catch: the default model differs between free and paid accounts — set speech_models explicitly to avoid cost jumps on upgrade. Only the LLM Gateway is OpenAI-compatible. 2026-08-14
Clarifai
no cardphoneOpenAI-compat
https://api.clarifai.com/v2/ext/openai/v1One-time $5 credit across serverless models (GPT-OSS-120B, Claude, Llama), vision, embeddings and image generationCatch: SMS phone verification is required to claim the $5. Credit is one-time and expires 30 days after grant; a card is required to recharge afterward. Checked ToS (clarifai.com/company/terms, effective 2025-10-01) and billing docs (docs.clarifai.com/control/account-billing/) for commercial/production-use language. No clause restricts the $5 trial credit / Pay-As-You-Go tier to evaluation-only. The 'evaluation purposes only, not for production' language in §7.3 applies specifically to Beta Releases, not this plan. No explicit statement either way, so left null per contribution guidelines. 2026-08-11
Arli AI
OpenAI-compat
https://api.arliai.com/v1Free plan ($0): access to all text LLMs (Gemma, Qwen, etc.), capped at ~5 requests per 2-day window, 12K context, 1 request at a timeFree tier is for testing only — very restrictive. Provider advertises zero-log / no data retention. Card requirement for the free tier is not stated on the pricing page. 2026-08-14
Ollama Cloud
no cardno phonecommercial OKOpenAI-compat
https://ollama.com/v1$0 Free plan: access to cloud-hosted open models (Qwen, GPT-OSS, DeepSeek, etc.) via APIFirst-party — Ollama hosts the cloud models. Requires an ollama.com account + API key (`ollama signin`); the free plan is for light usage, Pro ($20/mo) raises limits. No card required. 2026-08-14
ModelScope (API-Inference)
no cardeval onlyOpenAI-compat
https://api-inference.modelscope.cn/v1~2,000 free API calls/day across open-weight models (Qwen3, DeepSeek, GLM, Llama, etc.) via API-InferenceAlibaba's model hub — a different product from Alibaba Model Studio. Requires a ModelScope account bound to an Alibaba Cloud account with real-name (ID) verification — a practical barrier for non-China users. Explicitly non-commercial ("for developers to experience"). No card. 2026-08-14
Moondream Cloud
no cardOpenAI-compat
https://api.moondream.ai/v1$5/month usage credits in every workspace (Free plan) for the Moondream vision model — caption, query (VQA), detect, pointRecurring $5/month credit, no credit card required (stated on the pricing page/blog). Commercial terms not specified. OpenAI-compatible endpoint. 2026-08-14
Sarvam AI
no cardOpenAI-compat
https://api.sarvam.ai/v1₹100 in free credits on signup, usable across all APIs including the Sarvam-M chat/LLM API and speech (STT/TTS)One-time signup credit shared across all APIs; card/phone requirement not stated on the docs. India-focused provider (pricing in INR), strong Indic-language models. 2026-08-14
Tencent Hunyuan
no cardOpenAI-compat
https://api.hunyuan.cloud.tencent.com/v11,000,000 free tokens for Hunyuan text LLMs (hunyuan-a13b, turbos, translation & vision models), plus a separate 1,000,000-token allotment for hunyuan-embeddingFree resource package valid 1 year from activation; unused tokens expire. Tencent Cloud generally requires mainland-China real-name ID verification to activate — a practical barrier for non-China users. Hunyuan is gradually migrating to TokenHub (the legacy platform is no longer adding new models). Commercial-use terms not stated on the free-quota page. 2026-08-14
Poolside
no cardOpenAI-compat
https://inference.poolside.ai/v1Laguna M.1 (225B) and Laguna XS.2 (33B, open-weights) are free for a limited time via a self-serve developer API key (also on OpenRouter)Coding-focused models. Poolside describes the free access as 'free for a limited time' (not perpetual) and it may change at general availability. Self-serve key at platform.poolside.ai; OpenRouter is an alternative route. 2026-08-14
Upstage
no cardcommercial OKOpenAI-compat
https://api.upstage.ai/v1Solar Pro 4 is free for a limited time (promo); otherwise the API is paid prepaid (commitment tiers from $100/mo) — Solar LLM (chat + embeddings) plus Document Parse / OCR / information extraction; Studio agents include 10 free runsThe former $10 signup credit no longer appears on the pricing page (now prepaid commitment tiers from $100/mo). No card needed for the limited-time free model or the 10 free Studio runs; a separate institutional grant (up to 1 year of free Solar + Document Parse) exists for eligible organizations only. 2026-08-14
W&B Inference
no cardcommercial OKOpenAI-compat
https://api.inference.wandb.ai/v1$100/month of Serverless Inference credits on the Free plan (default spending cap; offer for a limited time)Serverless Inference credits come with Free, Pro and Academic plans for a limited time; when credits run out, Free accounts must activate pay-as-you-go on the Billing tab or upgrade. OpenAI-compatible endpoint at api.inference.wandb.ai/v1 with any W&B API key. 2026-08-14
Typhoon (SCB 10X)
no cardno phonecommercial OKOpenAI-compat
https://api.opentyphoon.ai/v1Free to use research showcase API — all Typhoon models at $0By SCB 10X, the venture arm of Siam Commercial Bank, focused on Thai-language models. The free catalog spans LLMs (typhoon-v2.5-30b-a3b-instruct), OCR (typhoon-ocr family) and realtime Thai ASR (typhoon-asr-realtime, typhoon-isan-asr-realtime) — the hosted API is OpenAI-compatible, including audio transcriptions. Beta, provided as-is with no formal support; usage data is collected to improve the model; SCB claims no rights in outputs. Sign up for a free API key at opentyphoon.ai. 2026-08-14

Quickstart — reuse the OpenAI SDK

Point base_url at the provider (URLs in the table above) and use its free key. Example: Groq.

from openai import OpenAI

client = OpenAI(base_url="https://api.groq.com/openai/v1", api_key="<YOUR_FREE_API_KEY>")
resp = client.chat.completions.create(
    model="llama-3.1-8b-instant",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
curl https://api.groq.com/openai/v1/chat/completions \
  -H "Authorization: Bearer $YOUR_FREE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "llama-3.1-8b-instant", "messages": [{"role": "user", "content": "Hello!"}]}'

Related guides