LLM API

Text models
through one API

Claude, GPT, Gemini, Grok, Kimi, GLM, DeepSeek and more through the OpenAI-compatible MegaBrain API. The same key and balance also run image and video generation.

115 models20 labs14 free

Frontier models

The flagships of Claude, GPT, Gemini, Grok and other families that are available right now. Prices per 1M tokens.

Claude Fable 5.2

Anthropic

sees images

Claude Fable 5.2 is Anthropic's most capable model for the most demanding technical work, with gains over Fable 5.1 in coding, reasoning, and vision. In prerelease testing it completed otherwise-infeasible...

input $9.2output $46context 1M
anthropic/claude-fable-5.2

Claude Opus 5.5

Anthropic

sees images

Claude Opus 5.5 is Anthropic's flagship model for demanding reasoning, coding, and long-horizon agentic work, succeeding Claude Opus 5. It is particularly strong at multi-step changes in large codebases, code...

input $4.6output $23context 1M
anthropic/claude-opus-5.5

GPT-6.1 Sol

OpenAI

sees images

GPT-6.1 Sol is an upgrade to GPT-6 Sol from OpenAI, positioned below the flagship GPT-6 Astra in the GPT-6 series. It is suited for agentic coding, computer use, document-heavy professional...

input $1.15output $5.75context 1.1M
openai/gpt-6.1-sol

GPT-6 Astra

OpenAI

sees images

GPT-6 Astra is OpenAI's flagship model for demanding end-to-end work. It is suited for advanced analysis, software engineering, deep research, scientific work, and document creation, with particular strengths in long-horizon...

input $5.75output $29context 1.1M
openai/gpt-6-astra

Grok 4.7

SpaceXAI

sees images

Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and...

input $2.3output $6.9context 500K
x-ai/grok-4.7

Gemini 3.8 Flash

Google

sees images

Gemini 3.8 Flash is Google's most intelligent Flash model with significant gains from 3.7 Flash across software engineering, agentic tasks, and multi-step reasoning.

input $0.86output $4.31context 1M
google/gemini-3.8-flash

Claude Sonnet 5.5

Anthropic

sees images

Claude Sonnet 5.5 is Anthropic's Sonnet-class model for well-scoped everyday work, succeeding Claude Sonnet 5 as a direct upgrade. It is especially strong at building features, fixing bugs, and producing...

input $2.3output $12context 1M
anthropic/claude-sonnet-5.5

Kimi K3.1 Pro

Moonshot AI

sees images

Kimi K3.1 Pro is Moonshot AI's flagship open-weight multimodal reasoning model and a post-trained successor to Kimi K3, with a 1M-token context window. It is built for long-horizon coding, 3D...

input $2.3output $12context 1M
moonshotai/kimi-k3.1-pro

GPT-6.1 Terra

OpenAI

sees images

GPT-6.1 Terra is the mid-tier model in OpenAI's GPT-6.1 series, priced below GPT-6.1 Sol. It is suited for everyday agentic, coding, and writing work, is particularly strong at understanding screenshots...

input $0.57output $2.88context 1.1M
openai/gpt-6.1-terra

GLM 5.3

Z.ai

GLM-5.3 is a large-scale reasoning model from Z.ai, built for complex software engineering and long-horizon agent tasks. It supports text input and output with a 1M-token context window, and improves...

input $1.61output $5.06context 1M
z-ai/glm-5.3

DeepSeek V4 Pro 0423

DeepSeek

DeepSeek V4 Pro is a large-scale Mixture-of-Experts model from DeepSeek with 1.6T total parameters and 49B activated parameters, supporting a 1M-token context window. It is designed for advanced reasoning, coding,...

input $1.63output $3.26context 1M
deepseek/deepseek-v4-pro

Qwen3.8 Max (0902)

Qwen

sees images

Qwen3.8 Max 0902 is an updated snapshot of Qwen3.8 Max from Alibaba's Qwen team. It is a 2.4-trillion-parameter mixture-of-experts model that accepts text, image, and video input and returns text,...

input $2.3output $6.9context 1M
qwen/qwen3.8-max-0902

Questions and answers

How do I connect?

Create a free account, make an API key in your dashboard and set the base URL to https://getmegabrain.com/api/gateway/v1 in any OpenAI client: the official SDKs, LangChain, Cursor, Continue. Pass the model id from its page in the model field, for example anthropic/claude-opus-5.5.

