Preskoči na vsebino

Image Preprocessors · Midas

Integracija

ID modela image-preprocessors/midas
# 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/image-preprocessors/midas?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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"

Ta zahteva: ≈0,008 $ 8 API kreditov Zaženi na tej strani

Pridobi ključ API
Utility · Podatki (JSON)

Tukaj bo vaš prvi rezultat

Spodaj sestavite zahtevo in jo zaženite s svojim ključem API. Izhodi se kopirajo v našo shrambo, kjer se hranijo za vedno ali 7 dni brezplačno.

Ustvari zahtevo

Kontrolniki se ustvarijo iz sheme modela. Koda in cena se posodobita, ko ju spreminjate.

•obvezno image_url
Spustite datoteko ali

URL slike za obdelavo.

Napredno a · background_threshold
privzeto 6.283185307179586

Nastavitev, ki jo uporablja detektor MiDaS.

privzeto 0.1

Prag detektorja MiDaS za ozadje.

POST /run/image-preprocessors/midas?wait=20 cena → 0,008 $
# 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/image-preprocessors/midas?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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"

Zaženi to zahtevo

Vaš ključ ostane v tem brskalniku: pošlje se samo v Doitong API in shrani v localStorage samo, če označite možnost Zapomni si. Pridobi ključ API

O modelu Image Preprocessors · Midas

Zažene ocenjevanje globine MiDaS na `image_url` in vrne dva izhoda: `depth_map` in `normal_map`. Številska vhoda `a` (privzeto 2π) in `background_threshold` (privzeto 0.1) prilagajata detektor.

Parametri

Pošlji kanonično ali izvorno ime, ne obeh. Kanonična imena

ImeVrsta PrivzetoDovoljeno Opis
image_urlobvezno image
Vrstaurl · image
URL slike za obdelavo.
aneobvezno
Vrstanumber
Privzeto6.283185307179586
Nastavitev, ki jo uporablja detektor MiDaS.
background_thresholdneobvezno
Vrstanumber
Privzeto0.1
Prag detektorja MiDaS za ozadje.
obvezno Kanonično ime, prav tako sprejeto

Parametri datotek sprejmejo javni https:// URL, podatkovni URI data: do 10 MB ali file_url naložene datoteke. Datoteke

Izhod

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "image-preprocessors/midas",
  "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": 8,
    "usd": "0.008",
    "charged": 8,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "depth_map": {
      "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
    },
    "normal_map": {
      "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": "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Vaše datoteke, vaša izbiraVsak outputs[].url je kopija v naši shrambi: hrani se za vedno (plačilo na GB-mesec) ali 7 dni brezplačno, glede na nastavitev računa ali ?storage=.
Enaka struktura pri vsakem modelutype, url, content_type, width, height in duration za slike, videoposnetke in zvok. output je lasten objekt rezultata modela.
Polja izhoda
depth_map
object {url, content_type, file_name, file_size, width, height}Slika z zemljevidom globine, ki ga je ustvaril MiDaS.
normal_map
object {url, content_type, file_name, file_size, width, height}Slika z normalnim zemljevidom, ki ga je ustvaril MiDaS.

Več modelov: Urejanje slik

Za agente AI: ta stran je v obliki Markdown na voljo na https://doitong.com/sl/developers/models/image-preprocessors/midas.md. Vsi modeli in vodniki: https://doitong.com/developers/llms.txt