BazaarLinkBazaarLink
ログイン
ドキュメントAPIリファレンスSDKリファレンスエージェント利用AIスキル
音声合成

音声文字起こし

multipart/form-data の model と file、または JSON の model と input_audio:{data,format}(生の base64)を送信します。形式: wav, mp3, mp4, m4a, ogg, flac, webm, aac。音声は最大 25 MiB、本文は base64 のため 50 MiB。audio.transcription_max_seconds_by_model でモデル別の上限を設定し、未設定なら audio.transcription_max_seconds、次に既定の 60 秒を使います。超過した音声は処理前に 413 audio_too_long で拒否され、課金されません。response_format は json、verbose_json のみ。timestamp_granularities の word、segment は verbose_json が必要です。stream は未対応(400 unsupported_parameter)、サイズ超過は 413 audio_too_large。provider は無視されます。データベース料金で usage.seconds または入出力 token に課金し、分単価は秒単価の 60 倍。usage.cost は USD の請求額です。

POST/v1/audio/transcriptions

認証

Authorization必須
string · header

Authorization ヘッダーに Bearer トークンとして API キーを渡します。

Body

model必須
string

文字起こしモデル ID。例: elevenlabs/scribe-v2。

GET /v1/models?output_modalities=transcription
file
file

音声ファイル(multipart)。wav、mp3、mp4、m4a、ogg、flac、webm、aac に対応し、最大 25 MiB。JSON では input_audio: {data: base64, format} を送れます。

multipart/form-data: required; decoded <= 25 MiB
input_audio
object

JSON で file の代わりに送る音声です。data は生の base64 音声、format は wav や mp3 などです。本文は最大 50 MiB、デコード後は最大 25 MiB。

application/json: required; data: raw base64; format: wav | mp3 | mp4 | m4a | ogg | flac | webm | aac
response_format
string

json(既定)は {text}、verbose_json は言語、長さ、segments/words も返します。

default: json
jsonverbose_json
timestamp_granularities
string[]

word または segment、あるいは両方。response_format=verbose_json の場合のみ適用されます。 単語単位のタイムスタンプは現在返されません(segments は返されます)。

response_format=verbose_json; multipart: timestamp_granularities[]
wordsegment
language
string

en や zh などの任意の言語ヒント。省略すると自動判定します。

ISO-639-1
prompt
string

名前や用語の認識を助ける任意の文脈テキスト。モデルによっては適用されません。

temperature
number

任意のサンプリング温度。モデルによっては適用されません。

0 <= temperature <= 1
stream
boolean

ストリーミングは未対応です。stream=true は 400 unsupported_parameter を返します。

Unsupported: 400 unsupported_parameter
provider
object

任意のルーティングフィールドです。無視されます。

Ignored

詳細ガイド →

POST /v1/audio/transcriptions
curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -F model="<transcription-model-id>" \
  -F file=@audio.wav \
  -F response_format=json

curl https://api.bazaarlink.ai/v1/audio/transcriptions \
  -H "$BAZAARLINK_AUTH_HEADER" \
  -H "Content-Type: application/json" \
  -d '{"model":"<transcription-model-id>","input_audio":{"data":"<raw-base64-audio>","format":"wav"},"response_format":"verbose_json","timestamp_granularities":["word","segment"]}'
レスポンス例

音声文字起こし: json / verbose_json — 課金例は説明用で、モデル料金ではありません。 audio.transcription_max_seconds_by_model でモデル別の上限を設定し、未設定なら audio.transcription_max_seconds、次に既定の 60 秒を使います。超過した音声は処理前に 413 audio_too_long で拒否され、課金されません。

{"text":"Hello","usage":{"seconds":1,"cost":0.00001}}
verbose_json
{"text":"Hello","duration":1,"segments":[{"id":0,"start":0,"end":1,"text":"Hello"}],"words":[{"word":"Hello","start":0,"end":1}],"usage":{"seconds":1,"cost":0.00001}}
サポート
サポート
こんにちは。どのようなご用件でしょうか?
メッセージをお送りください。担当者より返信します。
音声文字起こし — BazaarLink API