Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Přepis řeči

Server:https://openapi.felo.ai
Klientské knihovny

Audio

​

Přepis řeči

​

Pošlete model a file jako multipart/form-data: úplný mono PCM WAV, nejvýše 25,000,000 bajtů, při dodržení limitů vzorkovací frekvence a délky kanálu. Volitelné: language (dvě malá písmena, např. cs) a response_format=json (jediný i výchozí formát). boundary vytvoří curl. URL, ID souboru, prompt, časové značky a stream nejsou podporovány.

STT používá input_audio_second nebo tokeny, TTS input_character. V speech_billing_unit počítají utf16_code_unit a unicode_code_point emoji odlišně. Rezervace není limit útraty; vyúčtování může být asynchronní. Chybějící důkazy neznamenají nulovou cenu. Obě API přijímají X-Felo-Channel a odesílají jednou do zvoleného kanálu. Vypněte automatická opakování včetně SDK po timeoutu nebo odpojení; uchovejte X-Request-Id a dostupné X-Generation-Id. Console Playground zatím zvuk nepodporuje. configured_rates používá zmrazené sazby a ověřenou spotřebu; upstream_cost ověřené náklady dodavatele s publikovanou přirážkou a slevou.

Hlavičky
  • 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.

Tělo
povinné
application/json
Odpovědi
  • 200
    Typ: object

    Synchronní JSON obsahuje text a volitelně usage v sekundách nebo tokenech. usage.cost je cena dodavatele, nikoli konečná platba Felo. Není třeba dotazovat stav úlohy.

    • text
      Typ: string
      povinné
    • 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
        hodnoty
        • duration
        • tokens
    application/json
  • 400
    Typ: object

    Upload, wallet or upstream error

    • error
      Typ: object
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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
      povinné
      • 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

Potřebujete pomoc?