> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qingbo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 清波 API

> 统一 AI 模型 API 网关 — 一个接口调用所有主流大模型

OpenAI 兼容的统一 API 端点，一行代码调用 GPT-4o、Claude、Gemini、Sora、VEO 等主流模型。只需更换 `base_url`，无需改动现有代码。

<CodeGroup>
  ```python Python theme={"system"}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://www.qingbo.dev/v1",
      api_key="your-api-key"
  )

  response = client.chat.completions.create(
      model="gpt-4o",
      messages=[{"role": "user", "content": "Hello!"}]
  )

  print(response.choices[0].message.content)
  ```

  ```javascript JavaScript theme={"system"}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://www.qingbo.dev/v1',
    apiKey: 'your-api-key'
  });

  const response = await client.chat.completions.create({
    model: 'gpt-4o',
    messages: [{ role: 'user', content: 'Hello!' }]
  });

  console.log(response.choices[0].message.content);
  ```

  ```bash cURL theme={"system"}
  curl https://www.qingbo.dev/v1/chat/completions \
    -H "Authorization: Bearer your-api-key" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4o",
      "messages": [{"role": "user", "content": "Hello!"}]
    }'
  ```
</CodeGroup>

## AI 模型能力

通过 清波 API 调用各类 AI 模型。

<CardGroup cols={3}>
  <Card title="文本生成" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/text-generation.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=f9461e89662fd78a1ca55fc39f6fe65e" href="/cn/api-reference/text/general-chat" width="800" height="400" data-path="images/cards/text-generation.svg">
    GPT-4o、Claude Sonnet、Gemini 等主流大语言模型，支持流式输出
  </Card>

  <Card title="图像生成" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/image-generation.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=7c6a64ae1ece95be68160952dfb6d4c4" href="/cn/api-reference/image/gpt4o-image" width="800" height="400" data-path="images/cards/image-generation.svg">
    GPT-4o Image、FLUX Kontext、Seedream 等图像生成模型
  </Card>

  <Card title="视频生成" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/video-generation.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=015c09aca055264799341463719be8f8" href="/cn/api-reference/video/veo3" width="800" height="400" data-path="images/cards/video-generation.svg">
    VEO3、Sora2、Kling、海螺等视频生成模型
  </Card>
</CardGroup>

<CardGroup cols={3}>
  <Card title="音频处理" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/audio.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=0949bbc2f3af67e009eca90df128b71c" href="/cn/api-reference/audio/tts" width="800" height="400" data-path="images/cards/audio.svg">
    Whisper 语音识别和 TTS 文字转语音
  </Card>

  <Card title="任务管理" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/task-management.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=58a7de7744a533fc7a98ae911a14eb6c" href="/cn/api-reference/task/get-status" width="800" height="400" data-path="images/cards/task-management.svg">
    异步任务状态查询，跟踪图像和视频生成进度
  </Card>

  <Card title="OpenAI 兼容" img="https://mintcdn.com/qwave/3W5hakP5hW7zEoGD/images/cards/openai-compatible.svg?fit=max&auto=format&n=3W5hakP5hW7zEoGD&q=85&s=886c9cfaee009cdd48fb20ccfeffdbe3" href="/cn/guides/quickstart" width="800" height="400" data-path="images/cards/openai-compatible.svg">
    完全兼容 OpenAI SDK，换个 URL 即可接入
  </Card>
</CardGroup>

## 为什么选择 清波 API

<CardGroup cols={2}>
  <Card title="零成本迁移" icon="rotate">
    兼容 OpenAI API 格式，已有代码只需修改 base\_url 即可使用
  </Card>

  <Card title="多模型聚合" icon="layer-group">
    一个 API Key 访问所有主流大模型，通过 model 参数灵活切换
  </Card>

  <Card title="异步任务体系" icon="clock-rotate-left">
    图像和视频生成支持异步处理，实时查询任务状态和进度
  </Card>

  <Card title="稳定可靠" icon="shield-check">
    高性能 API 网关，智能路由，保障服务稳定性
  </Card>
</CardGroup>

## 快速开始

<Steps>
  <Step title="获取 API Key">
    前往 [Dashboard](https://qingbo.dev/dashboard/keys) 注册并获取你的 API Key
  </Step>

  <Step title="替换 Base URL">
    将 OpenAI SDK 的 base URL 替换为 `https://www.qingbo.dev/v1`
  </Step>

  <Step title="选择模型并调用">
    通过 `model` 参数指定想要使用的模型，发送请求即可
  </Step>
</Steps>
