MAI-Transcribe 2.5 API

Speech-to-text (MAI-Transcribe 2.5): 60 languages with automatic language detection, word/segment timestamps and speaker diarization. Billed by audio duration: 1 minute = 1000 tokens. Sync POST /v1/audio/transcriptions.

Dùng thử trực tuyến · Lấy API key · Đọc tài liệu

Khả năng

Mô hình
Âm thanh
Mô hình API
mai-transcribe-2.5
Điểm cuối
POST /v1/audio/transcriptions
Tham số
model, file

Giá hiện tại

Giá thay đổi theo tham số yêu cầu.

Ví dụ trong thư viện

Chưa có ví dụ được xuất bản cho mô hình này.

Khám phá thư viện prompt

Bắt đầu nhanh

cURL

curl --fail-with-body https://www.zzai.app/v1/audio/transcriptions \
  -H "Authorization: Bearer $SEEDANCE_API_KEY" \
  -F "model=mai-transcribe-2.5" \
  -F "[email protected]"

Python

import os
import requests

with open("audio.mp3", "rb") as audio:
    response = requests.post(
        "https://www.zzai.app/v1/audio/transcriptions",
        headers={"Authorization": "Bearer " + os.environ["SEEDANCE_API_KEY"]},
        data={"model": "mai-transcribe-2.5"},
        files={"file": ("audio.mp3", audio, "audio/mpeg")},
        timeout=120,
    )
response.raise_for_status()
print(response.json()["text"])

JavaScript

import { readFile } from 'node:fs/promises';

const form = new FormData();
form.set('model', 'mai-transcribe-2.5');
form.set('file', new Blob([await readFile('audio.mp3')], { type: 'audio/mpeg' }), 'audio.mp3');
const response = await fetch('https://www.zzai.app/v1/audio/transcriptions', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + process.env.SEEDANCE_API_KEY },
  body: form,
});
if (!response.ok) throw new Error(await response.text());
console.log((await response.json()).text);

Câu hỏi thường gặp

Gọi mô hình này như thế nào?

Tạo API key, dùng tên mô hình bên dưới và gửi yêu cầu tới endpoint tương thích OpenAI trong tài liệu.