AiFO AiFO مستندات AiFO
قیمت
Input: 0.006 USD · Output: 0 USD · per_audio_minute
Context
نامشخص
Endpoint
POST /v1/audio/transcriptions

نمونه درخواست (Chat Completions)

# Required: model, file (multipart)
curl https://api.aifoapp.ir/v1/audio/transcriptions \
  -H "Authorization: Bearer aifo_sk_live_YOUR_API_KEY" \
  -F "file=@audio.mp3" \
  -F "model=whisper-1"
import requests

url = "https://api.aifoapp.ir/v1/audio/transcriptions"
headers = {"Authorization": "Bearer aifo_sk_live_YOUR_API_KEY"}
files = {"file": open("audio.mp3", "rb")}
data = {"model": "whisper-1"}

response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())
const form = new FormData();
form.append("file", fileInput.files[0]);
form.append("model", "whisper-1");

const response = await fetch("https://api.aifoapp.ir/v1/audio/transcriptions", {
  method: "POST",
  headers: { Authorization: "Bearer aifo_sk_live_YOUR_API_KEY" },
  body: form,
});

const data = await response.json();
console.log(data);
import axios from "axios";
import FormData from "form-data";
import { createReadStream } from "fs";

const form = new FormData();
form.append("file", createReadStream("audio.mp3"));
form.append("model", "whisper-1");

const { data } = await axios.post("https://api.aifoapp.ir/v1/audio/transcriptions", form, {
  headers: {
    ...form.getHeaders(),
    Authorization: "Bearer aifo_sk_live_YOUR_API_KEY",
  },
});

console.log(data);

پارامترها

Endpoint

POST /v1/audio/transcriptions

Inputs

  • Audio file: file with multipart/form-data

Required body fields: model, file

Parameters

Name Type Required/optional Default Notes
model string required — —
language string optional — —
response_format string optional json —
temperature number optional — —
prompt string unsupported — Not accepted by this model
timestamp_granularities string unsupported — Not accepted by this model
max_files string unsupported — Not accepted by this model
max_attachment_bytes string unsupported — Not accepted by this model
max_total_attachment_bytes string unsupported — Not accepted by this model
url_support string unsupported — Not accepted by this model
data_url_support string unsupported — Not accepted by this model
file_id_support string unsupported — Not accepted by this model
native_document_support string unsupported — Not accepted by this model
audio_mime_types string unsupported — Not accepted by this model
file_mime_types string unsupported — Not accepted by this model
image_mime_types string unsupported — Not accepted by this model
streaming string unsupported — Not accepted by this model
function_tools string unsupported — Not accepted by this model
reasoning string unsupported — Not accepted by this model
stateful string unsupported — Not accepted by this model

FAQ

قیمت whisper-1 در AiFO چقدر است؟

قیمت ورودی 0.006 USD و خروجی 0 USD (per_audio_minute) است.

whisper-1 برای چه کاربردی مناسب است؟

مدل Whisper-1 از OpenAI برای تبدیل گفتار به متن طراحی شده است. این مدل با استفاده از فایل‌های صوتی، محتوای گفتاری را به متن تبدیل می‌کند و می‌تواند در زبان‌های مختلف عمل کند. برای استفاده از این مدل، فایل صوتی باید به فرمت مناسب ارسال شود و پارامترهای اختیاری مانند language و temperature نیز قابل تنظیم هستند.

چطور این مدل را از API صدا بزنم؟

یک API Key از پنل AiFO بگیرید، model را در body درخواست قرار دهید و درخواست را به gateway ارسال کنید. نمونه cURL و JavaScript در همین صفحه آمده است.