How does billing work?

You pay as you go from a prepaid USD balance. Each request is charged for the tokens it actually used: input and output separately, at the per-1M-token price shown on the model page. No subscription is needed.

Are there free models?

Yes. Models marked "free" cost nothing. They are offered by the labs themselves, so availability can change. The mb-auto/free route picks an available free model for you.

Is it the same key for images and video?

Yes. One key and one balance cover text models, image generation and video generation.

Every model, one key

Switch between models by changing one line of code. Pay as you go from a prepaid USD balance.

Get started free

All text models

Compare 115 models by price, context and capabilities

Claude Fable 5.2

Anthropic

anthropic/claude-fable-5.2

context 1Minput $9.2output $46no training on prompts

Claude Opus 5.5

Anthropic

anthropic/claude-opus-5.5

context 1Minput $4.6output $23no training on prompts

GPT-6.1 Sol

OpenAI

openai/gpt-6.1-sol

context 1.1Minput $1.15output $5.75no training on prompts

GPT-6 Astra

OpenAI

openai/gpt-6-astra

context 1.1Minput $5.75output $29no training on prompts

Grok 4.7

SpaceXAI

x-ai/grok-4.7

context 500Kinput $2.3output $6.9no training on prompts

Gemini 3.8 Flash

Google

google/gemini-3.8-flash

context 1Minput $0.86output $4.31no training on prompts

Claude Sonnet 5.5

Anthropic

anthropic/claude-sonnet-5.5

context 1Minput $2.3output $12no training on prompts

Kimi K3.1 Pro

Moonshot AI

moonshotai/kimi-k3.1-pro

context 1Minput $2.3output $12no training on prompts

GPT-6.1 Terra

OpenAI

openai/gpt-6.1-terra

context 1.1Minput $0.57output $2.88no training on prompts

GLM 5.3

Z.ai

z-ai/glm-5.3

context 1Minput $1.61output $5.06no training on prompts

DeepSeek V4 Pro 0423

DeepSeek

deepseek/deepseek-v4-pro

context 1Minput $1.63output $3.26no training on prompts

Qwen3.8 Max (0902)

Qwen

qwen/qwen3.8-max-0902

context 1Minput $2.3output $6.9no training on prompts

MiniMax M3.1 Flash

MiniMax

minimax/minimax-m3.1-flash

context 1Minput $0.09output $0.35no training on prompts

Inkling 2 Small (free)

thinkingmachines

thinkingmachines/inkling-2-small:free

context 1Minput freeoutput free

LFM3-1.7B (free)

liquid

liquid/lfm-3-1.7b:free

context 262Kinput freeoutput free

Flint (free)

recursive

recursive/flint-v1.0:free

context 262Kinput freeoutput free

Xing4.0 29B A4B (free)

xingchen-agi

xingchen-agi/xing4.0-29b-a4b:free

context 262Kinput freeoutput free

Nemotron 3.5 Super VL (free)

NVIDIA

nvidia/nemotron-3.5-super-vl:free

context 1Minput freeoutput free

Claude Haiku 5.5

Anthropic

anthropic/claude-haiku-5.5

context 1Minput $0.11output $0.57no training on prompts

Mistral Large 4

Mistral

mistralai/mistral-large-4-0

context 1Minput $0.81output $2.41no training on prompts

GLM 5.3 Prime

Z.ai

z-ai/glm-5.3-prime

context 1Minput $3.22output $10no training on prompts

GPT-6 Luna

OpenAI

openai/gpt-6-luna

context 1.1Minput $0.06output $0.29no training on prompts

GPT-6 Sol

OpenAI

openai/gpt-6-sol

context 1.1Minput $1.15output $5.75no training on prompts

MiMo-V2.6-Pro

Xiaomi

xiaomi/mimo-v2.6-pro

context 1.1Minput $0.5output $1no training on prompts

DeepSeek V4.1 Flash

DeepSeek

deepseek/deepseek-v4.1-flash

context 1Minput $0.12output $0.48no training on prompts

Claude Fable 5.1

Anthropic

anthropic/claude-fable-5.1

context 1Minput $12output $57no training on prompts

Qwen3.8 Flash

Qwen

qwen/qwen3.8-flash

context 1Minput $0.17output $0.54no training on prompts

