One OpenAI-compatible gateway in front of every major model. Below: a copy-paste example for each of the 93 models we route. Pick a model, copy the code, ship.
Send your sk-maas-… key as a bearer token. The same key calls every model — provider-side credentials live in our pool, you never see them.
POST https://api.miavo.xyz/v1/chat/completions
Authorization: Bearer sk-maas-...
Content-Type: application/jsonGET /v1/models is the source of truth — model slugs returned here are valid for both /v1/chat/completions and /v1/videos/generations.
curl https://api.miavo.xyz/v1/models \
-H "Authorization: Bearer sk-maas-..."claude-opus-4-6·$5.00 in / $25.00 out per MTok·1,000k contextPrevious flagship — 1M context. Still served alongside 4.7.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'claude-opus-4-6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);claude-opus-4-7·$5.00 in / $25.00 out per MTok·1,000k contextTop reasoning + agentic coding. 1M context, 128k output.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'claude-opus-4-7',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);claude-sonnet-4-6·$3.00 in / $15.00 out per MTok·1,000k contextBalanced flagship — best speed/intelligence ratio. 1M context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'claude-sonnet-4-6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);claude-haiku-4-5·$1.00 in / $5.00 out per MTok·200k contextAnthropic’s fastest near-frontier model. 200k context, 64k output.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'claude-haiku-4-5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-opus-4-1-us-cr·$5.50 in / $27.50 out per MTok·1,000k contextClaude Opus 4.1 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-opus-4-1-us-cr',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-opus-4-us-cr·$5.50 in / $27.50 out per MTok·1,000k contextClaude Opus 4 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-opus-4-us-cr',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-opus-4-5·$5.00 in / $25.00 out per MTok·1,000k contextClaude Opus 4.5 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-opus-4-5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-opus-4-6·$5.00 in / $25.00 out per MTok·1,000k contextClaude Opus 4.6 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-opus-4-6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-opus-4-7·$5.00 in / $25.00 out per MTok·1,000k contextClaude Opus 4.7 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-opus-4-7',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-sonnet-4·$3.00 in / $15.00 out per MTok·1,000k contextClaude Sonnet 4 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-sonnet-4',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-sonnet-4-5·$3.00 in / $15.00 out per MTok·1,000k contextClaude Sonnet 4.5 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-sonnet-4-5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-sonnet-4-6·$3.00 in / $15.00 out per MTok·1,000k contextClaude Sonnet 4.6 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-sonnet-4-6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-haiku-4-5·$1.00 in / $5.00 out per MTok·200k contextClaude Haiku 4.5 through AWS Bedrock Global application inference profile.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-haiku-4-5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);bedrock-claude-haiku-3-5-us-cr·$0.88 in / $4.40 out per MTok·200k contextClaude Haiku 3.5 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'bedrock-claude-haiku-3-5-us-cr',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-4o-audio-previewText-or-audio in, text-or-audio out via /v1/chat/completions.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-4o-audio-preview',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-realtimeBidirectional voice + text. ~$0.06/min audio in, $0.24/min audio out. Text in/out at $5/$20.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-realtime',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-5.5-pro·$30.00 in / $180.00 out per MTok·1,000k contextHighest-tier flagship — research-grade reasoning. No cached-input discount.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-5.5-pro',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-5.5·$5.00 in / $30.00 out per MTok·1,000k contextFlagship multimodal. 1M context. Computer use, MCP, hosted shell.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-5.5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-image-2·$0.040 per imageOpenAI image gen — flexible sizes, high-fidelity image input.
The slug gpt-image-2 is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
gpt-5.4·$2.50 in / $15.00 out per MTok·1,000k contextMarch 2026 release — sits between mini and 5.5. Strong cost/intel ratio.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-5.4',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-5.4-mini·$0.75 in / $4.50 out per MTok·400k contextGPT-5.4-class capability, fast + efficient. 400k context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-5.4-mini',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-4o-mini-ttsToken-priced TTS — ~$0.015/min generated audio.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-4o-mini-tts',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);o4-mini·$0.55 in / $2.20 out per MTok·200k contextCheap reasoning model — math, code, structured analysis at low cost.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'o4-mini',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-5.4-nano·$0.20 in / $1.25 out per MTok·400k contextOpenAI’s smallest, cheapest model. High-volume simple tasks.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-5.4-nano',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gpt-4o-transcribeASR with optional speaker diarization. Same price as Whisper.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gpt-4o-transcribe',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);tts-1Standard TTS — same voices, lower fidelity, half the cost of HD.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'tts-1',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);tts-1-hdHigh-fidelity TTS — 6 preset voices. /v1/audio/speech endpoint.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'tts-1-hd',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);whisper-1Speech-to-text (ASR). Will be superseded by gpt-4o-transcribe.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'whisper-1',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gemini-3.1-flash-liveRealtime conversational audio — bidirectional, sub-second latency. ~$0.005/min in, $0.018/min out.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-3.1-flash-live',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gemini-3.1-pro·$2.00 in / $12.00 out per MTok·1,000k contextGoogle’s flagship reasoning model + Computer Use. 1M context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-3.1-pro',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);nano-banana-pro·$0.134 per imageNano Banana Pro (Gemini 3 Pro Image) — best fidelity, complex prompts, accurate text. $0.134/1K-2K, $0.24/4K.
The slug nano-banana-pro is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
gemini-3.1-flash-ttsControllable TTS across 70+ languages, 200+ inline emotion tags. Audio output tokens.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-3.1-flash-tts',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gemini-2.5-flash-ttsCheaper prior-gen TTS — same controllability, narrower language set.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-2.5-flash-tts',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);gemini-3-flash·$0.50 in / $3.00 out per MTok·1,000k contextMid-tier multimodal. Image + video + text input. 1M context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-3-flash',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);nano-banana-2·$0.067 per imageNano Banana 2 (Gemini 3.1 Flash Image) — Pro features at Flash speed. $0.067/1K, $0.10/2K, $0.15/4K.
The slug nano-banana-2 is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
nano-banana·$0.039 per imageOriginal Nano Banana (Gemini 2.5 Flash Image). Fast, fun edits.
The slug nano-banana is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
gemini-3.1-flash-lite·$0.25 in / $1.50 out per MTok·1,000k contextCheapest 1M-context tier. Great for high-volume agents.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'gemini-3.1-flash-lite',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);veo-3.1·$0.400 per secondCinematic text/image-to-video, 720p–1080p, optional audio.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'veo-3.1',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}veo-3.1-fast·$0.100 per secondVeo 3.1 Fast — $0.10/s @720p, $0.12/s @1080p, $0.30/s @4K.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'veo-3.1-fast',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}vertex-gemini-3.1-pro·$2.00 in / $12.00 out per MTok·1,000k contextGemini 3.1 Pro via GCP Vertex — SLA, region pinning, audit logs.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'vertex-gemini-3.1-pro',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);vertex-chirp-3TTS with Instant Custom Voice (10s reference audio).
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'vertex-chirp-3',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);vertex-imagen-3·$0.040 per imageHighest-quality Imagen text-to-image with inpainting + editing.
The slug vertex-imagen-3 is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
vertex-lyria-3-proMusic generation up to 184s. Public preview.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'vertex-lyria-3-pro',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);vertex-veo-3.1·$0.400 per secondVeo 3.1 via GCP Vertex.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'vertex-veo-3.1',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}vertex-veo-3.1-fast·$0.100 per secondVeo 3.1 Fast on Vertex — enterprise routing, $0.10/s @720p.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'vertex-veo-3.1-fast',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}minimax-m2.7-highspeed·$0.60 in / $2.40 out per MTok·200k contextM2.7 with priority routing — 2× cost for lower TTFT.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-m2.7-highspeed',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-m2.1·$0.30 in / $1.20 out per MTok·200k contextOlder M-series — kept for reproducibility.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-m2.1',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-m2.5·$0.30 in / $1.20 out per MTok·200k contextPrior-gen M-series — same base price, slightly weaker quality.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-m2.5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-m2.7·$0.30 in / $1.20 out per MTok·200k contextMiniMax’s newest self-iterating flagship for code + agents.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-m2.7',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-hailuo-2.3·$0.040 per secondLatest Hailuo text-to-video. Billed in units; ~$0.04/s @768p.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'minimax-hailuo-2.3',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}minimax-hailuo-2.3-fast·$0.030 per secondHailuo 2.3 Fast — 30% cheaper than 2.3, same family.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'minimax-hailuo-2.3-fast',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}minimax-image-01·$0.004 per imageText-to-image, photoreal + stylized.
The slug minimax-image-01 is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
minimax-music-1.5Music generation from prompt — vocals + instrumentation.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-music-1.5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-speech-02-hdPrior-gen HD voice — kept for reproducibility of pipelines.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-speech-02-hd',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-speech-2.5-turboHD TTS — 40 languages, accurate voice replication.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-speech-2.5-turbo',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);minimax-speech-2.6Latest TTS — Fluent LoRA voice cloning, prosodic naturalness across 40+ languages.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'minimax-speech-2.6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);moonshot-v1-128k·$0.83 in / $0.83 out per MTok·128k contextLegacy text-only Moonshot v1 long-context. (Not on OpenRouter — keeping prior flat pricing.)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'moonshot-v1-128k',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2.6·$0.73 in / $3.49 out per MTok·256k contextMoonshot’s April 2026 flagship — multimodal, 256k context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2.6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-latest·$0.73 in / $3.49 out per MTok·256k contextAuto-routes to Moonshot’s current default (K2.6 as of 2026-05). Multimodal.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-latest',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2-0711-preview·$0.60 in / $2.50 out per MTok·128k contextJuly 2025 K2 preview snapshot — scheduled for discontinuation 2026-05-25. (Not currently listed on OpenRouter — keeping prior estimate.)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2-0711-preview',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2-0905-preview·$0.60 in / $2.50 out per MTok·256k contextSeptember 2025 K2 preview snapshot — scheduled for discontinuation 2026-05-25.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2-0905-preview',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2-thinking·$0.60 in / $2.50 out per MTok·256k contextExplicit thinking-mode K2 — chain-of-thought reasoning for math + code.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2-thinking',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2-turbo·$0.60 in / $2.50 out per MTok·128k contextMoonshot’s agentic K2 with priority routing — fast TTFT, 128k context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2-turbo',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);kimi-k2.5·$0.40 in / $1.90 out per MTok·256k contextJanuary 2026 multimodal release — cheaper than K2.6 with similar capability.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'kimi-k2.5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);deepseek-v4-pro·$0.43 in / $0.87 out per MTok·1,000k contextV4 flagship reasoning — 1M context. OR pricing reflects 75%-off promo through 2026-05-31.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'deepseek-v4-pro',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);deepseek-chat·$0.32 in / $0.89 out per MTok·163.84k contextLegacy alias → V4 Flash non-thinking mode. Sunsets 2026-07-24; migrate to deepseek-v4-flash.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'deepseek-chat',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);deepseek-reasoner·$0.11 in / $0.22 out per MTok·1,000k contextLegacy alias → V4 Flash thinking mode. Sunsets 2026-07-24; migrate to deepseek-v4-flash with reasoning. (Not separately listed on OpenRouter — mirrors v4-flash.)
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'deepseek-reasoner',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);deepseek-v4-flash·$0.11 in / $0.22 out per MTok·1,000k contextV4 default — 1M context, 384k max output.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'deepseek-v4-flash',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-realtimeEnd-to-end voice + video understanding with singing + 2-min memory. Function calls supported.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-realtime',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-4-airx·$1.40 in / $1.40 out per MTok·8k contextLow-latency AirX variant — fastest GLM tier, smaller context.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4-airx',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-5-turbo·$1.20 in / $4.00 out per MTok·200k contextMarch 2026 turbo variant — priority routing on the GLM 5 family.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-5-turbo',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-5v-turbo·$1.20 in / $4.00 out per MTok·200k contextGLM 5 family vision-capable turbo — multimodal with priority routing.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-5v-turbo',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-5.1·$0.98 in / $3.08 out per MTok·200k contextZhipu’s April 2026 flagship — SOTA on SWE-Bench Pro, 200k context, 128k max output.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-5.1',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-5·$0.60 in / $1.92 out per MTok·200k contextGLM 5 base flagship — released 2026-02-12, available on Pro and Max coding tiers.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-5',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-4.6·$0.43 in / $1.74 out per MTok·200k contextGLM 4 family flagship — 200k context, agentic + coding focused.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4.6',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-4.7·$0.40 in / $1.75 out per MTok·200k contextPrevious-gen flagship before GLM 5 — solid coding + reasoning at lower cost.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4.7',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-4.6v·$0.30 in / $0.90 out per MTok·128k contextGLM 4.6 vision variant — multimodal input on the 4-family flagship.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4.6v',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-4.7-flash·$0.06 in / $0.40 out per MTok·200k contextLowest tier — high-volume simple tasks. Generous rate limits.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4.7-flash',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);cogvideox·$0.200 per secondZhipu’s text/image-to-video — 6s clips at 720p–1080p.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'cogvideox',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}cogvideox-flash·$0.000 per second (free)Free video generation tier.
// Start a generation
const start = await fetch('https://api.miavo.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'cogvideox-flash',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://api.miavo.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://api.miavo.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}cogview-3-flash·$0.000 per image (free)Free image generation tier — generous rate limits.
The slug cogview-3-flash is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
cogview-4·$0.050 per imageLatest text-to-image — strong on Chinese text rendering + complex prompts.
The slug cogview-4 is reserved and listed in /v1/models. The image-generation endpoint is shipping next — calls today fall back to /v1/chat/completions with an error.code = "not_implemented".
glm-4-flash·$0.00 in / $0.00 out per MTok·128k contextFree tier — high-volume, simple tasks. Generous rate limits.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-4-flash',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);glm-ttsControllable + emotion-expressive zero-shot voice cloning. Open-sourced Dec 2025.
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.miavo.xyz/v1',
apiKey: process.env.MACAW_API_KEY!,
});
const res = await client.chat.completions.create({
model: 'glm-tts',
messages: [
{ role: 'user', content: 'Write me a haiku about gateways.' },
],
});
console.log(res.choices[0].message.content);All errors are OpenAI-shaped: HTTP status + JSON body with error.code, error.message, error.type. Codes are stable; match on them.
{
"error": {
"code": "rate_limit_exceeded",
"type": "rate_limit",
"message": "RPM exceeded — 200 requests in 60 seconds."
}
}| Status | Code | When |
|---|---|---|
| 401 | authentication_error | Missing or invalid sk-maas key. |
| 402 | budget_exhausted | Credit balance hit — top up to continue. |
| 403 | model_not_allowed | Model is not on this key’s allow-list. |
| 400 | invalid_request | Body failed schema validation. |
| 429 | rate_limit_exceeded | Per-key RPM or TPM tripped. |
| 502 | upstream_error | Provider returned an error after we forwarded. |
| 503 | no_upstream | No pooled credential is available for this model. |
Each API key carries its own rpmLimit and tpmLimit, both rolling 60-second windows. Defaults: 20 / 40k on Free, 200 / 400k on paid keys. Tune per-key from your dashboard.
Miavo implements the OpenAI Chat Completions schema. Any SDK that targets OpenAI works by swapping baseURL + apiKey.
- const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
+ const client = new OpenAI({
+ baseURL: 'https://api.miavo.xyz/v1',
+ apiKey: process.env.MACAW_API_KEY,
+ });
- model: 'gpt-4o-mini',
+ model: 'claude-sonnet-4-6', // …or any model from /v1/modelsWorks drop-in: chat, streaming, tools, vision input, JSON mode, /v1/models. Miavo-specific: /v1/videos/generations and our error codes.