概览
音频和视频
支持网站当前全部转录格式。
异步任务
创建任务后通过 ID 查询进度与结果。
US$0.04 / hour
按向上取整后的分钟扣积分。
身份验证
所有请求都需要在 Authorization 请求头中使用 Bearer API Key。密钥只在生成时完整显示一次。
HTTP header
Authorization: Bearer sz_live_your_api_key快速开始:提交远程文件
文件地址必须可由服务器通过 HTTPS 直接下载,不能要求登录或 Cookie。
cURL
curl -X POST https://scribezip.com/api/v1/transcriptions \
-H "Authorization: Bearer $SCRIBEZIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/meeting.mp3",
"language": "auto",
"accuracy_mode": "balanced"
}'分片上传本地文件
- 提交文件名、字节大小和 MIME 类型,创建上传会话。
- 按返回的 part_size 顺序上传全部分片。
- 调用 complete_url 开始处理。
Node.js 22+
import { open, stat } from "node:fs/promises";
const apiKey = process.env.SCRIBEZIP_API_KEY;
const path = "./meeting.mp3";
const file = await stat(path);
const created = await fetch("https://scribezip.com/api/v1/transcriptions", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
file_name: "meeting.mp3",
file_size: file.size,
mime_type: "audio/mpeg",
language: "auto",
}),
}).then((response) => response.json());
const handle = await open(path, "r");
const { part_size, part_count, part_url, complete_url } = created.upload;
for (let part = 1; part <= part_count; part += 1) {
const length = Math.min(part_size, file.size - (part - 1) * part_size);
const buffer = Buffer.alloc(length);
await handle.read(buffer, 0, length, (part - 1) * part_size);
await fetch(`${part_url}?part_number=${part}`, {
method: "PUT",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Length": String(length),
},
body: buffer,
});
}
await handle.close();
const job = await fetch(complete_url, {
method: "POST",
headers: { Authorization: `Bearer ${apiKey}` },
}).then((response) => response.json());
console.log(job.data.id);查询任务与结果
每 3–5 秒查询一次即可。状态可能为 accepted、uploading、preprocessing、processing、completed、failed 或 deleted。
cURL
curl https://scribezip.com/api/v1/transcriptions/REQUEST_ID \
-H "Authorization: Bearer $SCRIBEZIP_API_KEY"200 response
{
"data": {
"id": "request_id",
"status": "completed",
"progress": 100,
"file_name": "meeting.mp3",
"source_kind": "audio",
"duration_seconds": 330,
"billed_minutes": 6,
"credits_charged": 6,
"transcript": {
"text": "Welcome to the meeting…",
"segments": [
{ "start": 0, "end": 2.4, "text": "Welcome to the meeting…" }
]
},
"error": null
},
"meta": { "balance_credits": 14994 }
}DELETE /api/v1/transcriptions/REQUEST_ID 可删除结果和仍保留的媒体。
计费规则
| 价格 | US$0.04 / 转录小时 |
|---|---|
| 积分单位 | 1 积分 = 1 个计费分钟 |
| 取整 | 不足 1 分钟按 1 分钟;5:30 按 6 分钟 |
| 充值 | US$10 / $20 / $50 / $100 |
| 失败任务 | 预扣积分自动退回 |
数据保存
API 使用历史只保存 30 天。
上传的视频源文件处理后删除,不保存。
上传的音频源文件最多保存 60 天,除非用户提前删除。
API Key 只保存不可逆哈希,完整密钥无法再次查看。
常见错误码
| HTTP | Code | 说明 |
|---|---|---|
401 | invalid_api_key | 密钥无效或已撤销 |
402 | insufficient_credits | API 积分不足 |
409 | job_in_progress | 账户已有任务处理中 |
413 | file_too_large | 文件超过允许大小 |
415 | unsupported_file | 文件格式不支持 |
429 | rate_limited | 请求过于频繁 |