コンテンツへスキップ

Sam 3 1 · Image

統合

モデルID sam-3-1/image
# 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/sam-3-1/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

このリクエスト: ≈$0.01 10 APIクレジット · ≈ ₽1.05 このページで実行

APIキーを取得
Meta 画像編集 #segmentation#mask#real-time

テキスト、ポイント、ボックスプロンプトによるSAM 3.1画像セグメンテーション。マスク画像を返す

Meta · 画像

最初の結果がここに表示されます

以下でリクエストを作成し、APIキーで実行してください。出力はストレージにコピーされ、永久保存または無料で7日保存されます。

リクエストを作成

コントロールはモデルスキーマから生成されます。値を変更するとコードと価格が更新されます。

デフォルト wheel

セグメンテーションを誘導するテキスト指示。

•必須 image_url
ファイルをドロップ、または

セグメンテーション対象の画像を指すURL。

詳細設定 output_format · max_masks · apply_mask · return_multiple_masks · include_scores · include_boxes · point_prompts · box_prompts
output_format デフォルト png

結果の画像のファイル形式。

デフォルト 3

`return_multiple_masks` が有効な場合に返すマスク数の上限。

デフォルト []

点ベースのプロンプトのコレクション。

デフォルト []

object_idでグループ化を決めるボックスプロンプト。一致するIDはボックスを1つのオブジェクトに関連付け、空のIDは別々のオブジェクトを表します。複数のボックスを指定でき、それぞれに座標 (x_min, y_min, x_max, y_max) を使用します。

POST /run/sam-3-1/image?wait=20 見積もり → $0.01
# 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/sam-3-1/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

このリクエストを実行

キーはこのブラウザ内に保持されます。Doitong APIにのみ送信され、「記憶する」にチェックを入れた場合のみlocalStorageに保存されます。 APIキーを取得

Sam 3 1 · Imageについて

テキスト`prompt`、`point_prompts`、`box_prompts`を使用して、SAM 3.1で1枚の画像をセグメント化します。複数のボックスをobject_idごとにオブジェクトとしてまとめられます。`return_multiple_masks`は最大`max_masks`(1~32)のマスクを返し、スコアとバウンディングボックスを任意で含められます。出力形式はjpeg、png、webpです。

パラメータ

正式名称またはネイティブ名のいずれか一方を送信してください。両方は送信しないでください。 正式名称

名前型 デフォルト許可される値 説明
image_url必須 image
型url · image
セグメンテーション対象の画像を指すURL。
prompt任意
型string
デフォルトwheel
セグメンテーションを誘導するテキスト指示。
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はボックスを1つのオブジェクトに関連付け、空のIDは別々のオブジェクトを表します。複数のボックスを指定でき、それぞれに座標 (x_min, y_min, x_max, y_max) を使用します。
box_prompts[].x_min任意
型integer | null
ボックスの最小 x 座標。
box_prompts[].y_min任意
型integer | null
ボックスの最小 y 座標。
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-1/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": 10,
    "usd": "0.01",
    "charged": 10,
    "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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ファイルの保存期間を選択すべてのoutputs[].urlはストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、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/ja/developers/models/sam-3-1/image.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt