Chat ยท OpenAI-compatible

Fireworks, Together, Groq, DeepSeek, xAI, OpenRouter

Six providers that speak the OpenAI chat format natively. One adapter serves all of them, so only the provider string changes.

POST/v1/chat/completions
The OpenAI chat page applies unchanged
Request body, response shape, tool calling and streaming are identical to OpenAI Chat Completions. Read that page for the parameter reference; this one only covers what differs.

Provider strings

Use the string in the first column when you add the provider key. The gateway resolves it to the base URL shown and sends OpenAI-format requests there.

ModelProvider
fireworksFireworks AI
togetherTogether AI
groqGroq
deepseekDeepSeek
xaixAI
grokxAI (alias)
openrouterOpenRouter

Models

Model names belong to the provider, not to the gateway, so pass whatever that provider publishes. There is no shared catalogue across these six: a model string that works on Groq will not resolve on DeepSeek.

Request

Identical to OpenAI. Point the model field at the provider's own model name and send the request to the same gateway URL.

cURL
curl https://api.metriqual.com/v1/chat/completions \
  -H "Authorization: Bearer mql_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.3-70b-versatile",
    "messages": [
      {"role": "user", "content": "What is quantum computing?"}
    ]
  }'
TypeScript SDK
const response = await mql.chat.create({
  model: 'deepseek-chat',
  messages: [{ role: 'user', content: 'What is quantum computing?' }]
});

console.log(response.choices[0].message.content);

Streaming

These providers already emit OpenAI-format chunks, so the gateway passes the stream through without rewriting it. Set stream: true and read it exactly as you would an OpenAI stream.

What these providers do not do

Chat only
All six are chat completions and streaming. Images, embeddings, audio and video are not routed for them: those endpoints return 400 with a message naming the provider. Use OpenAI or MiniMax for those modalities, and see the failover page for mixing providers in one chain.