跳到正文

Quick Start ​

Welcome to 开桥! This guide walks you through everything from signing up to making your first API request, step by step.

Get Started in 4 Steps

Just four simple steps to start using 开桥:

  1. Sign in to 开桥: Visit the 开桥 login page and sign in using any of the following:

    • Email
    • GitHub account
    • Google account
  2. Choose a usage plan: Based on your use case, select Pay As You Go or 订阅计划.

  3. Get an API key: After signing in, create an API key from the corresponding management page.

  4. Make your first request: Pick the API protocol you're most familiar with, copy the code example below, replace your API key, and run it.

Choose a Usage Plan ​

开桥 offers two usage plans to fit different scenarios:

Pay As You Go ​

Best for: Production environments, commercial products, high-concurrency applications

Pay As You Go uses a prepaid balance + usage-based billing model, purpose-built for production workloads:

  • No rate limits — supports high-concurrency calls
  • Per-token billing — transparent and predictable costs

Go to the Pay As You Go management page to top up your balance and create an API key.

Pay As You Go management page

Detailed Guide

For complete instructions, see the Pay As You Go Guide.

订阅计划 (Subscription) ​

Best for: Personal development, learning and exploration, Vibe Coding, rapid prototyping

订阅计划 provides a fixed monthly fee with predictable AI model access:

  • Fixed monthly fee starting at $20/month
  • All-star model lineup — one subscription unlocks 100+ top models worldwide
  • Full-scenario coverage — Coding + image generation + video generation + chat, all in one place

Go to the Pricing page to view plan details and subscribe.

Subscription plan comparison

Detailed Guide

For complete instructions, see the Subscription Plans Guide.

Plan Comparison ​

DimensionPay As You Go订阅计划 (Subscription)
Best forProduction, commercial productsPersonal development, learning
BillingUsage-based, per-tokenFixed monthly fee
Rate LimitUnlimited10–15 RPM
ConcurrencyUnlimitedWeekly Limit applies
RestrictionsNoneNot allowed for production use

Important

If your project is already live or heading toward commercialization, you must use the Pay As You Go plan. The subscription plan is strictly for personal development and learning — production use is prohibited.

How to Obtain Model Slugs

Each model on the 开桥 platform has a unique slug. You can find model slugs on the Models page: model-slug Or on a model's detail page: model-slug

Supported API Protocols ​

开桥 supports four major API protocols, letting you use your preferred SDK to call any model on the platform:

ProtocolBase URLCompatible SDKDescription
OpenAI Chat Completionshttps://openqiao.com/api/v1OpenAI SDKThe most widely used Chat API
OpenAI Responseshttps://openqiao.com/api/v1OpenAI SDKOpenAI's next-gen Responses API
Anthropic Messageshttps://openqiao.com/api/anthropicAnthropic SDKNative protocol for the Claude family
Google Geminihttps://openqiao.com/api/vertex-aiGoogle GenAI SDKNative protocol for the Gemini family

Cross-Protocol Calling

One of 开桥's core strengths is protocol agnosticism — you can call any model through any supported protocol. For example, use the OpenAI SDK to call Claude models, or the Anthropic SDK to call Gemini models.

Protocol 1: OpenAI Chat Completions ​

Compatibility

开桥's API endpoint is fully compatible with the OpenAI Chat Completions API. Just change base_url and api_key to switch seamlessly.

python
from openai import OpenAI

# 1. Initialize the OpenAI client
client = OpenAI(
    # 2. Point the base URL to the 开桥 endpoint
    base_url="https://openqiao.com/api/v1", 
    # 3. Replace with the API key from your 开桥 console
    api_key="<your OPENQIAO_API_KEY>", 
)

# 4. Create a Chat Completion request
completion = client.chat.completions.create(
    # 5. Specify the model in "provider/model-name" format
    model="google/gemini-3.1-pro-preview", 
    messages=[
        {
            "role": "user",
            "content": "What is the meaning of life?"
        }
    ]
)

print(completion.choices[0].message.content)
ts
import OpenAI from "openai";

// 1. Initialize the OpenAI client
const openai = new OpenAI({
  // 2. Point the base URL to the 开桥 endpoint
  baseURL: "https://openqiao.com/api/v1", 
  // 3. Replace with the API key from your 开桥 console
  apiKey: "<your OPENQIAO_API_KEY>", 
});

