Peke ki ngā ihirangi

Sam Audio · Separate

Whakauru

id tauira sam-audio/separate
# 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/sam-audio/separate?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "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"

Ngā kōnae pēnei i te tauira: $ 0.05 50 whiwhinga API · ≈ ₽ 5.27 ka inea ō kōnae i mua i te whakahaere Whakahaerehia ki tēnei whārangi

Tikina he kī API
Meta Ororongo 10–60 s #audio-to-audio#sam-audio

Ka wehea he oro mai i tētahi kōnae ororongo mā te whakaahuatanga kuputuhi, ā, ka whakahoki ara whāinga me te ara toenga

Meta · Raraunga (JSON)

Kei konei tō hua tuatahi

Hangaia he tono ki raro nei, ka whakahaere mā tō kī API. Ka tāruatia ngā putanga ki tō mātou rokiroki, ka puritia mō ake tonu atu, mō rānei 7 rā mō te kore utu.

Hangaia he tono

Ka hangaia ngā mana whakahaere mai i te aronuinga o te tauira. Ka whakahoungia te waehere me te utu ina whakarerekē koe.

•e hiahiatia ana

Whakaahuatanga kuputuhi o te oro e whāia ana mō te wehe.

•e hiahiatia ana audio_url
Whakataka he kōnae,

URL kōnae ororongo mō te tukatuka; ko WAV, MP3 me FLAC ngā hōputu e tautokona ana.

taunoa 1

Te maha o ngā kaitono i whakaputaina mō te whakaraupapa.

Arā atu acceleration · output_format · max_chunk_duration · chunk_overlap · predict_spans
acceleration taunoa balanced

Taumata whakatere i whakamahia mō te tukatuka.

output_format taunoa wav

Hōputu mō te ororongo kua whakaputaina.

taunoa 60

Te rohe ororongo mō ia tukunga, hei hēkona; ki tua atu, ka whakamahi te tukatuka i ngā wāhanga inaki ka hanumihia.

taunoa 5

Te roa o te inaki i waenga i ngā wāhanga, hei hēkona, mō te hanumi whakawhiti.

POST /run/sam-audio/separate?wait=20 utu → $ 0.05
# 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/sam-audio/separate?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "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"

Whakahaerehia tēnei tono

Ka noho tō kī ki tēnei pūtirotiro: ka tukuna ki te Doitong API anake, ā, ka tiakina ki te localStorage anake ina tohua e koe te Mahara. Tikina he kī API

Mō Sam Audio · Separate

Homai he `audio_url` (WAV, MP3, FLAC rānei) me tētahi `prompt` e whakaingoa ana i te oro hei tango. Kei te putanga he ara `target` me te oro kua wehea, me te ara `residual` me ngā mea katoa atu. Ko ngā kōwhiringa ko `predict_spans`, tae atu ki te 7 `reranking_candidates`, he taumata `acceleration`, te wawahi i te ororongo roa (10 ki te 60 hēkona mō ia tukunga) me te putanga wav, mp3 rānei.

Ngā tawhā

Tukuna te ingoa tōmua, te ingoa taketake rānei, kaua e rua. Ngā ingoa tōmua

IngoaMomo TaunoaE whakaaetia ana Whakamārama
audio_urle hiahiatia ana audio
Momourl · audio
URL kōnae ororongo mō te tukatuka; ko WAV, MP3 me FLAC ngā hōputu e tautokona ana.
prompte hiahiatia ana
Momostring
Whakaahuatanga kuputuhi o te oro e whāia ana mō te wehe.
predict_spanskōwhiringa
Momoboolean
Taunoafalse
Matapae aunoa i ngā wā kei roto te oro whāia.
reranking_candidateskōwhiringa
Momointeger
Taunoa1
1 – 7
Te maha o ngā kaitono i whakaputaina mō te whakaraupapa.
accelerationkōwhiringa
Momoenum
Taunoabalanced
fastbalancedquality
Taumata whakatere i whakamahia mō te tukatuka.
max_chunk_durationkōwhiringa
Momonumber
Taunoa60
10 – 60
Te rohe ororongo mō ia tukunga, hei hēkona; ki tua atu, ka whakamahi te tukatuka i ngā wāhanga inaki ka hanumihia.
chunk_overlapkōwhiringa
Momonumber
Taunoa5
0 – 30
Te roa o te inaki i waenga i ngā wāhanga, hei hēkona, mō te hanumi whakawhiti.
output_formatkōwhiringa
Momoenum
Taunoawav
wavmp3
Hōputu mō te ororongo kua whakaputaina.
e hiahiatia ana Ingoa tōmua, e whakaaetia ana hoki

Mō ngā tawhā kōnae, whakamahia he URL tūmatanui https://, he URI data: tae atu ki te 10 MB, he file_url rānei o tētahi tukuake. Ngā kōnae

Putanga

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-audio/separate",
  "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": 50,
    "usd": "0.05",
    "charged": 50,
    "refunded": 0
  },
  "input": {
    "audio_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "target": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "residual": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "duration": 5,
    "sample_rate": 48000
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "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"
  }
}
Ō kōnae, māu e whiriwhiriKo ia url o outputs[] he tārua kei tō mātou rokiroki: ka puritia mō ake tonu atu (ka utua ia GB-marama) mō rānei 7 rā mō te kore utu, e ai ki ngā tautuhinga o tō pūkete, ki te ?storage= rānei.
He ōrite te hanga ki ia tauiratype, url, content_type, width, height me duration, mō ngā pikitia, ataata me te oro. Ko output te ahanoa hua ake o te tauira.
Ngā āpure o te putanga
target
object {url, content_type, file_name, file_size}Te oro whāia kua tangohia motuhake.
residual
object {url, content_type, file_name, file_size}Te ororongo e toe ana i tua atu i te oro whāia.
duration
numberTe roa o te ororongo putanga, hei hēkona.
sample_rate
integerAuautanga tauira i roto i te Hz mō te ororongo putanga.

Ētahi atu tauira: Ororongo

Mō ngā āpiha AI: kei te wātea tēnei whārangi hei Markdown ki https://doitong.com/mi/developers/models/sam-audio/separate.md. Ngā tauira me ngā aratohu katoa: https://doitong.com/developers/llms.txt