GLM 5.3 Flash

Z.ai

z-ai/glm-5.3-flash

context 1Minput $0.17output $0.57no training on prompts

Dots3-Note Preview (free)

dots-studio

dots-studio/dots-3-note-preview:free

context 512Kinput freeoutput free

Gemini 3.7 Flash

Google

google/gemini-3.7-flash

context 1Minput $0.86output $4.31no training on prompts

Grok 4.6

SpaceXAI

x-ai/grok-4.6

context 500Kinput $2.3output $6.9no training on prompts

LFM2.5-2.6B (free)

liquid

liquid/lfm-2.5-2.6b:free

context 66Kinput freeoutput free

Nemotron 3.5 Lightning (free)

NVIDIA

nvidia/nemotron-3.5-lightning:free

context 1Minput freeoutput free

Claude Opus 5

Anthropic

anthropic/claude-opus-5

context 1Minput $5.75output $29no training on prompts

Gemini 3.6 Flash

Google

google/gemini-3.6-flash

context 1Minput $0.43output $2.16no training on prompts

Kimi K3

Moonshot AI

moonshotai/kimi-k3

context 1Minput $0.22output $18no training on prompts

GPT-5.6 Luna

OpenAI

openai/gpt-5.6-luna

context 1.1Minput $0.11output $0.69no training on prompts

GPT-5.6 Terra

OpenAI

openai/gpt-5.6-terra

context 1.1Minput $1.15output $6.9no training on prompts

GPT-5.6 Sol

OpenAI

openai/gpt-5.6-sol

context 1.1Minput $2.3output $12no training on prompts

Grok 4.5

SpaceXAI

x-ai/grok-4.5

context 500Kinput $2.3output $6.9no training on prompts

Claude Sonnet 5

Anthropic

anthropic/claude-sonnet-5

context 1Minput $2.3output $12no training on prompts

North Mini Code (free)

cohere

cohere/north-mini-code:free

context 256Kinput freeoutput free

GLM 5.2

Z.ai

z-ai/glm-5.2

context 1Minput $1.61output $5.06no training on prompts

Kimi K2.7 Code

Moonshot AI

moonshotai/kimi-k2.7-code

context 262Kinput $1.09output $4.6no training on prompts

Claude Fable 5

Anthropic

anthropic/claude-fable-5

context 1Minput $12output $57no training on prompts

Nemotron 3 Ultra (free)

NVIDIA

nvidia/nemotron-3-ultra-550b-a55b:free

context 1Minput freeoutput free

Qwen3.7 Plus (20% off)

Qwen

qwen/qwen3.7-plus

context 1Minput $0.37output $1.47no training on prompts

MiniMax M3

MiniMax

minimax/minimax-m3

context 1Minput $0.35output $1.38no training on prompts

Claude Opus 4.8

Anthropic

anthropic/claude-opus-4.8

context 1Minput $5.75output $29no training on prompts

Grok Build 0.1

SpaceXAI

x-ai/grok-build-0.1

context 256Kinput $1.15output $2.3no training on prompts

Gemini 3.5 Flash

Google

google/gemini-3.5-flash

context 1Minput $0.86output $5.18no training on prompts

Gemini 3.1 Flash Lite

Google

google/gemini-3.1-flash-lite

context 1Minput $0.14output $0.86no training on prompts

Grok 4.3

SpaceXAI

x-ai/grok-4.3

context 1Minput $1.44output $2.88no training on prompts

Nemotron 3 Nano Omni (free)

NVIDIA

nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free

context 256Kinput freeoutput free

GPT-5.5 Pro

OpenAI

openai/gpt-5.5-pro

context 1.1Minput $17output $103no training on prompts

GPT-5.5

OpenAI

openai/gpt-5.5

context 1.1Minput $2.88output $17no training on prompts

DeepSeek V4 Flash 0423

DeepSeek

deepseek/deepseek-v4-flash

context 1Minput $0.1output $0.21no training on prompts

GPT-5.4 Image 2

OpenAI

openai/gpt-5.4-image-2

context 272Kinput $9.2output $17no training on prompts

Claude Opus 4.7

Anthropic

anthropic/claude-opus-4.7

context 1Minput $5.75output $29no training on prompts

GLM 5.1

Z.ai

z-ai/glm-5.1

context 205Kinput $1.61output $5.06no training on prompts