POST/v1/audio/transcriptions

Transcribe audio

Speech to text. Send a multipart file (up to 25 MiB and 4 hours). JSON also works: {"model", "input_audio": {"data": "<base64>", "format": "wav"}}. response_format: text returns plain text; json and verbose_json return the provider's JSON, including its usage.

Refused: stream, srt and vtt formats, and diarization fields.

認証: AuthorizationヘッダーにBearer形式のAPIキー

リクエストボディ

  • modelstring必須

    A speech-to-text model slug.

  • filestring必須

    The audio: flac, m4a, mp3, mp4, mpeg, ogg, opus, wav or webm.

  • languagestring

    ISO language hint, for example en.

  • promptstring

    Vocabulary or context hint.

  • response_formatenum
    "json""verbose_json""text"
    デフォルト: "json"
  • temperaturenumber
  • timestamp_granularities[]array<enum>

    Requires verbose_json.

レスポンス

  • 200

    The transcript.

    レスポンス
    • textstring
    • usageobject

      The provider's usage: {type: duration, seconds} or token counts.

  • 400

    Invalid request. param names the field; code says why (invalid_parameter, unsupported_parameter, unsupported_capability, refusal, previous_response_not_found). Not charged.

    レスポンス
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 401

    The key is missing, malformed, expired or revoked.

    レスポンス
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 402

    The organization must act first: card_required, email_unverified, org_under_review, free_tier_requires_payment or promotion_ended. The message names the step; retrying does not help.

    レスポンス
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"
  • 429

    insufficient_quota (out of credits, over a spend limit, or the model needs a purchase) and promo_credits_now (a free promotion is used up): add credits, the message names the step. rate_limit_exceeded, free_limit_reached, admission_capacity_exceeded: wait Retry-After seconds and retry.

    レスポンス
    • errorobject
      error
      • messagestring

        What went wrong and how to fix it.

      • typestring

        For example invalid_request_error, authentication_error, permission_error, rate_limit_error, insufficient_quota, api_error.

      • codestring

        The stable error code.

      • paramstring | null

        The request field at fault, when there is one.

      • refusal_reasonenum

        Present only on code: refusal.

        "cyber_policy""cbrn""content_policy""recitation""data_inspection""unspecified"

リクエスト

curl https://api.experientiallabs.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F model=whisper-1 \
  -F file=@standup.m4a

レスポンス

{
  "text": "Yesterday I shipped the retry fix. Today I am on the docs.",
  "usage": {
    "type": "duration",
    "seconds": 6
  }
}

https://api.experientiallabs.ai/v1/audio/transcriptions