Miavo
Documentation

Miavo API

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.

Authentication

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.

request.http
POST https://api.miavo.xyz/v1/chat/completions
Authorization: Bearer sk-maas-...
Content-Type: application/json

List models

GET /v1/models is the source of truth — model slugs returned here are valid for both /v1/chat/completions and /v1/videos/generations.

models.sh
curl https://api.miavo.xyz/v1/models \
  -H "Authorization: Bearer sk-maas-..."

Anthropic

4 models

Claude Opus 4.6

claude-opus-4-6·$5.00 in / $25.00 out per MTok·1,000k context

Previous flagship — 1M context. Still served alongside 4.7.

chat.ts
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);
StreamingToolsVision input

Claude Opus 4.7

claude-opus-4-7·$5.00 in / $25.00 out per MTok·1,000k context

Top reasoning + agentic coding. 1M context, 128k output.

chat.ts
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);
StreamingToolsVision input

Claude Sonnet 4.6

claude-sonnet-4-6·$3.00 in / $15.00 out per MTok·1,000k context

Balanced flagship — best speed/intelligence ratio. 1M context.

chat.ts
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);
StreamingToolsVision input

Claude Haiku 4.5

claude-haiku-4-5·$1.00 in / $5.00 out per MTok·200k context

Anthropic’s fastest near-frontier model. 200k context, 64k output.

chat.ts
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);
StreamingToolsVision input

AWS Bedrock

10 models

Claude Opus 4.1 (AWS Bedrock US CR)

bedrock-claude-opus-4-1-us-cr·$5.50 in / $27.50 out per MTok·1,000k context

Claude Opus 4.1 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.

chat.ts
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);
StreamingToolsVision input

Claude Opus 4 (AWS Bedrock US CR)

bedrock-claude-opus-4-us-cr·$5.50 in / $27.50 out per MTok·1,000k context

Claude Opus 4 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.

chat.ts
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);
StreamingToolsVision input

Claude Opus 4.5 (AWS Bedrock)

bedrock-claude-opus-4-5·$5.00 in / $25.00 out per MTok·1,000k context

Claude Opus 4.5 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Opus 4.6 (AWS Bedrock)

bedrock-claude-opus-4-6·$5.00 in / $25.00 out per MTok·1,000k context

Claude Opus 4.6 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Opus 4.7 (AWS Bedrock)

bedrock-claude-opus-4-7·$5.00 in / $25.00 out per MTok·1,000k context

Claude Opus 4.7 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Sonnet 4 (AWS Bedrock)

bedrock-claude-sonnet-4·$3.00 in / $15.00 out per MTok·1,000k context

Claude Sonnet 4 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Sonnet 4.5 (AWS Bedrock)

bedrock-claude-sonnet-4-5·$3.00 in / $15.00 out per MTok·1,000k context

Claude Sonnet 4.5 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Sonnet 4.6 (AWS Bedrock)

bedrock-claude-sonnet-4-6·$3.00 in / $15.00 out per MTok·1,000k context

Claude Sonnet 4.6 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Haiku 4.5 (AWS Bedrock)

bedrock-claude-haiku-4-5·$1.00 in / $5.00 out per MTok·200k context

Claude Haiku 4.5 through AWS Bedrock Global application inference profile.

chat.ts
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);
StreamingToolsVision input

Claude Haiku 3.5 (AWS Bedrock US CR)

bedrock-claude-haiku-3-5-us-cr·$0.88 in / $4.40 out per MTok·200k context

Claude Haiku 3.5 through AWS Bedrock US cross-region profile. Includes the documented 10% premium.

chat.ts
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);
StreamingToolsVision input

OpenAI

14 models

GPT-4o Audio

gpt-4o-audio-preview

Text-or-audio in, text-or-audio out via /v1/chat/completions.

chat.ts
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 Realtime

gpt-realtime

Bidirectional voice + text. ~$0.06/min audio in, $0.24/min audio out. Text in/out at $5/$20.

chat.ts
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

gpt-5.5-pro·$30.00 in / $180.00 out per MTok·1,000k context

Highest-tier flagship — research-grade reasoning. No cached-input discount.

chat.ts
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);
StreamingToolsVision input

GPT-5.5

gpt-5.5·$5.00 in / $30.00 out per MTok·1,000k context

Flagship multimodal. 1M context. Computer use, MCP, hosted shell.

chat.ts
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);
StreamingToolsVision input

GPT Image 2

IMAGE · PREVIEW
gpt-image-2·$0.040 per image

OpenAI image gen — flexible sizes, high-fidelity image input.

Image generation adapter — in preview

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

gpt-5.4·$2.50 in / $15.00 out per MTok·1,000k context

