ᡤᡝᠯᡳ ᡩᡝ ᠵᡠᠸᡝᠨ

Segment Anything Model 2 · Auto Segment

ᠵᡠᠸᡝᠪᡠᠮᠪᡳ

ᠮᠣᡩᡝᠯ id sam2/auto-segment
# 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/sam2/auto-segment?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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

ᡝᠨᡳ ᠵᠠᠯᡳᠨ: ≈$0.014 14 API ᠺᠷᡝᡩᡳᠲ · ≈ ₽1.48 ᡝᡵᡝ ᠵᠠᠯᡳᠨᡩᡝ ᠠᠰᡠᠮᠪᡳ

API ᡩᠠᠮᡠᠨ ᡤᠠᠯᠠ
Meta ᡤᠠᠳᠠᠨ ᠵᠠᠰᡳᠨ #segmentation#mask

ᡳᠨᡝᠩᡤᡳ ᡳ ᠵᠠᠯᡤᠠᠨ ᡳ ᠠᠮᠠᠯᠠ ᠵᡠᠯᡝᡵᡳ ᠣᠨᠣᠯᠣᠮᠪᡳ᠂ ᡝᠮᡠᠨ ᡝᠮᡠᠨ ᡳ ᠮᡠᠰᡝ ᠨᡝᠮᡝ ᠵᠠᠯᡤᠠ ᠮᡠᠰᡝ ᠣᠨᠣᠯᠣᠮᠪᡳ

Meta · ᡩᠠᡳᠯᠠᠮᡝ (JSON)

ᡳᠨᡝ ᡝᠮᡠᠨᡳᠩᡤᡝ ᡝᡵᡝᠮᡝ ᡩᡝ

ᡝᡵᡝ ᠵᡠᠯᡝᠨ ᡩᡝ ᡤᡝᡪᡳᠯᡝᠨ ᠪᠠᠶᠠᠨᠠᠮᡝ ᠠᠮᡪᠠᠯᠠ ᡶᡳᠯᡝᠮᡝ ᠪᡝᠶᡝᠮᡝ᠃ API ᠵᡳᡵᡤᠠᡳ ᡤᠠᡳᡥᠠᡩᡝ ᡤᡝᡪᡳᠯᡝᠨ ᠵᠠᠯᠠᠨᠠᠮᡝ ᠪᡠᠶᡝᠮᡝ ᠮᡠᠰᡝᡳ ᠰᡠᠯᡠᠨᡩᡝ ᠪᠠᠶᠠᠨᠠᠮᡝ᠂ ᠝ᠮᡤᡳ ᠮᡠᠰᡝ ᠠᠶᠠᠨ 7 ᡥᠠᠨ ᠰᠠᡳᠨᠠᠮᡝ᠃

ᡤᡳᠰᡠᠨ ᠪᡠᠶᡝᠮᡝ

ᠵᠠᡴᡠᠨᡳ ᠵᡠᠯᡝ ᡩᡝᡵᡤᡳ ᡩᡝᠪᡝᠰᡠᠮᡝ ᠵᡠᠯᡤᡝ ᠪᡠᠶᡝᠮᡝ᠈ ᡳᠨᡳ ᡤᡳᠰᡠᠨ ᠪᠠᡳ ᡝᠨᡝᠩᡤᡳ ᠠᠮᠪᡳ

•ᡴᠠᠷᠠᡴᡡ image_url
ᠪᡠᠮᠪᡳ ᡝᠮᡠ ᡩᠠᡵᠠᠮᡝ

ᠵᡠᠯᡠᠮᠪᡠᡵᡳ ᡩᠠᠨ ᡳ ᠳᠠᠨ ᡩᠠᡵᡤᠠᠨ.

ᠵᡠᠯᡤᡝ ᠵᡝᡵᡤᡳ output_format · points_per_side · pred_iou_thresh · stability_score_thresh · min_mask_region_area
output_format ᠵᡠᠯᡝ png

ᠪᡠᠶᡝᠮᡝ ᠵᡠᠴᡝᠨ ᡳ ᡶᡳᠯᡝ ᡳ ᠵᡠᠰᡝ᠉

ᠵᡠᠯᡝ 32

ᠳᠠᠨ ᡳ ᡝᠮᡠ ᠵᠠᠯᡳᠨ ᡳ ᠴᡠᠸᠠᠨ ᡳ ᠵᡠᠯᡝ ᠴᡠᠸᠠᠨ ᡳ ᠵᠠᠯᡳᠨ.

ᠵᡠᠯᡝ 0.88

ᠵᡠᠯᡝᠮᡝ ᠪᡠᠶᡝᠮᡝ IOU ᡳ ᠵᡠᠯᡝ.

