Skip to main content

Prerequisites

  • A WaveAPI account (Sign up)
  • An API key
  • Basic programming knowledge

Obtain an API Key

1

Log in to the Console

Visit the Dashboard and log in
2

Create a Key

Click “Create New Key” on the key management page
3

Save Your Key

Copy and securely store your API key — it is only displayed once
Do not expose your API key in front-end code or public repositories.

Send Your First Request

WaveAPI is fully compatible with the OpenAI SDK — simply replace the base_url to get started.
from openai import OpenAI

client = OpenAI(
    base_url="https://qingbo.dev/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "user", "content": "你好,介绍一下你自己"}
    ]
)

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

Understanding the Response

{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1677652288,
  "model": "gpt-4o",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "你好!我是一个 AI 助手..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 12,
    "total_tokens": 21
  }
}

Next Steps

Authentication & Keys

Learn about authentication methods and key management

Sync & Async

Understand different endpoint calling patterns

Text Generation API

Complete chat API parameters and options

Task System

Async generation workflow for images and videos