跳转到主要内容
POST
/
v1
/
audios
/
generations
curl --request POST \
  --url https://api.foxapi.cc/v1/audios/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "paraformer-v2",
  "file_urls": [
    "https://example.com/audio/meeting.wav"
  ]
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "audio.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "audio"
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:paraformer-v2
必填

paraformer-v2:支持中英日等多语种 paraformer-8k-v2:8kHz 采样率,仅支持中文

示例:

"paraformer-v2"

"paraformer-8k-v2"

file_urls
string[]
必填

音频文件 URL 列表

说明:

  • 支持 HTTP/HTTPS 协议的公网可访问 URL
  • 单次请求最多 100 个 URL
  • 支持格式:aac, amr, avi, flac, flv, m4a, mkv, mov, mp3, mp4, mpeg, ogg, opus, wav, webm, wma, wmv
  • 单文件不超过 2GB,时长不超过 12 小时
Required array length: 1 - 100 elements
示例:
["https://example.com/audio/meeting.wav"]
language_hints
string[] | null

待识别语种提示

说明:

  • paraformer-v2 支持,paraformer-8k-v2 不适用
  • 支持的语言代码:zh(中文)、en(英文)、ja(日语)、yue(粤语)、ko(韩语)、de(德语)、fr(法语)、ru(俄语)
示例:
["zh", "en"]
channel_id
integer[] | null

音轨索引

说明:

  • 索引从 0 开始,[0] 表示第一个音轨
  • 默认 [0](仅处理第一个音轨)
  • 每个指定的音轨独立计费

非必须不要传这个参数。

示例:
[0]
recognition
object

识别配置

说明:

  • 包含语气词过滤、时间戳校准、热词、敏感词过滤等设置
  • 不传则使用默认配置

非必须不要传这个参数。

diarization
object

说话人分离配置

说明:

  • 包含分离开关和说话人数量提示
  • 不传则不启用说话人分离

非必须不要传这个参数。

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
audio.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
audio
示例:

"audio"