ᠵᡠᠯᡝ 0.95

ᠵᠠᠯᡳᠨ ᡳ ᡩᠠᠶᠠᠨ ᡳ ᠵᡠᠯᡝ.

ᠵᡠᠯᡝ 100

ᠮᠠᠨᡤᡳ ᠵᡠᠯᡝ ᡩᠠᠨ ᡳ ᡩᠠᠶᠠᠨ.

POST /run/sam2/auto-segment?wait=20 ᠵᠠᠯᡳᠨ → $0.014
# 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/sam2/auto-segment?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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

ᡝᠨᡳ ᠵᠠᠯᡳᠨ ᠪᡝ ᠵᠠᠯᠠᠨᠠᠮᡝ

ᡳᠨᡝ ᠵᠠᠯᠠᠨ ᡝᡵᡝ ᠪᡠᡵᡝᠪᡝᡵᡳ ᡩᡝ ᠪᡳᠮᡝ᠈ Doitong API ᡩᡝ ᠵᡝᠯᡤᡳ ᡩᠠᡵᠠᠮᡝ᠈ Remember ᠵᡠᠯᡝᠮᡝ ᡤᡳᠯᠠᠮᡝ localStorage ᡩᡝ ᠰᡠᠯᡝᠮᡝ ᠪᡳᠮᡝ API ᠵᠠᠯᠠᠨ ᠠᠪᠠᠮᡝ

Segment Anything Model 2 · Auto Segment ᡠᡵᡝᠮᡝ

`image_url` ᡳ ᠠᡴᡡ ᡥᡡᠯᠠᠨ ᠴᡳ ᡤᠠᠳᠠᠨ ᠪᡝ ᠰᡝᠪᡝᠮᡝ, ᡝᠮᡠ ᠮᡠᠶᠠᡥᠠ ᠮᠠᠰᡴᠠ ᠪᠠ ᠮᠠᠰᡴᠠᠨ ᡳ ᠵᠠᠪᡠᠯᠠᠨ ᠪᡝ ᠪᡠᠶᡝᠮᡝ. `points_per_side` (ᠵᡠᠯᡝ 32), `pred_iou_thresh`, `stability_score_thresh` ᠪᠠ `min_mask_region_area` ᡩᡝ ᠵᠠᠯᡠᠪᡠᠮᡝ. ᠮᠠᠰᡴᠠ ᡳ ᡤᠠᠳᠠᠨ ᠪᡝ png ᠠᠮᠠᠯᠠ jpeg ᡩᡝ ᠵᠠᠰᡳᠨᠠ.

ᠵᠠᡴᡠᠨ

ᠵᠠᡴᡠᠨᡳ ᡤᡳᠰᡠᠨ ᠵᡝᠯᡤᡳ ᠠᠪᠠᠮᠪᡳ᠈ ᠨᡝᠮᡝ ᠮᡠᠰᡝ ᡠᠯᠠᠮᠪᡳ ᠵᠠᡴᡠᠨᡳ ᡤᡳᠰᡠᠨ

ᠵᡝᡵᡤᡳᡠᠯᠠᠮᡝ ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝᠠᠪᠠᠮᡝ ᠵᠠᠪᡠᠨ ᠵᠠᠯᠠᠨᡳ ᡤᡳᠰᡠᠨ
image_urlᡴᠠᠷᠠᡴᡡ image
ᡠᠯᠠᠮᡝurl · image
ᠵᡠᠯᡠᠮᠪᡠᡵᡳ ᡩᠠᠨ ᡳ ᠳᠠᠨ ᡩᠠᡵᡤᠠᠨ.
output_formatᠵᡠᠯᡝ
ᡠᠯᠠᠮᡝenum
ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝpng
jpegpng
ᠪᡠᠶᡝᠮᡝ ᠵᡠᠴᡝᠨ ᡳ ᡶᡳᠯᡝ ᡳ ᠵᡠᠰᡝ᠉
points_per_sideᠵᡠᠯᡝ
ᡠᠯᠠᠮᡝinteger
ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝ32
ᠳᠠᠨ ᡳ ᡝᠮᡠ ᠵᠠᠯᡳᠨ ᡳ ᠴᡠᠸᠠᠨ ᡳ ᠵᡠᠯᡝ ᠴᡠᠸᠠᠨ ᡳ ᠵᠠᠯᡳᠨ.
pred_iou_threshᠵᡠᠯᡝ
ᡠᠯᠠᠮᡝnumber
ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝ0.88
ᠵᡠᠯᡝᠮᡝ ᠪᡠᠶᡝᠮᡝ IOU ᡳ ᠵᡠᠯᡝ.
stability_score_threshᠵᡠᠯᡝ
ᡠᠯᠠᠮᡝnumber
ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝ0.95
ᠵᠠᠯᡳᠨ ᡳ ᡩᠠᠶᠠᠨ ᡳ ᠵᡠᠯᡝ.
min_mask_region_areaᠵᡠᠯᡝ
ᡠᠯᠠᠮᡝinteger
ᠵᠠᠯᠠᠨᡳ ᠵᡠᠯᡝ100
ᠮᠠᠨᡤᡳ ᠵᡠᠯᡝ ᡩᠠᠨ ᡳ ᡩᠠᠶᠠᠨ.
ᡴᠠᠷᠠᡴᡡ ᠵᠠᡴᡠᠨᡳ ᡤᡳᠰᡠᠨ᠈ ᠮᡠᠰᡝ ᡝᠮᡠ ᠠᠪᠠᠮᠪᡳ

