Short answer. Plugsky, Groq, Gemini and OpenRouter all expose an OpenAI-compatible base URL with a free allowance. Ollama exposes the same shape on localhost and charges nothing per token, but you supply the hardware. The base URL is the easy part; tool-call schemas, vision input, audio endpoints and the Responses API are where you need a compatibility test.
What "OpenAI-compatible" actually means
At minimum, a provider implements POST /v1/chat/completions with the OpenAI message shape and returns choices with a message. That is enough for a chat UI and for most SDKs. It is not enough for an agent that calls tools, a document pipeline that sends images, or an app that uses OpenAI's newer Responses API.
Compatibility usually comes in layers: chat completions, streaming, JSON mode, tool calling, vision, audio, embeddings, and Responses. A provider can support the first four and fail the fifth. Ask which layer you need, then test that layer with your own schema rather than trusting a compatibility badge.
Five endpoints compared
| Provider | Base URL | Free allowance | Compatibility notes |
|---|---|---|---|
| Plugsky | https://api.plugsky.com/v1 | New accounts: 100 requests and 50K tokens/day; legacy: 500 and 250K | 39 models; free plan uses Micro and Lite; OpenAI chat and tool calling |
| Groq | https://api.groq.com/openai/v1 | 30 RPM; 1,000 requests/day; 8K TPM; 200K TPD | Chat, tools, vision and audio; audio models have separate limits |
| Gemini | https://generativelanguage.googleapis.com/v1beta/openai/ | Gemini 3.8 Flash listed as free of charge | Chat, tools, vision, audio and embeddings; the compatibility layer is still in beta |
| Ollama | http://localhost:11434/v1/ | Free locally; you pay for hardware | Chat, tools and vision; no tool_choice, no image URL, no logprobs |
| OpenRouter | https://openrouter.ai/api/v1 | Free models: 20 RPM and 50 requests/day under 10 credits; 1,000/day at 10+ | Feature support depends on the model; free IDs end in :free |
Figures are from the provider pages linked in the table, checked 20 November 2026. Free allowances are organization-level unless the provider says otherwise.
The compatibility traps
Tool schemas. OpenAI's Chat Completions format wraps the function in an outer function object. The Responses API uses an internally tagged tool. Some compatible providers accept only the Chat Completions shape. If you migrate to Responses, expect to rewrite the tool definitions, not just the URL.
Strict mode. OpenAI's Chat Completions is non-strict by default; Responses attempts strict mode when you omit the flag. A provider that silently ignores strict will still return tool calls, but the arguments may not match your schema. Validate every call before executing it.
Vision input. Most providers accept an image URL. Ollama's compatibility layer accepts base64 images but not image URLs. If your code passes a URL, local inference fails at the first request.
Audio. Groq exposes OpenAI-compatible transcription and speech endpoints, but the model IDs and limits are provider-specific. Do not assume whisper-1 exists everywhere.
Responses API. Gemini and OpenRouter expose a Responses endpoint, but the feature set is not identical. OpenAI's built-in tools, file search and stateful conversations are not portable.
Code: one client, two providers
Keep the base URL and model ID in configuration, not in code. The example below uses the same OpenAI SDK against Plugsky and Groq, with a fallback when the primary returns a rate-limit error. The model map is intentionally explicit; provider model names are not interchangeable.
import os
from openai import OpenAI, RateLimitError
providers = {
"plugsky": {
"client": OpenAI(api_key=os.environ["PLUGSKY_API_KEY"],
base_url="https://api.plugsky.com/v1"),
"model": "plugsky-lite",
},
"groq": {
"client": OpenAI(api_key=os.environ["GROQ_API_KEY"],
base_url="https://api.groq.com/openai/v1"),
"model": "openai/gpt-oss-20b",
},
}
def complete(messages, order=("plugsky", "groq")):
for name in order:
cfg = providers[name]
try:
return cfg["client"].chat.completions.create(
model=cfg["model"], messages=messages
)
except RateLimitError:
continue
raise RuntimeError("all providers rate-limited")
Test the fallback with a forced 429 before you need it. A fallback that returns prose where your parser expects JSON is worse than no fallback.
How to test before switching
- Send one text-only request and confirm the response shape.
- Stream a response and confirm the delta shape, not just the final text.
- Send a two-tool request and validate the arguments against your schema.
- Send an image and confirm the provider accepts your input method.
- Send a malformed tool result and confirm the error is visible, not silently swallowed.
- Measure p95 latency and the rate-limit headers under a small load.
For a migration checklist, see the OpenAI migration checker. For the conceptual version, see what an OpenAI-compatible API is. For Plugsky's endpoint and plans, start at the docs and pricing.
FAQ
What is an OpenAI-compatible API?
An API that accepts the OpenAI request and response shapes, usually starting with chat completions, so you can keep the OpenAI SDK and change the base URL. Higher-level features such as tools, vision and Responses may not be compatible.
Which free OpenAI-compatible API has the highest limits?
Groq publishes 30 requests per minute, 1,000 per day and 200,000 tokens per day for its main free models. Plugsky's new-account free plan is 100 requests and 50,000 tokens per day. The better choice depends on whether you need requests or tokens.
Can I use the OpenAI SDK with Gemini?
Yes. Set the base URL to https://generativelanguage.googleapis.com/v1beta/openai/ and use a Gemini model ID. Chat, tools, vision, audio and embeddings are supported, but the compatibility layer is still in beta.
Does Ollama support tool calling?
Yes, Ollama's OpenAI-compatible endpoint supports tools in chat completions and Responses. It does not support tool_choice, image URLs or logprobs, so test those paths before migrating.
Is a free OpenAI-compatible API safe for production?
Only with a fallback and a clear limit budget. Free tiers are shared, can change, and usually have no SLA. Use them for evaluation, then move production traffic to a paid plan or a second provider.
Sources, checked 20 November 2026: Plugsky docs · Groq OpenAI compatibility · Gemini OpenAI compatibility · Ollama OpenAI compatibility · OpenRouter quickstart. Provider limits and prices can change; confirm them in the provider console before capacity planning.
Reviewed 20 November 2026. This page is maintained by the Plugsky editorial team. It describes published provider limits and does not promise that a free tier will remain unchanged.