async function main() {
  // 4. Create a Chat Completion request
  const completion = await openai.chat.completions.create({
    // 5. Specify the model in "provider/model-name" format
    model: "google/gemini-3.1-pro-preview", 
    messages: [
      {
        role: "user",
        content: "What is the meaning of life?",
      },
    ],
  });

  console.log(completion.choices[0].message.content);
}

main();
bash
curl https://openqiao.com/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENQIAO_API_KEY" \
  -d '{
    "model": "google/gemini-3.1-pro-preview",
    "messages": [
      {
        "role": "user",
        "content": "What is the meaning of life?"
      }
    ]
  }'

Protocol 2: OpenAI Responses ​

Compatibility

开桥 is also compatible with OpenAI's next-gen Responses API. The base URL is the same as Chat Completions, with a more streamlined calling convention.

python
from openai import OpenAI

client = OpenAI(
    base_url="https://openqiao.com/api/v1", 
    api_key="<your OPENQIAO_API_KEY>", 
)

# Create a request using the Responses API
response = client.responses.create(
    model="google/gemini-3.1-pro-preview", 
    input="What is the meaning of life?"
)

print(response.output_text)
ts
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://openqiao.com/api/v1", 
  apiKey: "<your OPENQIAO_API_KEY>", 
});

async function main() {
  const response = await openai.responses.create({
    model: "google/gemini-3.1-pro-preview", 
    input: "What is the meaning of life?", 
  });

  console.log(response.output_text);
}

main();
bash
curl https://openqiao.com/api/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENQIAO_API_KEY" \
  -d '{
    "model": "google/gemini-3.1-pro-preview",
    "input": "What is the meaning of life?"
  }'

Protocol 3: Anthropic Messages ​

Compatibility

开桥 fully supports the Anthropic Messages protocol and integrates seamlessly with tools like Claude Code and Cursor.

Note that the Anthropic protocol uses base_url https://openqiao.com/api/anthropic, which differs from the OpenAI protocol.

Anthropic Protocol Model Support

Models compatible with the Anthropic protocol are being adapted in batches. You can view currently supported models by filtering for Anthropic API Compatible on the official model list: anthropic-support You can also check on a model's detail page: anthropic-support

python
from anthropic import Anthropic

# 1. Initialize the Anthropic client
client = Anthropic(
    # 2. Point the base URL to the 开桥 endpoint
    base_url="https://openqiao.com/api/anthropic", 
    # 3. Replace with the API key from your 开桥 console
    api_key="<your OPENQIAO_API_KEY>", 
)

# 4. Create a Messages request
message = client.messages.create(
    model="google/gemini-3.1-pro-preview", 
    max_tokens=1024,
    messages=[
        {
            "role": "user",
            "content": "What is the meaning of life?"
        }
    ]
)

print(message.content[0].text)
ts
import Anthropic from "@anthropic-ai/sdk";

// 1. Initialize the Anthropic client
const client = new Anthropic({
  // 2. Point the base URL to the 开桥 endpoint
  baseURL: "https://openqiao.com/api/anthropic", 
  // 3. Replace with the API key from your 开桥 console
  apiKey: "<your OPENQIAO_API_KEY>", 
});

async function main() {
  // 4. Create a Messages request
  const message = await client.messages.create({
    model: "google/gemini-3.1-pro-preview", 
    max_tokens: 1024,
    messages: [
      {
        role: "user",
        content: "What is the meaning of life?",
      },
    ],
  });

  console.log(message.content[0].text);
}

main();
bash
curl https://openqiao.com/api/anthropic/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $OPENQIAO_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "google/gemini-3.1-pro-preview",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "What is the meaning of life?"
      }
    ]
  }'

Protocol 4: Google Gemini ​

Compatibility

开桥 supports the Google Gemini (Vertex AI) protocol, allowing you to call models directly with the Google GenAI SDK.

The base URL is https://openqiao.com/api/vertex-ai. You need to set vertexai=True and configure custom http_options.

python
from google import genai
from google.genai import types

# 1. Initialize the Google GenAI client
client = genai.Client(
    # 2. Replace with the API key from your 开桥 console
    api_key="<your OPENQIAO_API_KEY>", 
    vertexai=True, 
    # 3. Point the base URL to the 开桥 endpoint
    http_options=types.HttpOptions(
        api_version='v1',
        base_url='https://openqiao.com/api/vertex-ai'
    )
)

# 4. Create a generateContent request
response = client.models.generate_content(
    model="google/gemini-3.1-pro-preview", 
    contents="What is the meaning of life?"
)

