跳转到内容

Mirelo SFX2.0 · Text to Audio

集成

模型 id mirelo-ai/sfx2.0/text-to-audio
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/mirelo-ai/sfx2.0/text-to-audio?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

与示例类似的文件: $0.60 600 API 积分 · ≈ ₽64.39 运行前会测量你的文件 在此页面运行

获取 API 密钥
Mirelo AI 音频 0.1–600 秒 #text-to-audio#sfx

根据文本描述生成音效,支持负面提示词、时长和多个样本

Mirelo AI · 音频

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填 88 / 2000

所需音效的描述。

默认 30

请求的声音长度,以秒为单位,必须符合特定部署对文本转 SFX 的最大值。

默认 2

单次批量前向传递中用于生成的样本数量。

高级 negative_prompt · upload_audio_format · upload_audio_bitrate_kbps · seed
0 / 1000

要从输出中排除的声音。

upload_audio_format 默认 wav

每个音频文件使用的格式。

上传比特率覆盖值,单位为 kbps;当 upload_audio_format 为无损格式时会被拒绝。未设置时,mp3 保留 LAME V0 VBR,aac 使用 256 kbps 目标值。对于 mp3,请从 32、40、48、56、64、80、96、112、128、160、192、224、256、320 中选择精确的恒定速率。对于 aac,32 到 256 的值指定编码器目标而非保证速率,因此单声道或稀疏音频可能低于该值。

初始样本的种子;使用 -1 或省略时会使用随机种子。

POST /run/mirelo-ai/sfx2.0/text-to-audio?wait=20 报价 → $0.60
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/mirelo-ai/sfx2.0/text-to-audio?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Mirelo SFX2.0 · Text to Audio

根据最多 2000 个字符的 `prompt` 生成音效,并使用 `negative_prompt` 排除声音。`duration` 范围为 0.1 到 600 秒(默认 30),`num_samples` 可生成 1 到 4 个变体,每个变体都有自己的种子。通过 `upload_audio_format` 选择 wav、mp3、aac 或 flac 输出格式,mp3 和 aac 还可选比特率。

参数

名称类型 默认值允许值 描述
prompt必填
类型string
≤ 2,000 个字符
所需音效的描述。
negative_prompt可选
类型string | null
≤ 1,000 个字符
要从输出中排除的声音。
duration可选
类型number
默认值30
0.1 – 600
请求的声音长度,以秒为单位,必须符合特定部署对文本转 SFX 的最大值。
seed可选
类型integer | null
-1 – 9,223,372,036,854,776,000
初始样本的种子;使用 -1 或省略时会使用随机种子。
num_samples可选
类型integer
默认值2
1 – 4
单次批量前向传递中用于生成的样本数量。
upload_audio_format可选
类型enum
默认值wav
wavmp3aacflac
每个音频文件使用的格式。
upload_audio_bitrate_kbps可选
类型integer | null
32 – 320
上传比特率覆盖值,单位为 kbps;当 upload_audio_format 为无损格式时会被拒绝。未设置时,mp3 保留 LAME V0 VBR,aac 使用 256 kbps 目标值。对于 mp3,请从 32、40、48、56、64、80、96、112、128、160、192、224、256、320 中选择精确的恒定速率。对于 aac,32 到 256 的值指定编码器目标而非保证速率,因此单声道或稀疏音频可能低于该值。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "mirelo-ai/sfx2.0/text-to-audio",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 600,
    "usd": "0.60",
    "charged": 600,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "model": "sfx-2.0",
    "audio": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
        "content_type": "audio/mpeg",
        "file_name": "0-output.mp3",
        "file_size": 1843200
      }
    ],
    "seeds": [
      42
    ]
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
model
string用于生成输出的 SFX 模型版本。
audio
array of object {url, content_type, file_name, file_size}生成的音效,每个样本对应一个结果。
seeds
array of integer与样本对应的种子,保持原有顺序。

更多模型:音频

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/mirelo-ai/sfx2.0/text-to-audio.md. 所有模型和指南: https://doitong.com/developers/llms.txt