Getting Started

Quick Start

Get up and running with the Metriqual AI Gateway in under 5 minutes. Route requests to OpenAI, MiniMax, and more through a single unified API.

1. Get Your API Key

Sign up at metriqual.com and create a proxy key from the dashboard. Your proxy key authenticates all requests through the gateway.

2. Install the SDK

Install the official SDK for your language. Both SDKs provide typed methods for every endpoint.

npm
npm install @metriqual/sdk
yarn
yarn add @metriqual/sdk
pip
pip install metriqual

3. Make Your First Request

Initialize the SDK with your proxy key and base URL. Then call any endpoint — chat completions, image generation, audio, video, and more.

Base URL

All API requests go through https://api.metriqual.com
TypeScript
import Metriqual from '@metriqual/sdk';

const mql = new Metriqual({
  apiKey: 'your-proxy-key',
  baseUrl: 'https://api.metriqual.com'
});

// Chat completion
const response = await mql.chat.completions({
  model: 'gpt-4o',
  messages: [
    { role: 'user', content: 'Hello!' }
  ]
});

console.log(response.choices[0].message.content);
Python
from metriqual import MQL

client = MQL(api_key="your-proxy-key")

response = client.chat.create(
    messages=[{"role": "user", "content": "Hello!"}],
    model="gpt-4o",
)

print(response["choices"][0]["message"]["content"])

4. Using cURL

You can also make requests directly via cURL or any HTTP client. Use your proxy key as a Bearer token.

cURL
curl https://api.metriqual.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_PROXY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Hello!"}
    ]
  }'

Supported Models

Metriqual supports a wide range of AI models across multiple modalities and providers.

Chat & Text

ModelProvider
gpt-4oOpenAI
gpt-4o-miniOpenAI
gpt-4.1OpenAI
gpt-4.1-miniOpenAI
gpt-4.1-nanoOpenAI
o4-miniOpenAI
MiniMax-M1MiniMax

Image Generation

ModelProvider
gpt-image-1OpenAI
dall-e-3OpenAI
dall-e-2OpenAI
image-01MiniMax

Audio & Music

ModelProvider
tts-1OpenAI
tts-1-hdOpenAI
speech-02-hdMiniMax
whisper-1OpenAI
music-01MiniMax

Video

ModelProvider
soraOpenAI
T2V-01MiniMax
I2V-01MiniMax
S2V-01MiniMax

Available Endpoints

POST/v1/chat/completions
POST/v1/images/generations
POST/v1/images/minimax/generations
POST/v1/audio/speech
POST/v1/audio/transcriptions
POST/v1/audio/voice-clone
POST/v1/music/generations
POST/v1/videos/generations
POST/v1/videos/minimax/generations
POST/v1/embeddings

Need help?

Check the Authentication guide to learn about proxy key scoping, or the SDK Reference for full TypeScript documentation.