Peke ki ngā ihirangi

Workflow Utilities Pick Image By Index

Whakauru

id tauira workflow-utilities/pick-image-by-index
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/workflow-utilities/pick-image-by-index?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  }'

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

Tēnei tono: ≈$ 0.001 1 whiwhinga API Whakahaerehia ki tēnei whārangi

Tikina he kī API
Utility · Atahanga

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 image_urls
Whakataka he kōnae,

Huinga URL atahanga hei pūtake kōwhiringa.

•e hiahiatia ana

Kōwhiringa atahanga mā te tūranga, ka tatau mai i te 1: tonoa te 1 mō te atahanga tuatahi, te 2 mō te tuarua, me ērā atu.

Arā atu fallback_index
fallback_index taunoa first-image

Kaupapa kōwhiringa atahanga kei waho o te awhe, ko `first-image` te taunoa; ka waiho noa mō tētahi `index` whaimana, ā, ka rahua tonu te manatoko mō tētahi `index` i raro iho i te 1, mō tētahi huinga `image_urls` kau rānei. Mā te `index` nui ake i te roa o te huinga anake ka whakahohe i te kaupapa: mā `first-image` ka kōwhiria te atahanga tuatahi, mā `last-image` te atahanga whakamutunga.

POST /run/workflow-utilities/pick-image-by-index?wait=20 utu → $ 0.001
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/workflow-utilities/pick-image-by-index?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "images": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/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ō Workflow Utilities Pick Image By Index

Ka whakahoki i tētahi atahanga mai i tētahi huinga URL atahanga. He tīmata-1 a `index`, nō reira ko 1 te atahanga tuatahi. Ina nui ake te taupū i te roa o te rārangi, mā `fallback_index` e whakatau mēnā ka whakahokia te atahanga tuatahi, te whakamutunga rānei. He pai mō te hono i ngā hipanga o tētahi rerengamahi.

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
image_urlse hiahiatia ana images
Momourl[] · image
Huinga URL atahanga hei pūtake kōwhiringa.
indexe hiahiatia ana
Momointeger
Kōwhiringa atahanga mā te tūranga, ka tatau mai i te 1: tonoa te 1 mō te atahanga tuatahi, te 2 mō te tuarua, me ērā atu.
fallback_indexkōwhiringa
Momoenum
Taunoafirst-image
first-imagelast-image
Kaupapa kōwhiringa atahanga kei waho o te awhe, ko `first-image` te taunoa; ka waiho noa mō tētahi `index` whaimana, ā, ka rahua tonu te manatoko mō tētahi `index` i raro iho i te 1, mō tētahi huinga `image_urls` kau rānei. Mā te `index` nui ake i te roa o te huinga anake ka whakahohe i te kaupapa: mā `first-image` ka kōwhiria te atahanga tuatahi, mā `last-image` te atahanga whakamutunga.
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": "workflow-utilities/pick-image-by-index",
  "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": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "image_urls": [
      "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
    ],
    "index": 1
  },
  "output": {
    "image": {
      "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,
      "width": 1024,
      "height": 768
    },
    "images": [
      {
        "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,
        "width": 1024,
        "height": 768
      }
    ]
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/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
image
object {url, content_type, file_name, file_size, width, height}Atahanga i kōwhiria i te tūranga kua tohua.
images
array of object {url, content_type, file_name, file_size, width, height}Putanga hototahi mō ngā kōpuku whakararo e tatari ana ki tētahi tohutoro `images`, e tukuna ana e merge me ētahi atu taputapu. Kei roto te atahanga kua kōwhiria i tētahi huinga kotahi te rahi, nō reira kāore he panonitanga e hiahiatia ana e aua kōpuku.

Ētahi atu tauira: Whakatika Atahanga

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