सामग्री पर जाएँ

Segment Anything Model 3

इंटीग्रेट करें

मॉडल id sam-3/image
# 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/sam-3/image?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.005 5 API क्रेडिट इसे इस पेज पर चलाएँ

API कुंजी प्राप्त करें
Meta इमेज एडिटिंग #segmentation#mask#real-time

टेक्स्ट, पॉइंट या बॉक्स प्रॉम्प्ट से छवि सेगमेंटेशन, जो मास्क छवियाँ तथा वैकल्पिक स्कोर और बॉक्स लौटाता है

Meta · इमेज

आपका पहला परिणाम यहाँ आएगा

नीचे एक अनुरोध बनाएँ और उसे अपनी API कुंजी से चलाएँ। आउटपुट हमारे स्टोरेज में कॉपी किए जाते हैं और हमेशा के लिए या 7 दिन तक मुफ़्त में रखे जाते हैं।

अनुरोध बनाएँ

कंट्रोल मॉडल स्कीमा से जनरेट होते हैं। इन्हें बदलने पर कोड और कीमत अपडेट होती है।

डिफ़ॉल्ट wheel

सेगमेंटेशन का मार्गदर्शन करने वाला टेक्स्ट निर्देश।

•आवश्यक image_url
फ़ाइल ड्रॉप करें, या

सेगमेंटेशन के लिए इमेज की ओर संकेत करने वाला URL।

उन्नत text_prompt · output_format · max_masks · apply_mask · return_multiple_masks · include_scores · include_boxes · point_prompts · box_prompts

[DEPRECATED] पुराने संस्करणों के साथ संगतता के लिए रखा गया पुराना इनपुट; इसकी जगह 'prompt' का उपयोग करें।

output_format डिफ़ॉल्ट png

परिणामी इमेज का फ़ाइल फ़ॉर्मैट।

डिफ़ॉल्ट 3

`return_multiple_masks` सक्षम होने पर लौटाए जाने वाले मास्क की अधिकतम सीमा।

डिफ़ॉल्ट []

पॉइंट-आधारित प्रॉम्प्ट का संग्रह।

डिफ़ॉल्ट []

वे बॉक्स प्रॉम्प्ट जिनका object_id समूह निर्धारित करता है: समान ID वाले बॉक्स एक ऑब्जेक्ट से संबद्ध होते हैं, जबकि खाली ID अलग-अलग ऑब्जेक्ट दर्शाती हैं। कई बॉक्स दिए जा सकते हैं, प्रत्येक में (x_min, y_min, x_max, y_max) कोऑर्डिनेट का उपयोग होता है।

POST /run/sam-3/image?wait=20 कोटेशन → $0.005
# 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/sam-3/image?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"

यह अनुरोध चलाएँ

आपकी key इसी ब्राउज़र में रहती है: इसे केवल Doitong API को भेजा जाता है और केवल तभी (localStorage) में सेव किया जाता है जब आप Remember चुनते हैं। API कुंजी प्राप्त करें

Segment Anything Model 3 के बारे में

टेक्स्ट `prompt`, `point_prompts` या `box_prompts` से SAM 3 द्वारा छवि को सेगमेंट करता है। `return_multiple_masks` सक्षम होने पर यह अधिकतम `max_masks` मास्क (1 से 32) लौटाता है। वैकल्पिक कॉन्फिडेंस स्कोर और बाउंडिंग बॉक्स शामिल किए जा सकते हैं। आउटपुट फ़ॉर्मैट jpeg, png या webp है।

पैरामीटर

कैनोनिकल नाम या नेटिव नाम में से कोई एक भेजें, दोनों नहीं। कैनोनिकल नाम

