云知声 Token Hub 模型页横幅仍写着:U2 Flash 全新上线,限时免费无限量调用,窗口是 2026.09.30–2026.10.31。活动期内输入、缓存命中、输出都标 0 元 / 百万 tokens,并写活动期间新老用户均免费调用。

主源是 U2 Flash 模型页 和 速率限制。OpenAI 兼容地址用的是 https://maas-api.unisound.com/v1。条款按 2026 年 10 月 26 日早上对着模型页和速率限制页核,接口侧对过 POST /v1/chat/completions。

免费口径和限速

模型页价格区把 U2 Flash 标成限时免费,输入、缓存命中、输出原价分别是 1 元、0.2 元、2 元 / 百万 tokens,活动期三项都写成 0 元。说明里还写:限时免费活动期间(2026.09.30-2026.10.31),输入、缓存命中和输出均不消耗 Token Plan 套餐 Credits。模型页规格表写上下文窗口 1M,最大输出 128K。

速率限制文档的表里,u2-flash 一列是 RPM / TPM,限制数量是 20 / 5,000,000。同页把 RPM 解释为每分钟发送的请求数限制,TPM 为每分钟处理的 token 数限制。页面横幅写「无限量调用」,指的是价格为 0,不是取消这两条限速。

快速开始写:手机验证码登录,首次登录自动注册;完成实名认证后可拿认证礼包,其中文本模型一栏含 U2 Flash:500 万 tokens。API Key 在控制台创建。这次没有完成实名,也没有可用的云知声 API 令牌。

用 Spring Boot 接 OpenAI 兼容接口

Spring Boot 4.1.1、Spring AI 2.0.1、JDK 21,依赖用 spring-boot-starter-web 和 spring-ai-starter-model-openai。模型钉成页面上的 u2-flash:

spring.ai.openai.api-key=${UNISOUND_API_KEY:placeholder}
spring.ai.openai.base-url=https://maas-api.unisound.com/v1
spring.ai.openai.chat.model=u2-flash
server.port=8080
@RestController
public class ChatController {

    private final ChatClient chatClient;

    public ChatController(ChatClient.Builder builder) {
        this.chatClient = builder.build();
    }

    @GetMapping("/chat")
    public ResponseEntity<?> chat(
            @RequestParam(defaultValue = "用一句话介绍你自己") String q) {
        try {
            return ResponseEntity.ok(chatClient.prompt().user(q).call().content());
        } catch (HttpStatusCodeException e) {
            return ResponseEntity.status(e.getStatusCode()).body(e.getResponseBodyAsString());
        } catch (Exception e) {
            Throwable c = e;
            while (c.getCause() != null && c.getCause() != c) {
                c = c.getCause();
            }
            if (c instanceof HttpStatusCodeException he) {
                return ResponseEntity.status(he.getStatusCode()).body(he.getResponseBodyAsString());
            }
            String msg = c.getMessage() == null ? e.toString() : c.getMessage();
            HttpStatus status = msg.contains("401") ? HttpStatus.UNAUTHORIZED : HttpStatus.INTERNAL_SERVER_ERROR;
            return ResponseEntity.status(status).body(msg);
        }
    }
}

Maven 打包日志里有 BUILD SUCCESS,结束时间是 2026-10-26T08:15:24+08:00。随后启动到 8080:

2026-10-26T08:15:27.916+08:00  INFO ... o.s.boot.tomcat.TomcatWebServer          : Tomcat started on port 8080 (http) with context path '/'
2026-10-26T08:15:27.924+08:00  INFO ... c.example.unisound.UnisoundApplication   : Started UnisoundApplication in 2.046 seconds (process running for 2.455)

这次没有可用的云知声 API 令牌,请求是真发到 maas-api.unisound.com 的,但没有拿到模型正文。直接 curl 不带 Authorization:

{"error":{"code":"invalid_api_key","param":null,"message":"auth error: header param Authorization required","type":"authentication_error"}}
HTTP 401

带 Authorization: Bearer sk-unisound-fake-test-key-12345:

{"error":{"code":"invalid_api_key","param":null,"message":"auth error: header param Authorization api_key invalid","type":"authentication_error"}}
HTTP 401

同一假令牌跑本地 /chat,Spring AI 透出来的是:

401: auth error: header param Authorization api_key invalid
HTTP 401
— 感谢阅读 —
广告

一起交流

分享你的思考,让讨论更进一步。