Langkau ke kandungan

Image Preprocessors · Depth Anything · v2

Integrasikan

ID model image-preprocessors/depth-anything/v2
# 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/depth-anything/v2?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"

Permintaan ini: ≈$0.004 4 kredit API Jalankan pada halaman ini

Dapatkan kunci API
Utility · Imej

Hasil pertama anda akan muncul di sini

Bina permintaan di bawah dan jalankannya dengan kunci API anda. Output disalin ke storan kami, disimpan selama-lamanya atau 7 hari secara percuma.

Bina permintaan

Kawalan dijana daripada skema model. Kod dan harga dikemas kini apabila anda mengubahnya.

•diperlukan image_url
Lepaskan fail, atau

URL yang menunjuk kepada imej untuk diproses.

POST /run/image-preprocessors/depth-anything/v2?wait=20 sebut harga → $0.004
# 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/depth-anything/v2?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"

Jalankan permintaan ini

Kunci anda kekal dalam pelayar ini: ia hanya dihantar kepada Doitong API dan disimpan (localStorage) hanya jika anda menanda Ingat. Dapatkan kunci API

Tentang Image Preprocessors · Depth Anything · v2

Alat prapemprosesan yang menerima satu `image_url` dan mengembalikan imej yang mengandungi peta kedalaman. Tiada parameter lain. Biasanya digunakan untuk menghasilkan input pengkondisian kedalaman bagi penjanaan seterusnya.

Parameter

Hantar sama ada nama kanonik atau nama natif, bukan kedua-duanya. Nama kanonik

NamaJenis LalaiDibenarkan Penerangan
image_urldiperlukan image
Jenisurl · image
URL yang menunjuk kepada imej untuk diproses.
diperlukan Nama kanonik, turut diterima

Parameter fail menerima URL awam https://, URI data: sehingga 10 MB, atau file_url bagi muat naik. Fail

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "image-preprocessors/depth-anything/v2",
  "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": 4,
    "usd": "0.004",
    "charged": 4,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "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
    }
  },
  "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"
  }
}
Fail anda, pilihan andaSetiap outputs[].url ialah salinan pada storan kami: disimpan selama-lamanya (dibayar setiap GB-bulan) atau 7 hari secara percuma, mengikut tetapan akaun anda atau ?storage=.
Bentuk yang sama pada setiap modeltype, url, content_type, width, height dan duration, untuk imej, video dan audio. output ialah objek hasil model itu sendiri.
Medan output
image
object {url, content_type, file_name, file_size, width, height}Imej yang mengandungi peta kedalaman.

Lebih banyak model: Penyuntingan Imej

Untuk ejen AI: halaman ini dalam Markdown tersedia di https://doitong.com/ms/developers/models/image-preprocessors/depth-anything/v2.md. Semua model dan panduan: https://doitong.com/developers/llms.txt