beatraドキュメント

音声をテキストに文字起こしする

Creates an asynchronous speech-to-text transcription task (0.5 seconds to 60 minutes, up to 100 MiB). With `model="auto"`, standard transcription routes to `doubao-seed-asr-2.0` while requests setting `tag_audio_events=true` or `num_speakers` automatically route to `elevenlabs-scribe-v3` when available. Charged per started input audio minute. When the task succeeds, `output` contains `{type: "speech_to_text", model, text, language, duration_seconds, segments, audio_events, subtitles}`.

以下のエンドポイント仕様(パラメーター、リクエスト、レスポンス)は英語の原文です。フィールド名は API と同じです。

POST
/v1/audio/transcriptions

Request Body

application/jsonRequired
metadataMetadata

Caller-supplied metadata; ≤16 keys, key ≤64 chars, value ≤512 chars

callback_urlCallback Url

HTTPS URL Beatra will POST the final Task envelope to when the Task reaches a terminal state

callback_signing_key_idCallback Signing Key Id

Optional standalone callback signing key. Omit for unsigned callback delivery; requires callback_url when provided.

audio
Required
Audio

Source audio file (artifact_id or HTTPS url; 0.5-3600.0 seconds, <= 100 MiB). Accepts audio or source.

modelModel

Speech-to-text model identifier, or 'auto' for automatic selection (defaults to doubao-seed-asr-2.0, or upgrades to elevenlabs-scribe-v3 when tag_audio_events=true or num_speakers is passed).

Default: "auto"Value in: "auto" | "doubao-seed-asr-2.0" | "elevenlabs-scribe-v3"
languageLanguage

Language hint (auto or BCP-47 tag such as zh, en, ja-JP).

Default: "auto"
diarizeDiarize

Annotate speaker turns in transcript segments when true.

Default: false
num_speakersNum Speakers

Optional expected speaker count hint (1-32).

tag_audio_eventsTag Audio Events

Detect non-speech audio events such as laughter, applause, or music.

Default: false
subtitlesSubtitles

Emit timed subtitle artifacts (json, srt, vtt) alongside the transcript.

Default: true
model_optionsModel Options

Optional model-family-specific options (for example, {"elevenlabs": {...}} or {"doubao": {...}}). Unrecognized or surcharged keys emit an option_ignored warning.

Header Parameters

X-Request-Idstring

Optional client request id echoed in the response.

Idempotency-Key
Required
Idempotency-Key
Minimum length: 1Maximum length: 128
Authorization
Required
string

Bearer API key.

curl -X POST "https://api.beatra.ai/v1/audio/transcriptions" \
  -H "X-Request-Id: string" \
  -H "Idempotency-Key: string" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "callback_url": "string",
    "callback_signing_key_id": "string",
    "audio": {
      "type": "url",
      "url": "string"
    },
    "model": "auto",
    "language": "auto",
    "diarize": false,
    "num_speakers": 1,
    "tag_audio_events": false,
    "subtitles": true,
    "model_options": {}
  }'

Task accepted

{
  "object": "task",
  "task_id": "string",
  "status": "queued",
  "capability": "string",
  "workload_type": "model",
  "model": "string",
  "resolved_model": "string",
  "model_selection_reason": null,
  "social": {
    "platform": "string",
    "operation_key": "string",
    "operation_name": "string",
    "schema_hash": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "input": {},
  "progress": {
    "percent": 100,
    "stage": "string",
    "message": "string"
  },
  "output": {},
  "warnings": [
    {
      "code": "string",
      "message": "string",
      "field": "string"
    }
  ],
  "error": {
    "code": "string",
    "type": "string",
    "message": "string",
    "retryable": true,
    "param": "string",
    "details": {},
    "request_id": "string"
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "cache_read_tokens": 0,
    "cache_creation_tokens": 0,
    "reasoning_tokens": 0,
    "image_count": 0,
    "image_pixels": 0,
    "video_seconds": 0,
    "input_video_seconds": 0,
    "output_video_seconds": 0,
    "audio_seconds": 0,
    "characters": 0,
    "lines": [
      {
        "meter": "string",
        "quantity": "string",
        "unit": "string",
        "billed_amount_credits": "string"
      }
    ],
    "credits": "string"
  },
  "billing": {
    "charged_credits": "string",
    "refunded_credits": "string",
    "granted_credits": "string",
    "grant_source": "string",
    "net_charged_credits": "string"
  },
  "callback": {
    "url": "string",
    "status": "pending",
    "attempt_count": 0,
    "delivered_at": "2019-08-24T14:15:22Z",
    "last_error": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "deadline_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z",
  "cancel_requested_at": "2019-08-24T14:15:22Z",
  "links": {
    "self": "string",
    "cancel": "string",
    "assets": "string"
  }
}

最終更新