March 2026 release — sits between mini and 5.5. Strong cost/intel ratio.

chat.ts
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);
StreamingToolsVision input

GPT-5.4 mini

gpt-5.4-mini·$0.75 in / $4.50 out per MTok·400k context

GPT-5.4-class capability, fast + efficient. 400k context.

chat.ts
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);
StreamingToolsVision input

GPT-4o mini TTS

gpt-4o-mini-tts

Token-priced TTS — ~$0.015/min generated audio.

chat.ts
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

o4-mini·$0.55 in / $2.20 out per MTok·200k context

Cheap reasoning model — math, code, structured analysis at low cost.

chat.ts
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);
StreamingTools

GPT-5.4 nano

gpt-5.4-nano·$0.20 in / $1.25 out per MTok·400k context

OpenAI’s smallest, cheapest model. High-volume simple tasks.

chat.ts
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);
StreamingToolsVision input

GPT-4o Transcribe

gpt-4o-transcribe

ASR with optional speaker diarization. Same price as Whisper.

chat.ts
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-1

tts-1

Standard TTS — same voices, lower fidelity, half the cost of HD.

chat.ts
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 HD

tts-1-hd

High-fidelity TTS — 6 preset voices. /v1/audio/speech endpoint.

chat.ts
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 (legacy)

whisper-1

Speech-to-text (ASR). Will be superseded by gpt-4o-transcribe.

chat.ts
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);

Google

11 models

Gemini 3.1 Flash Live

gemini-3.1-flash-live

Realtime conversational audio — bidirectional, sub-second latency. ~$0.005/min in, $0.018/min out.

chat.ts
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

gemini-3.1-pro·$2.00 in / $12.00 out per MTok·1,000k context

Google’s flagship reasoning model + Computer Use. 1M context.

chat.ts
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);
StreamingToolsVision input

Nano Banana Pro

IMAGE · PREVIEW
nano-banana-pro·$0.134 per image

Nano Banana Pro (Gemini 3 Pro Image) — best fidelity, complex prompts, accurate text. $0.134/1K-2K, $0.24/4K.

Image generation adapter — in preview

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 TTS

gemini-3.1-flash-tts

Controllable TTS across 70+ languages, 200+ inline emotion tags. Audio output tokens.

chat.ts
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 TTS

gemini-2.5-flash-tts

Cheaper prior-gen TTS — same controllability, narrower language set.

chat.ts
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

gemini-3-flash·$0.50 in / $3.00 out per MTok·1,000k context

Mid-tier multimodal. Image + video + text input. 1M context.

chat.ts
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);
StreamingToolsVision input

Nano Banana 2

IMAGE · PREVIEW
nano-banana-2·$0.067 per image

Nano Banana 2 (Gemini 3.1 Flash Image) — Pro features at Flash speed. $0.067/1K, $0.10/2K, $0.15/4K.

Image generation adapter — in preview

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

IMAGE · PREVIEW
nano-banana·$0.039 per image

Original Nano Banana (Gemini 2.5 Flash Image). Fast, fun edits.

Image generation adapter — in preview

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

gemini-3.1-flash-lite·$0.25 in / $1.50 out per MTok·1,000k context

Cheapest 1M-context tier. Great for high-volume agents.

chat.ts
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);
StreamingToolsVision input

Veo 3.1

VIDEO
veo-3.1·$0.400 per second

Cinematic text/image-to-video, 720p–1080p, optional audio.

video.ts
// 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

VIDEO
veo-3.1-fast·$0.100 per second

Veo 3.1 Fast — $0.10/s @720p, $0.12/s @1080p, $0.30/s @4K.

video.ts
// 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
}

Google Vertex

6 models

Gemini 3.1 Pro (Vertex)

vertex-gemini-3.1-pro·$2.00 in / $12.00 out per MTok·1,000k context

Gemini 3.1 Pro via GCP Vertex — SLA, region pinning, audit logs.

chat.ts
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);
StreamingToolsVision input

Chirp 3 (Vertex)

vertex-chirp-3

TTS with Instant Custom Voice (10s reference audio).

chat.ts
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);

Imagen 3 (Vertex)

IMAGE · PREVIEW
vertex-imagen-3·$0.040 per image

Highest-quality Imagen text-to-image with inpainting + editing.

Image generation adapter — in preview

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".

Lyria 3 Pro (Vertex)

vertex-lyria-3-pro

Music generation up to 184s. Public preview.

chat.ts
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);

Veo 3.1 (Vertex)

VIDEO
vertex-veo-3.1·$0.400 per second

Veo 3.1 via GCP Vertex.

video.ts
// 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
}

