Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

Spraakherkenning

Server:https://openapi.felo.ai
Clientbibliotheken

Audio

​

Spraakherkenning

​

Stuur model en file als multipart/form-data: een volledig mono PCM WAV-bestand, maximaal 25,000,000 bytes, met de samplefrequentie- en duurlimieten van het kanaal. Optioneel: language (twee kleine letters, zoals nl) en response_format=json (enige formaat en standaard). Laat curl de boundary maken. URL's, bestands-ID's, prompt, tijdstempels en stream worden niet ondersteund.

STT gebruikt input_audio_second of tokens; TTS gebruikt input_character. Bij speech_billing_unit tellen utf16_code_unit en unicode_code_point emoji anders. De reservering is geen uitgavenlimiet; afrekening kan asynchroon zijn. Ontbrekend bewijs betekent niet gratis. Beide accepteren X-Felo-Channel en versturen eenmaal naar het gekozen kanaal. Zet automatische herhalingen, ook in SDK's, uit na timeout of verbreking. Bewaar X-Request-Id en beschikbare X-Generation-Id. Console Playground ondersteunt audio nog niet. configured_rates gebruikt vastgezette tarieven en geverifieerd gebruik; upstream_cost gebruikt geverifieerde leverancierskosten met gepubliceerde opslag en korting.

Headers
  • X-Felo-Channel
    Type: 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.

Body
verplicht
application/json
Responsen
  • 200
    Type: object

    De synchrone JSON bevat text en eventueel usage in seconden of tokens. usage.cost zijn leverancierskosten, niet de uiteindelijke Felo-afschrijving. Geen taakpolling nodig.

    • text
      Type: string
      verplicht
    • usage
      Type: object | null
      • cost
        Type: number
        min.:  
        0

        Reported upstream cost in USD.

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

          Integer numbers.

        • text_tokens
          Type: integer
          min.:  
          0

          Integer numbers.

      • input_tokens
        Type: integer
        min.:  
        0

        Integer numbers.

      • output_tokens
        Type: integer
        min.:  
        0

        Integer numbers.

      • seconds
        Type: number
        min.:  
        0

        Duration reported by the selected channel.

      • total_tokens
        Type: integer
        min.:  
        0

        Integer numbers.

      • type
        Type: string enum
        waarden
        • duration
        • tokens
    application/json
  • 400
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 402
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 413
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 415
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 429
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 500
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 502
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 503
    Type: object

    Upload, wallet or upstream error

    • error
      Type: object
      verplicht
      • code
        Type: string | null
      • message
        Type: string
      • param
        Type: string | null
      • type
        Type: string
    application/json
  • 504
    Type: object

    Upload, wallet or upstream error

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

Hulp nodig?