Felo API PlatformFelo API Platform
v0.4.0
OpenAPI 3.1.0

تبدیل گفتار به متن

سرور:https://openapi.felo.ai
کتابخانه‌های کلاینت

Audio

​

تبدیل گفتار به متن

​

model و file را با multipart/form-data بفرستید: PCM WAV تک‌کانالهٔ کامل، حداکثر 25,000,000 بایت، مطابق محدودیت نرخ نمونه‌برداری و مدت کانال. اختیاری: language (دو حرف کوچک، مانند fa) و response_format=json (تنها قالب و پیش‌فرض). تولید boundary را به curl بسپارید. URL، شناسهٔ فایل، prompt، برچسب زمانی و stream پشتیبانی نمی‌شوند.

STT از input_audio_second یا توکن و TTS از input_character استفاده می‌کند. در speech_billing_unit، ‏utf16_code_unit و unicode_code_point ایموجی را متفاوت می‌شمارند. رزرو سقف هزینه نیست؛ تسویه ممکن است ناهمگام باشد. نبود مدرک به معنی رایگان نیست. هر دو 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 اختیاری بر حسب ثانیه یا توکن است. 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

به کمک نیاز دارید؟

  • برای پرسش‌های مربوط به API، صورت‌حساب و حساب کاربری با پشتیبانی در تماس باشید.
  • با توسعه‌دهندگان Felo در Discord گفت‌وگو کنید.
  • تاریخچه تغییرات ما را ببینید.
  • به قیمت‌گذاری حجمی یا کمک در خرید نیاز دارید؟ تماس با فروش.
  • با LLM می‌سازید؟ llms.txt را بخوانید.