Veo 3.1 Fast (Vertex)

VIDEO
vertex-veo-3.1-fast·$0.100 per second

Veo 3.1 Fast on Vertex — enterprise routing, $0.10/s @720p.

video.ts
// 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

11 models

MiniMax M2.7 Highspeed

minimax-m2.7-highspeed·$0.60 in / $2.40 out per MTok·200k context

M2.7 with priority routing — 2× cost for lower TTFT.

chat.ts
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);
StreamingTools

MiniMax M2.1

minimax-m2.1·$0.30 in / $1.20 out per MTok·200k context

Older M-series — kept for reproducibility.

chat.ts
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);
StreamingTools

MiniMax M2.5

minimax-m2.5·$0.30 in / $1.20 out per MTok·200k context

Prior-gen M-series — same base price, slightly weaker quality.

chat.ts
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);
StreamingTools

MiniMax M2.7

minimax-m2.7·$0.30 in / $1.20 out per MTok·200k context

MiniMax’s newest self-iterating flagship for code + agents.

chat.ts
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);
StreamingTools

MiniMax Hailuo 2.3

VIDEO
minimax-hailuo-2.3·$0.040 per second

Latest Hailuo text-to-video. Billed in units; ~$0.04/s @768p.

video.ts
// 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

VIDEO
minimax-hailuo-2.3-fast·$0.030 per second

Hailuo 2.3 Fast — 30% cheaper than 2.3, same family.

video.ts
// 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

IMAGE · PREVIEW
minimax-image-01·$0.004 per image

Text-to-image, photoreal + stylized.

Image generation adapter — in preview

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.5

minimax-music-1.5

Music generation from prompt — vocals + instrumentation.

chat.ts
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 HD

minimax-speech-02-hd

Prior-gen HD voice — kept for reproducibility of pipelines.

chat.ts
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 Turbo

minimax-speech-2.5-turbo

HD TTS — 40 languages, accurate voice replication.

chat.ts
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.6

minimax-speech-2.6

Latest TTS — Fluent LoRA voice cloning, prosodic naturalness across 40+ languages.

chat.ts
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 Kimi

8 models

Moonshot v1 128k

moonshot-v1-128k·$0.83 in / $0.83 out per MTok·128k context

Legacy text-only Moonshot v1 long-context. (Not on OpenRouter — keeping prior flat pricing.)

chat.ts
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);
StreamingTools

Kimi K2.6

kimi-k2.6·$0.73 in / $3.49 out per MTok·256k context

Moonshot’s April 2026 flagship — multimodal, 256k context.

chat.ts
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);
StreamingToolsVision input

Kimi Latest

kimi-latest·$0.73 in / $3.49 out per MTok·256k context

Auto-routes to Moonshot’s current default (K2.6 as of 2026-05). Multimodal.

chat.ts
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);
StreamingToolsVision input

Kimi K2 0711

kimi-k2-0711-preview·$0.60 in / $2.50 out per MTok·128k context

July 2025 K2 preview snapshot — scheduled for discontinuation 2026-05-25. (Not currently listed on OpenRouter — keeping prior estimate.)

chat.ts
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);
StreamingTools

Kimi K2 0905

kimi-k2-0905-preview·$0.60 in / $2.50 out per MTok·256k context

September 2025 K2 preview snapshot — scheduled for discontinuation 2026-05-25.

chat.ts
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);
StreamingTools

Kimi K2 Thinking

kimi-k2-thinking·$0.60 in / $2.50 out per MTok·256k context

Explicit thinking-mode K2 — chain-of-thought reasoning for math + code.

chat.ts
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);
StreamingTools

Kimi K2 Turbo

kimi-k2-turbo·$0.60 in / $2.50 out per MTok·128k context

Moonshot’s agentic K2 with priority routing — fast TTFT, 128k context.

chat.ts
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);
StreamingToolsVision input

Kimi K2.5

kimi-k2.5·$0.40 in / $1.90 out per MTok·256k context

January 2026 multimodal release — cheaper than K2.6 with similar capability.

chat.ts
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);
StreamingToolsVision input

DeepSeek

4 models

DeepSeek V4 Pro

deepseek-v4-pro·$0.43 in / $0.87 out per MTok·1,000k context

V4 flagship reasoning — 1M context. OR pricing reflects 75%-off promo through 2026-05-31.

chat.ts
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);
StreamingTools

DeepSeek Chat (legacy)

deepseek-chat·$0.32 in / $0.89 out per MTok·163.84k context

Legacy alias → V4 Flash non-thinking mode. Sunsets 2026-07-24; migrate to deepseek-v4-flash.

chat.ts
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);
StreamingTools

DeepSeek Reasoner (legacy)

