STSuperTomorrow

Docs

SuperTomorrow API 文档

使用一个 OpenAI-compatible API 访问已开通模型。本文档按接入流程顺序组织:创建 Key、发送请求、查看计费、处理错误,并接入常用 SDK 与 IDE 工具。

用户控制台当前可通过 /dashboard/ 使用。后续将逐步启用 https://console.supertomorrow.cc;API Base URL 保持 https://api.supertomorrow.cc/v1 不变。

Quick Start

首次调用 API

1. 创建 API Key

登录 Dashboard,在 API Key 页面创建调用凭证。完整 Key 仅在创建或重新生成时显示一次,可立即复制。

2. 绑定模型

创建 Key 时可以单选或多选模型。Key 只能调用自己绑定的模型。

3. 发起请求

使用 Base URL、Bearer Key 和模型别名发起 OpenAI-compatible 请求。

curl https://api.supertomorrow.cc/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [{"role": "user", "content": "Hello"}],
    "max_tokens": 160
  }'

Integrations

客户端 / IDE 集成

Billing

余额与计费

Credits平台使用 Credits 作为调用消耗单位。默认口径为 1 USD = 100 Credits。
扣费方式请求成功后按实际输入 tokens 和输出 tokens 扣减 Credits。失败请求不扣费。
价格来源模型价格来自后台模型商品目录,管理员可按渠道成本和运营策略调整。
余额不足余额不足时 API 返回 402 insufficient_credits,不会继续请求上游模型。

API Reference

API Reference

Base URL

https://api.supertomorrow.cc/v1

POST /v1/chat/completions

发送聊天补全请求,兼容 OpenAI Chat Completions 格式。

GET /v1/models

返回当前 API Key 可调用的模型列表。

Endpoint

Chat Completions

POST /v1/chat/completions
model必填。模型别名,例如 deepseek-chat。
messages必填。OpenAI-compatible messages 数组。
max_tokens可选。限制最大输出 tokens。
stream可选。true 时返回流式响应。

Endpoint

Models

GET /v1/models

该接口返回当前 API Key 已绑定且可调用的模型。未绑定、未上架或不可用的模型不会出现在结果中。

curl https://api.supertomorrow.cc/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

Limits

限流

平台会按 API Key、用户账户和 provider 通道执行限流。触发限流时返回 429,调用方应使用指数退避重试。

Errors

错误码

401API Key 无效、已禁用或格式不正确。
402余额不足,充值后可继续调用。
403当前 Key 未绑定该模型,或模型未开通、已过期、已下架。
429触发限流。建议按响应信息退避重试。
502上游 provider 不可用或所有 fallback 通道失败。失败请求不扣费。

SDK

OpenAI SDK

现有 OpenAI SDK 项目通常只需要替换 api_key、base_url 和模型别名即可接入。

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.supertomorrow.cc/v1",
)

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=160,
)

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

IDE

Cursor

在 Cursor 中选择 OpenAI-compatible 或自定义模型提供方,Base URL 填写 https://api.supertomorrow.cc/v1,并使用 Dashboard 创建的 API Key。

IDE

Cline

在 Cline 的 API Provider 中选择 OpenAI Compatible,填写 Base URL、API Key 和已绑定模型别名。