mMengbi Router

SDKS / OVERVIEW

Client SDKs

Keep using the OpenAI, Anthropic, or Gemini SDKs by swapping only the Base URL and personal key.

!

This page is the preview integration contract for individual Mengbi Router users. Examples will remain compatible when the production gateway opens.

01 /

Connect with existing SDKs

Mengbi Router does not require a proprietary SDK. Point your existing OpenAI, Anthropic, or Gemini client at Mengbi with a personal key.

How to use this page

Client SDKs is a single page. Use the protocol sections below for the minimum setup; full request examples stay in API Reference.

  • OpenAI-compatible clients: set OPENAI_BASE_URL and OPENAI_API_KEY
  • Anthropic-native clients: set ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY
  • Gemini-native clients: set GOOGLE_GEMINI_BASE_URL and GEMINI_API_KEY

NoteNever put a personal key into browser code or a public repository.

02 /

OpenAI SDK

For the OpenAI SDK, Codex, and most OpenAI-compatible clients.

Codex and OpenAI protocol tools

bash
export OPENAI_BASE_URL="https://router-api.mengbi-ai.net/v1"
export OPENAI_API_KEY="sk-mengbi-xxxxxx"

Next step

After setup, open API Reference for Chat Completions and Responses examples.

03 /

Anthropic SDK

Claude-oriented clients use the Anthropic-native endpoint.

Claude Code

bash
export ANTHROPIC_BASE_URL="https://router-api.mengbi-ai.net"
export ANTHROPIC_API_KEY="sk-mengbi-xxxxxx"

Next step

For full Messages request examples, open the Anthropic native page in API Reference.

04 /

Gemini SDK

Gemini CLI and Gemini-native clients use the matching Google endpoint variables.

Gemini CLI

bash
export GOOGLE_GEMINI_BASE_URL="https://router-api.mengbi-ai.net"
export GEMINI_API_KEY="sk-mengbi-xxxxxx"
export GEMINI_API_KEY_AUTH_MECHANISM="bearer"

Next step

For generateContent examples, open the Gemini native page in API Reference.