deepseek-reasoner·$0.11 in / $0.22 out per MTok·1,000k context

Legacy alias → V4 Flash thinking mode. Sunsets 2026-07-24; migrate to deepseek-v4-flash with reasoning. (Not separately listed on OpenRouter — mirrors v4-flash.)

chat.ts
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);
StreamingTools

DeepSeek V4 Flash

deepseek-v4-flash·$0.11 in / $0.22 out per MTok·1,000k context

V4 default — 1M context, 384k max output.

chat.ts
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);
StreamingTools

Zhipu GLM

16 models

GLM Realtime

glm-realtime

End-to-end voice + video understanding with singing + 2-min memory. Function calls supported.

chat.ts
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

glm-4-airx·$1.40 in / $1.40 out per MTok·8k context

Low-latency AirX variant — fastest GLM tier, smaller context.

chat.ts
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);
StreamingTools

GLM 5 Turbo

glm-5-turbo·$1.20 in / $4.00 out per MTok·200k context

March 2026 turbo variant — priority routing on the GLM 5 family.

chat.ts
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);
StreamingTools

GLM 5V Turbo

glm-5v-turbo·$1.20 in / $4.00 out per MTok·200k context

GLM 5 family vision-capable turbo — multimodal with priority routing.

chat.ts
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);
StreamingToolsVision input

GLM 5.1

glm-5.1·$0.98 in / $3.08 out per MTok·200k context

Zhipu’s April 2026 flagship — SOTA on SWE-Bench Pro, 200k context, 128k max output.

chat.ts
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);
StreamingTools

GLM 5

glm-5·$0.60 in / $1.92 out per MTok·200k context

GLM 5 base flagship — released 2026-02-12, available on Pro and Max coding tiers.

chat.ts
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);
StreamingTools

GLM 4.6

glm-4.6·$0.43 in / $1.74 out per MTok·200k context

GLM 4 family flagship — 200k context, agentic + coding focused.

chat.ts
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);
StreamingTools

GLM 4.7

glm-4.7·$0.40 in / $1.75 out per MTok·200k context

Previous-gen flagship before GLM 5 — solid coding + reasoning at lower cost.

chat.ts
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);
StreamingTools

GLM 4.6V

glm-4.6v·$0.30 in / $0.90 out per MTok·128k context

GLM 4.6 vision variant — multimodal input on the 4-family flagship.

chat.ts
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);
StreamingToolsVision input

GLM 4.7 Flash

glm-4.7-flash·$0.06 in / $0.40 out per MTok·200k context

Lowest tier — high-volume simple tasks. Generous rate limits.

chat.ts
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);
StreamingTools

CogVideoX

VIDEO
cogvideox·$0.200 per second

Zhipu’s text/image-to-video — 6s clips at 720p–1080p.

video.ts
// 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

VIDEO
cogvideox-flash·$0.000 per second (free)

Free video generation tier.

video.ts
// 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

IMAGE · PREVIEW
cogview-3-flash·$0.000 per image (free)

Free image generation tier — generous rate limits.

Image generation adapter — in preview

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

IMAGE · PREVIEW
cogview-4·$0.050 per image

Latest text-to-image — strong on Chinese text rendering + complex prompts.

Image generation adapter — in preview

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

glm-4-flash·$0.00 in / $0.00 out per MTok·128k context

Free tier — high-volume, simple tasks. Generous rate limits.

chat.ts
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);
StreamingTools

GLM TTS

glm-tts

Controllable + emotion-expressive zero-shot voice cloning. Open-sourced Dec 2025.

chat.ts
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);

Reference

Errors

All errors are OpenAI-shaped: HTTP status + JSON body with error.code, error.message, error.type. Codes are stable; match on them.

error.json
{
  "error": {
    "code": "rate_limit_exceeded",
    "type": "rate_limit",
    "message": "RPM exceeded — 200 requests in 60 seconds."
  }
}
StatusCodeWhen
401authentication_errorMissing or invalid sk-maas key.
402budget_exhaustedCredit balance hit — top up to continue.
403model_not_allowedModel is not on this key’s allow-list.
400invalid_requestBody failed schema validation.
429rate_limit_exceededPer-key RPM or TPM tripped.
502upstream_errorProvider returned an error after we forwarded.
503no_upstreamNo pooled credential is available for this model.

Rate limits

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.

OpenAI compatibility

Miavo implements the OpenAI Chat Completions schema. Any SDK that targets OpenAI works by swapping baseURL + apiKey.

migrate.diff
- 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/models

Works drop-in: chat, streaming, tools, vision input, JSON mode, /v1/models. Miavo-specific: /v1/videos/generations and our error codes.