print(response.text)
ts
import { GoogleGenAI } from "@google/genai";

// 1. Initialize the Google GenAI client
const ai = new GoogleGenAI({
  // 2. Replace with the API key from your 开桥 console
  apiKey: "<your OPENQIAO_API_KEY>", 
  vertexai: true, 
  // 3. Point the base URL to the 开桥 endpoint
  httpOptions: {
    apiVersion: "v1",
    baseUrl: "https://openqiao.com/api/vertex-ai", 
  },
});

async function main() {
  // 4. Create a generateContent request
  const response = await ai.models.generateContent({
    model: "google/gemini-3.1-pro-preview", 
    contents: "What is the meaning of life?",
  });

  console.log(response.text);
}

main();

Platform API ​

开桥 provides a set of Platform Management APIs that let you programmatically query account usage, balance, subscription status, and more — making it easy to integrate with your monitoring and management systems.

Management API Key

Platform APIs require a Management API Key for authentication (some endpoints also accept a regular API key). Go to 开桥 Console > Management to create a Management API Key.

Query Generation Details ​

Retrieve detailed information about a specific API call, including token usage, latency, and billing breakdown.

http
GET https://openqiao.com/api/v1/management/generation?id=<generation_id>

Each API call returns a generation_id. Use that ID to query the full details of the call:

bash
curl https://openqiao.com/api/v1/management/generation?id=gen_01abc123def456 \
  -H "Authorization: Bearer $OPENQIAO_API_KEY"

Example response (partial):

json
{
  "api": "chat.completions",
  "generationId": "gen_01abc123def456",
  "model": "openai/gpt-4o",
  "generationTime": 3200,
  "latency": 500,
  "nativeTokens": {
    "completion_tokens": 128,
    "prompt_tokens": 32,
    "total_tokens": 160
  },
  "usage": 0.0052
}

Billing Data Delay

Billing information (such as usage and ratingResponses) becomes available 3–5 minutes after the request completes. Token usage metrics are returned synchronously with the request.

Full Documentation

For detailed parameter descriptions, see the Get Generation API docs.

Query PAYG Balance ​

Retrieve the current Pay As You Go balance for your account.

http
GET https://openqiao.com/api/v1/management/payg/balance
bash
curl https://openqiao.com/api/v1/management/payg/balance \
  -H "Authorization: Bearer $OPENQIAO_MANAGEMENT_API_KEY"

Example response:

json
{
  "success": true,
  "data": {
    "currency": "usd",
    "total_credits": 482.74,
    "top_up_credits": 35.0,
    "bonus_credits": 447.74
  }
}

Full Documentation

For detailed parameter descriptions, see the 查询余额 API docs.

Query Subscription Details ​

Retrieve your account's subscription information, including plan tier, Flow rate, and quota usage.

http
GET https://openqiao.com/api/v1/management/subscription/detail
bash
curl https://openqiao.com/api/v1/management/subscription/detail \
  -H "Authorization: Bearer $OPENQIAO_MANAGEMENT_API_KEY"

Example response (partial):

json
{
  "success": true,
  "data": {
    "plan": {
      "tier": "ultra",
      "amount_usd": 200,
      "interval": "month"
    },
    "account_status": "healthy",
    "quota_5_hour": {
      "max_flows": 800,
      "used_flows": 57.2,
      "remaining_flows": 742.8,
      "usage_percentage": 0.0715,
      "remaining_resets": 1
    },
    "quota_7_day": {
      "max_flows": 6182,
      "used_flows": 416.11,
      "remaining_flows": 5765.89
    }
  }
}

Full Documentation

For detailed parameter descriptions, see the 查询订阅详情 API docs.

Query Flow Rate ​

Retrieve the current Flow rate information for your account.

http
GET https://openqiao.com/api/v1/management/flow_rate
bash
curl https://openqiao.com/api/v1/management/flow_rate \
  -H "Authorization: Bearer $OPENQIAO_MANAGEMENT_API_KEY"

Example response:

json
{
  "success": true,
  "data": {
    "currency": "usd",
    "base_usd_per_flow": 0.03283,
    "effective_usd_per_flow": 0.03283
  }
}

Full Documentation

For detailed parameter descriptions, see the 查询 Flow 汇率 API docs.

Advanced Usage ​

For more details on advanced usage, refer to the Advanced Usage section.

Email

Technical support: support@openqiao.com

Business cooperation: bd@openqiao.com

X / Twitter
Discord