ᠪᡠᠮᠪᡳᠯᡝᠰᡝ ᡝᠮᡠ ᡤᡝᠮᡠᠨᡳ https:// URL᠈ 10 MB ᡩᡝ ᡩᡝᠷᡤᡳ data: URI ᠵᡝᡵᡤᡳ ᡝᠮᡝ᠈ ᡳᠨᡝ ᠪᡠᠮᠪᡳᠯᡝᠰᡝᠨᡳ file_url ᠠᠪᠠᠮᠪᡳ ᠪᡠᠮᠪᡳ

ᠪᡠᠶᡝᠮᡝ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam2/auto-segment",
  "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": 14,
    "usd": "0.014",
    "charged": 14,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "combined_mask": {
      "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
    },
    "individual_masks": [
      {
        "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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ᡤᡝᠯᡝᠮᡝ ᡥᡡᠯᡤᡠᠨᡳ ᡳᠨᡠᡝᠯᡝᡥᡝ outputs[].url ᠰᡠᠯᡠᠨ ᡩᡝ ᠰᡳᡵᡝ ᡶᡳᠯᡝ᠈ ᠝ᠮᡤᡳ ᠮᡠᠰᡝ ᠠᠪᠠᠯᡳ ᠵᡝᠮᡤᡳᠨ GB-ᠪᡳᠶᠠ ᠵᡝᠮᡤᡳᠨ ᠪᡝ ᡝᠮᡠᠯᡝᠮᡝ ᠠᠪᠠᠯᡳ 7 ᡥᠠᠨ ᠰᡳᠯᡤᠠᠨ ᡩᡝ᠈ ᠰᡳᠨᡳ ᠪᠠᠯᠠᠨᠰᡳ ᠵᡠᠶᡝᡵᡝᠨ ᠠᠪᠠᠯᡳ ?storage= ᡩᡝ ᡝᠵᡝᠨ ᡥᠠᠯᠠᠮᡝ᠉
ᡝᠮᡠ ᡤᡳᠰᡠᠨ ᡝᠮᡠ ᠮᠣᡩᡝᠯ ᡩᡝtype, url, content_type, width, height ᠮᠠᠩᡤᡳ duration᠈ ᠵᠠᠯᠠᠨ᠈ ᠪᡠᠵᡠᠮᠪᡳ ᠮᠠᠩᡤᡳ ᠵᡝᡵᡤᡳ ᡩᡝᠨᡳ᠈ output ᠮᠣᡩᡝᠯᡳᠨᡳ ᡝᠮᡠ ᠵᠠᠯᠠᠨ
ᠪᡠᠶᡝᠮᡝᠨᡳ ᡤᡳᠰᡠᠨ
combined_mask
object {url, content_type, file_name, file_size, width, height}ᠮᡠᠶᠠᡥᠠᠨ ᡳ ᠵᡠᠯᡝᠮᡝ ᠪᡠᠶᡝᠮᡝ ᠮᠠᠰᡴᠠ.
individual_masks
array of object {url, content_type, file_name, file_size, width, height}ᡝᠮᡠ ᡝᠮᡠ ᠮᠠᠰᡴᠠ.

ᡝᠯᡤᡳ ᡩᠠᠯᡳᠨ: ᡤᠠᠳᠠᠨ ᠵᠠᠰᡳᠨ

AI ᠠᡤᡝᠨᡨᡳ ᡠᠴᡠᠷᡳ᠈ ᡝᡵᡝ ᡩᡝᠪᡝᡵᡳ Markdown ᠰᡳᠨᡩᠠᡵᡳ https://doitong.com/mnc/developers/models/sam2/auto-segment.md. ᡝᡵᡝ ᠮᠣᡩᡝᠯ ᠵᠠᡴᡠᠨ ᠰᡠᠯᡠᠮᡝ https://doitong.com/developers/llms.txt