Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Розпізнавання мовлення

Сервер:https://openapi.felo.ai
Клієнтські бібліотеки

Audio

​
Audio Операції

Розпізнавання мовлення

​

Надішліть model і file як multipart/form-data: повний моно PCM WAV, максимум 25,000,000 байтів, з урахуванням обмежень частоти й тривалості каналу. Необов'язкові: language (дві малі літери, наприклад uk) і response_format=json (єдиний і типовий формат). boundary створює curl. URL, ID файлів, prompt, часові позначки та stream не підтримуються.

STT використовує input_audio_second або токени; TTS — input_character. У speech_billing_unit одиниці utf16_code_unit та unicode_code_point рахують emoji по-різному. Резерв не є лімітом витрат; розрахунок може бути асинхронним. Брак доказів не означає безкоштовність. Обидва API приймають X-Felo-Channel і надсилають один раз до вибраного каналу. Вимкніть автоматичні повтори, зокрема SDK, після таймауту чи обриву; збережіть X-Request-Id і доступний X-Generation-Id. Console Playground поки не підтримує аудіо. configured_rates використовує зафіксовані тарифи й підтверджений обсяг; upstream_cost — перевірену вартість постачальника з опублікованими націнкою та знижкою.

Заголовки
  • X-Felo-Channel
    Тип: string

    Ordered comma-separated public channel codes. Omit this header to use default; default must be used alone. In wallet mode, default scans the model's effective public channel order in reverse, skips unpublished or unavailable channels, and uses the first eligible channel. Explicit codes follow the supplied order. For stateless Chat Completions, Messages and Responses, the server may try another selected channel or provider group after a confirmed upstream rejection. A single explicit channel limits routing to that channel. Legacy provider headers cannot override channel routing.

Тіло
обов'язкове
application/json
Відповіді
  • 200
    Тип: object

    Синхронний JSON містить text і необов'язковий usage у секундах або токенах. usage.cost — витрати постачальника, не остаточне списання Felo. Опитування завдання не потрібне.

    • text
      Тип: string
      обов'язкове
    • usage
      Тип: object | null
      • cost
        Тип: number
        мін.:  
        0

        Reported upstream cost in USD.

      • input_token_details
        Тип: object
        • audio_tokens
          Тип: integer
          мін.:  
          0

          Integer numbers.

        • text_tokens
          Тип: integer
          мін.:  
          0

          Integer numbers.

      • input_tokens
        Тип: integer
        мін.:  
        0

        Integer numbers.

      • output_tokens
        Тип: integer
        мін.:  
        0

        Integer numbers.

      • seconds
        Тип: number
        мін.:  
        0

        Duration reported by the selected channel.

      • total_tokens
        Тип: integer
        мін.:  
        0

        Integer numbers.

      • type
        Тип: string перелік
        значення
        • duration
        • tokens
    application/json
  • 400
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 402
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 413
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 415
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 429
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 500
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 502
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 503
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
  • 504
    Тип: object

    Upload, wallet or upstream error

    • error
      Тип: object
      обов'язкове
      • code
        Тип: string | null
      • message
        Тип: string
      • param
        Тип: string | null
      • type
        Тип: string
    application/json
Request Example for post/api/v1/audio/transcriptions
curl https://openapi.felo.ai/api/v1/audio/transcriptions \
  --request POST \
  --header 'Content-Type: multipart/form-data' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --form 'model=grok-stt-2.0' \
  --form 'file=@filename' \
  --form 'language=' \
  --form 'response_format=json'
{
  "text": "string",
  "usage": {
    "seconds": 0,
    "type": "duration",
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0,
    "input_token_details": {
      "text_tokens": 0,
      "audio_tokens": 0
    },
    "cost": 0
  }
}
Transcribe a WAV recording

Потрібна допомога?