API Compatibility
OpenAI · Anthropic · Google · /v1/chat/completions
The gateway exposes a /v1/chat/completions endpoint that follows the OpenAI chat completions API. You can use the same request format you'd send directly to OpenAI. This page documents which parameters are supported per provider and what happens when a parameter has no equivalent.
Field support by provider
| Parameter | OpenAI models | Anthropic models | Google models | Notes |
|---|---|---|---|---|
messages |
✅ Supported | ✅ Supported | ✅ Supported | System role extracted to top-level system param for Anthropic and Google |
model |
✅ Supported | ✅ Supported | ✅ Supported | |
max_tokens |
✅ Supported | ✅ Supported | ✅ Supported | Defaults to 1024 for Anthropic if omitted; mapped to maxOutputTokens for Google |
max_completion_tokens |
✅ Supported | ✅ Supported | ✅ Supported | Alias for max_tokens; takes precedence if both provided |
stream |
✅ Supported | ✅ Supported | ✅ Supported | |
temperature |
✅ Supported | ✅ Supported | ✅ Supported | |
top_p |
✅ Supported | ✅ Supported | ✅ Supported | Mapped to topP for Google |
stop |
✅ Supported | ✅ Supported | ⚠️ Dropped | Mapped to stop_sequences for Anthropic; no Google equivalent |
user |
✅ Supported | ⚠️ Dropped | ⚠️ Dropped | No equivalent for Anthropic or Google; used for gateway analytics only |
frequency_penalty |
✅ Supported | ⚠️ Dropped | ⚠️ Dropped | No equivalent for Anthropic or Google; silently ignored |
presence_penalty |
✅ Supported | ⚠️ Dropped | ⚠️ Dropped | No equivalent for Anthropic or Google; silently ignored |
seed |
✅ Supported | ⚠️ Dropped | ⚠️ Dropped | No equivalent for Anthropic or Google; silently ignored |
response_format |
✅ Supported | ⚠️ Partial | ⚠️ Dropped | json_object mode approximated via system prompt injection for Anthropic; silently ignored for Google |
n (> 1) |
✅ Supported | ⚠️ Dropped | ⚠️ Dropped | Anthropic and Google always return 1 completion; extra completions silently dropped |
tools / tool_choice |
🚧 Planned | 🚧 Planned | 🚧 Planned | Function calling not yet supported |
logprobs |
❌ Not supported | ❌ Not supported | ❌ Not supported | |
top_logprobs |
❌ Not supported | ❌ Not supported | ❌ Not supported |
Dropped fields
When a field is marked "Dropped" for a provider, the gateway silently ignores it — no error is returned and the request proceeds normally. This preserves compatibility with clients that always include these fields regardless of the target model.
If your app depends on a specific field (such as frequency_penalty or seed), configure your route to use an OpenAI-backed model where those parameters are fully honored.
Provider routing
The gateway selects the provider based on the model name in the request. Model names that begin with claude (e.g. claude-3-5-sonnet-20241022) are routed to Anthropic. Model names that begin with gemini (e.g. gemini-2.0-flash) are routed to Google. All other model names are routed to OpenAI. No additional heuristics are applied.