Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Transkrypcja mowy

Serwer:https://openapi.felo.ai
Biblioteki klienckie

Audio

​

Transkrypcja mowy

​

Wyślij model i file jako multipart/form-data: kompletny mono PCM WAV, maksymalnie 25,000,000 bajtów, z ograniczeniami częstotliwości próbkowania i długości kanału. Opcjonalne: language (dwie małe litery, np. pl) i response_format=json (jedyny i domyślny format). Pozwól curl wygenerować boundary. URL, ID plików, prompt, znaczniki czasu i stream nie są obsługiwane.

STT używa input_audio_second lub tokenów; TTS używa input_character. speech_billing_unit: utf16_code_unit i unicode_code_point inaczej liczą emoji. Rezerwacja nie jest limitem wydatków; rozliczenie może być asynchroniczne. Brak dowodów nie oznacza braku opłat. Oba API przyjmują X-Felo-Channel i wysyłają raz do wybranego kanału. Wyłącz automatyczne ponawianie także w SDK po timeout lub rozłączeniu; zachowaj X-Request-Id i dostępne X-Generation-Id. Console Playground nie obsługuje jeszcze audio. configured_rates używa zamrożonych stawek i potwierdzonego zużycia; upstream_cost — potwierdzonego kosztu dostawcy z opublikowaną marżą i rabatem.

Nagłówki
  • X-Felo-Channel
    Typ: 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.

Treść
wymagane
application/json
Odpowiedzi
  • 200
    Typ: object

    Synchroniczny JSON zawiera text i opcjonalnie usage w sekundach lub tokenach. usage.cost to koszt dostawcy, nie końcowe obciążenie Felo. Nie trzeba odpytywać zadania.

    • text
      Typ: string
      wymagane
    • usage
      Typ: object | null
      • cost
        Typ: number
        min.:  
        0

        Reported upstream cost in USD.

      • input_token_details
        Typ: object
        • audio_tokens
          Typ: integer
          min.:  
          0

          Integer numbers.

        • text_tokens
          Typ: integer
          min.:  
          0

          Integer numbers.

      • input_tokens
        Typ: integer
        min.:  
        0

        Integer numbers.

      • output_tokens
        Typ: integer
        min.:  
        0

        Integer numbers.

      • seconds
        Typ: number
        min.:  
        0

        Duration reported by the selected channel.

      • total_tokens
        Typ: integer
        min.:  
        0

        Integer numbers.

      • type
        Typ: string enum
        wartości
        • duration
        • tokens
    application/json
  • 400
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 402
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 413
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 415
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 429
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 500
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 502
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 503
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: string
    application/json
  • 504
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      wymagane
      • code
        Typ: string | null
      • message
        Typ: string
      • param
        Typ: string | null
      • type
        Typ: 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

Potrzebujesz pomocy?