AI API request translator and provider compatibility matrix for OpenAI, Anthropic, Gemini, Mistral, Cohere, Groq and Ollama
Paste an OpenAI-format request body, see which features are supported on every major LLM provider in 2026, and copy the equivalent request body for each. The translation works fully in your browser, no API keys ever leave the page.
Why an OpenAI-format request is a useful pivot
The OpenAI Chat Completions schema (messages with system, user, assistant roles, tools, temperature, max_tokens, stream, optional response_format) became the de facto compatibility layer for LLM APIs through 2024 and 2025. Anthropic, Mistral, Groq, Together, Fireworks and most local servers (Ollama, LM Studio, llama.cpp server) all ship some flavour of OpenAI-compatible endpoint at /v1/chat/completions. Google Gemini and Cohere keep their native schemas but every SDK has an OpenAI adapter. As a result, designing for the OpenAI shape and translating outward is the strategy that minimises lock-in in 2026.
The catch is that “OpenAI-compatible” is a spectrum, not a binary. The basic chat path (messages in, completion out) works across providers without changes. Tools and function calling work on most providers but with subtle differences in how arguments are parsed and how parallel tool calls are returned. Vision (image inputs) is supported by OpenAI, Anthropic and Gemini but the payload shape differs. JSON mode and structured outputs are inconsistent. Streaming works everywhere but the chunk format differs at the edges. This tool maps each feature against each provider so you can plan the translation cost before committing to a switch.
What the feature matrix covers in 2026
The matrix tracks ten features that move the cost of porting a working OpenAI integration: basic chat messages, system message as a first-class field versus inlined in the first user turn, temperature and max_tokens with matching default behaviour, tools / function calling in single and parallel forms, vision inputs (image_url and base64), JSON mode / structured outputs with schema enforcement, streaming via Server-Sent Events, response_format with explicit schema, seed for reproducible sampling, and logprobs for token-level confidence. Each cell shows a green check, a red cross, or a partial flag with a one-line caveat.
The matrix is updated whenever a major provider ships a new flagship model. The 2026 baseline includes GPT-5 turbo and GPT-5 mini on OpenAI, Claude Opus 4.7 and Sonnet 4.6 on Anthropic, Gemini 3.0 Pro on Google, Mistral Large 3 and Codestral 2 on Mistral, Command R+ 2026 on Cohere, Llama 4 405B and Mixtral 8x22B served via Groq, and any GGUF-format model run through Ollama or llama.cpp.
How the request translation works
For each provider the tool emits a runnable code snippet in the canonical SDK for that provider. The translation handles five mechanical conversions: role normalisation (Anthropic separates system into its own field, Gemini collapses it into the first user turn), tool schema mapping (OpenAI uses type: function with a nested function object, Anthropic uses a flat tools array, Gemini uses function_declarations), vision payload reshape (OpenAI accepts a content array with image_url, Anthropic uses type: image with source, Gemini uses inline data with mime type), parameter name remapping (Mistral renames max_tokens to max_tokens but Gemini uses maxOutputTokens), and response format alignment (each provider emits a slightly different JSON envelope around the model output).
The output is meant to be copied into your codebase as a starting point. The naive translation works for 80 percent of cases; the remaining 20 percent require provider-specific tuning that we surface as warnings under the snippet (e.g. “Anthropic prefers prompt caching with the first 1024 tokens, consider adding cache_control”) so you know which optimisations are worth a follow-up.
Common provider gotchas the tool calls out
- Anthropic system message: top-level
systemstring, not a message with role system. The messages array starts with user. - Gemini message format: roles are
userandmodel(notassistant), content is wrapped in apartsarray. - Mistral tool calls: at the time of writing, parallel tool calling is supported on Large 3 only; smaller Mistral models return tools sequentially.
- Cohere “preamble” vs “system”: Cohere uses
preambleinstead ofsystemon the v2/chat endpoint; the newmessages-style v2 endpoint accepts both but the older v1 endpoint does not. - Groq streaming: SSE chunks omit the
delta.rolefield after the first chunk to save bytes; clients that expect it on every chunk break. - Ollama JSON mode: works via
format: jsonat the request top level, not viaresponse_formatlike OpenAI. - Vision base64 size limits: OpenAI accepts up to 20 MB per image, Anthropic 5 MB, Gemini 20 MB. The tool warns when an embedded image exceeds the destination limit.
When to keep the OpenAI client versus when to switch SDKs
The compatibility layer is good enough that most teams keep the official openai Node or Python client and point it at a different base URL plus API key. That works for OpenAI itself, Groq, Together, Fireworks and Ollama out of the box, and for Mistral with a couple of header overrides. For Anthropic and Gemini, the native SDKs are significantly better: they expose prompt caching, server-side tool use, and grounded responses that the OpenAI client does not surface. The decision rule is: switch SDK when the feature you need is provider-native (Anthropic prompt caching, Gemini grounding with search), otherwise keep the OpenAI client to minimise code churn.
Frequently asked questions
Does the tool make any actual API calls?
No. Every translation runs in your browser. No API keys are required, no request is sent to any provider, and the request body you paste never leaves the page. The tool is a deterministic translator over the OpenAI schema, not a request runner.
Why do some translations show warnings?
A warning appears when the naive translation would technically work but the target provider has a preferred shape that improves cost or quality. Examples: Anthropic prompt caching for repeated system messages, Gemini grounding for factual queries, Cohere preamble length recommendations. The naive output is correct; the warning surfaces the optimisation.
What model does each provider use in the example code?
The tool picks the 2026 flagship by default: GPT-5 turbo for OpenAI, Claude Sonnet 4.6 for Anthropic, Gemini 3.0 Pro for Google, Mistral Large 3 for Mistral, Command R+ 2026 for Cohere, Llama 4 405B via Groq, and llama3.3:70b for Ollama. Replace the model string with your actual choice before running.
Does it handle the new responses API from OpenAI?
The 2026 version handles the legacy Chat Completions schema. The Responses API (introduced late 2025) is partially supported in the OpenAI tab but the translation to other providers uses the Chat Completions translation, because no other provider implements the Responses shape yet.
Can I use this output in production?
The translated snippets are a starting point, not a finished implementation. Add provider-specific error handling, retry on rate limits with exponential backoff, cost tracking and observability. The tool gives you the request shape; production wiring is on you.
How accurate is the feature matrix?
The matrix reflects what is documented and what works at the time of update (May 2026). LLM provider APIs evolve fast. If you find a discrepancy, send the corrected entry to contact@peoplearegeek.com with a link to the provider documentation that proves the support state.