नामप्रकार डिफ़ॉल्टअनुमत विवरण
image_urlआवश्यक image
प्रकारurl · image
सेगमेंटेशन के लिए इमेज की ओर संकेत करने वाला URL।
promptवैकल्पिक
प्रकारstring
डिफ़ॉल्टwheel
सेगमेंटेशन का मार्गदर्शन करने वाला टेक्स्ट निर्देश।
text_promptवैकल्पिक
प्रकारstring | null
[DEPRECATED] पुराने संस्करणों के साथ संगतता के लिए रखा गया पुराना इनपुट; इसकी जगह 'prompt' का उपयोग करें।
point_promptsवैकल्पिक
प्रकारobject[]
डिफ़ॉल्ट[]
पॉइंट-आधारित प्रॉम्प्ट का संग्रह।
point_prompts[].xवैकल्पिक
प्रकारinteger | null
X अक्ष पर प्रॉम्प्ट की स्थिति।
point_prompts[].yवैकल्पिक
प्रकारinteger | null
Y अक्ष पर प्रॉम्प्ट की स्थिति।
point_prompts[].labelवैकल्पिक
प्रकारenum
01
फ़ोरग्राउंड/बैकग्राउंड लेबल: 1 फ़ोरग्राउंड दर्शाता है; 0 बैकग्राउंड दर्शाता है।
point_prompts[].object_idवैकल्पिक
प्रकारinteger | null
एक ऑब्जेक्ट को परिष्कृत करने वाले प्रॉम्प्ट को समूहित करने वाला वैकल्पिक पहचानकर्ता। यदि टेक्स्ट भी प्रॉम्प्ट के रूप में दिया गया है, तो यह पहचानकर्ता निर्धारित करता है कि पहचाने गए किस ऑब्जेक्ट को वे पॉइंट परिष्कृत करेंगे।
point_prompts[].frame_indexवैकल्पिक
प्रकारinteger | null
इंटरैक्शन के लिए फ़्रेम की पहचान करने वाला इंडेक्स।
box_promptsवैकल्पिक
प्रकारobject[]
डिफ़ॉल्ट[]
वे बॉक्स प्रॉम्प्ट जिनका object_id समूह निर्धारित करता है: समान ID वाले बॉक्स एक ऑब्जेक्ट से संबद्ध होते हैं, जबकि खाली ID अलग-अलग ऑब्जेक्ट दर्शाती हैं। कई बॉक्स दिए जा सकते हैं, प्रत्येक में (x_min, y_min, x_max, y_max) कोऑर्डिनेट का उपयोग होता है।
box_prompts[].x_minवैकल्पिक
प्रकारinteger | null
बॉक्स के लिए न्यूनतम x-coordinate।
box_prompts[].y_minवैकल्पिक
प्रकारinteger | null
बॉक्स के लिए न्यूनतम y-coordinate।
box_prompts[].x_maxवैकल्पिक
प्रकारinteger | null
बॉक्स का अधिकतम X कोऑर्डिनेट।
box_prompts[].y_maxवैकल्पिक
प्रकारinteger | null
बॉक्स का अधिकतम Y कोऑर्डिनेट।
box_prompts[].object_idवैकल्पिक
प्रकारinteger | null
एक ऑब्जेक्ट को परिष्कृत करने वाले बॉक्स को समूहित करने वाला वैकल्पिक पहचानकर्ता।
box_prompts[].frame_indexवैकल्पिक
प्रकारinteger | null
इंटरैक्शन के लिए फ़्रेम की पहचान करने वाला इंडेक्स।
apply_maskवैकल्पिक
प्रकारboolean
डिफ़ॉल्टtrue
नियंत्रित करता है कि इमेज पर मास्क लागू किया जाए या नहीं।
output_formatवैकल्पिक
प्रकारenum
डिफ़ॉल्टpng
jpegpngwebp
परिणामी इमेज का फ़ाइल फ़ॉर्मैट।
return_multiple_masksवैकल्पिक
प्रकारboolean
डिफ़ॉल्टfalse
एकाधिक-मास्क रिटर्न विकल्प: इसे सक्षम करने पर `max_masks` यह निर्धारित करता है कि कितने निर्मित मास्क अपलोड करके रिस्पॉन्स में शामिल किए जाएँ।
max_masksवैकल्पिक
प्रकारinteger
डिफ़ॉल्ट3
1 – 32
`return_multiple_masks` सक्षम होने पर लौटाए जाने वाले मास्क की अधिकतम सीमा।
include_scoresवैकल्पिक
प्रकारboolean
डिफ़ॉल्टfalse
मास्क के लिए कॉन्फ़िडेंस स्कोर शामिल किए जाएँ या नहीं, इसे नियंत्रित करता है।
include_boxesवैकल्पिक
प्रकारboolean
डिफ़ॉल्टfalse
उपलब्ध होने पर प्रत्येक मास्क के लिए बाउंडिंग बॉक्स शामिल किया जाए या नहीं, इसे नियंत्रित करता है।
आवश्यक कैनोनिकल नाम, यह भी स्वीकार्य है

फ़ाइल पैरामीटर में सार्वजनिक https:// URL, 10 MB तक का data: URI, या अपलोड का file_url लिया जाता है। फ़ाइलें

आउटपुट

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "sam-3/image",
  "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": 5,
    "usd": "0.005",
    "charged": 5,
    "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
    },
    "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
      }
    ],
    "metadata": [
      {
        "index": 1,
        "score": 1.0,
        "box": [
          1.0
        ]
      }
    ],
    "scores": [
      1.0
    ],
    "boxes": [
      [
        1.0
      ]
    ]
  },
  "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"
  }
}
आपकी फ़ाइलें, आपकी पसंदहर outputs[].url हमारे स्टोरेज में एक कॉपी है: हमेशा के लिए (प्रति GB-माह भुगतान) या 7 दिन तक मुफ़्त में, आपके अकाउंट की सेटिंग या ?storage= के अनुसार।
हर मॉडल पर एक जैसा आकारइमेज, वीडियो और ऑडियो सभी के लिए type, url, content_type, width, height और duration। output मॉडल का अपना परिणाम ऑब्जेक्ट है।
आउटपुट के फ़ील्ड
image
object {url, content_type, file_name, file_size, width, height} | nullप्राथमिक सेगमेंटेशन मास्क दिखाने वाला प्रीव्यू।
masks
array of object {url, content_type, file_name, file_size, width, height}सेगमेंटेशन मास्क वाली इमेज।
metadata
array of object {index, score, box} | nullप्रत्येक मास्क का मेटाडेटा, जिसमें उसका स्कोर और बॉक्स शामिल हैं।
scores
array of number | nullप्रत्येक मास्क का कॉन्फ़िडेंस स्कोर, अनुरोध किए जाने पर प्रदान किया जाता है।
boxes
array of array of number | nullप्रत्येक मास्क के सामान्यीकृत बॉक्स, अनुरोध किए जाने पर [cx, cy, w, h] के रूप में दिए जाते हैं।

और मॉडल: इमेज एडिटिंग

AI एजेंट के लिए: इस पेज का Markdown यहाँ है https://doitong.com/hi/developers/models/sam-3/image.md. सभी मॉडल और गाइड: https://doitong.com/developers/llms.txt