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 (ตัวพิมพ์เล็กสองตัว เช่น th) และ response_format=json (รูปแบบเดียวและค่าเริ่มต้น) ให้ curl สร้าง boundary ไม่รองรับ URL, ID ไฟล์, prompt, timestamp หรือ stream

STT ใช้ input_audio_second หรือ token; TTS ใช้ input_character โดย speech_billing_unit แบบ utf16_code_unit กับ unicode_code_point นับ emoji ต่างกัน ยอดสำรองไม่ใช่เพดานค่าใช้จ่ายและอาจสรุปยอดแบบอะซิงโครนัส การขาดหลักฐานไม่แปลว่าฟรี ทั้งสอง API รับ X-Felo-Channel และส่งไปช่องทางที่เลือกเพียงครั้งเดียว ปิดการลองซ้ำอัตโนมัติรวมถึง SDK หลัง timeout หรือหลุด เก็บ 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 เป็นวินาทีหรือ token ส่วน usage.cost เป็นต้นทุนผู้ให้บริการ ไม่ใช่ยอดเรียกเก็บ Felo สุดท้าย ไม่ต้อง polling งาน

    • 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 enum
        ค่า
        • 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

ต้องการความช่วยเหลือไหม