Мазмұнға өту

Image Preprocessors · Midas

Интеграциялау

Модель идентификаторы 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"

Осы сұрау: ≈0,008 $ 8 API кредиті Осы бетте іске қосу

API кілтін алу
Utility · Деректер (JSON)

Алғашқы нәтижеңіз осында пайда болады

Төменде сұрау құрып, оны API кілтіңізбен іске қосыңыз. Шығыстар сақтау орнымызға көшіріліп, мәңгі немесе 7 күн тегін сақталады.

Сұрау жасау

Басқару элементтері модель схемасынан жасалады. Оларды өзгерткен сайын код пен баға жаңартылады.

•міндетті image_url
Файлды тастаңыз немесе

Өңделетін кескінге сілтеме жасайтын URL.

Қосымша a · background_threshold
әдепкі 6.283185307179586

MiDaS детекторы пайдаланатын параметр.

әдепкі 0.1

MiDaS детекторының фонға арналған шегі.

POST /run/image-preprocessors/midas?wait=20 бағасы → 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"

Осы сұрауды іске қосу

Кілтіңіз осы браузерде қалады: ол тек Doitong API-ге жіберіледі және Remember параметрін белгілеcеңіз ғана localStorage ішінде сақталады. API кілтін алу

Image Preprocessors · Midas туралы

`image_url` арқылы MiDaS тереңдікті бағалап, екі нәтиже қайтарады: `depth_map` және `normal_map`. Сандық `a` (әдепкі мәні 2π) және `background_threshold` (әдепкі мәні 0.1) детекторды реттейді.

Параметрлер

Канондық атауды немесе төл атауды жіберіңіз, екеуін қатар жібермеңіз. Канондық атаулар

АтауыТүрі ӘдепкіРұқсат етілген Сипаттама
image_urlміндетті image
Түріurl · image
Өңделетін кескінге сілтеме жасайтын URL.
aміндетті емес
Түріnumber
Әдепкі6.283185307179586
MiDaS детекторы пайдаланатын параметр.
background_thresholdміндетті емес
Түріnumber
Әдепкі0.1
MiDaS детекторының фонға арналған шегі.
міндетті Канондық атау, бұл да қабылданады

Файл параметрлері жалпыға қолжетімді https:// URL мекенжайын, 10 MB-қа дейінгі data: URI мекенжайын немесе жүктеп салынған файлдың file_url мәнін қабылдайды. Файлдар

Шығыс

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"
  }
}
Файлдарыңыз — таңдауыңызӘр outputs[].url — сақтау орнымыздағы көшірме: мәңгі (әр GB-ай үшін ақылы) немесе аккаунт параметрі не ?storage= арқылы 7 күн тегін сақталады.
Әр модельдегі пішім бірдейtype, url, content_type, width, height және duration — кескіндерге, бейнеге және аудиоға ортақ. output — модельдің өз нәтижелер нысаны.
Шығыс өрістері
depth_map
object {url, content_type, file_name, file_size, width, height}MiDaS жасаған тереңдік картасы бар кескін.
normal_map
object {url, content_type, file_name, file_size, width, height}MiDaS жасаған нормаль картасы бар кескін.

Қосымша модельдер: Кескінді өңдеу

AI агенттеріне: бұл беттің Markdown нұсқасы мына жерде: https://doitong.com/kk/developers/models/image-preprocessors/midas.md. Барлық модельдер мен нұсқаулықтар: https://doitong.com/developers/llms.txt