Model API'si

SAM 3.1 Image

SAM 3.1 ile görseldeki nesneleri seçip maske çıkar.

Model kimliği

Her istekte bunu kullan
sam-3-1/image

Çalıştır

Girdiye ücret teklifi al, bu teklifle üretimi başlat, ardından işin durumunu sorgula. Önce RAYWAKE_API_KEY değişkenini ayarla; ayrıntılar için Kimlik doğrulama sayfasına bak.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sam-3-1/image",
  "input": {
    "image_url": "https://example.com/input.png",
    "prompt": "A red ceramic cup on a wooden table, soft morning light"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "sam-3-1/image", "quote_id": "QUOTE_ID", "input": {"image_url":"https://example.com/input.png","prompt":"A red ceramic cup on a wooden table, soft morning light"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Girdi

sam-3-1/image girdi alanları
AlanTürAçıklama
image_urlzorunlustring (image URL)
URL of the image to be segmented
promptstring
Text prompt for segmentation

Varsayılan: wheel

point_promptsarray of objects
List of point prompts
box_promptsarray of objects
Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects.
apply_maskboolean
Apply the mask on the image.

Varsayılan: true

sync_modeboolean
If True, the media will be returned as a data URI.

Varsayılan: false

output_formatstring (enum)
The format of the generated image.

Varsayılan: png

Seçenekler: jpeg, png, webp

return_multiple_masksboolean
If True, upload and return multiple generated masks as defined by `max_masks`.

Varsayılan: false

max_masksnumber (enum)
Maximum number of masks to return when `return_multiple_masks` is enabled.

Varsayılan: 3

Seçenekler: 3

include_scoresboolean
Whether to include mask confidence scores.

Varsayılan: false

include_boxesboolean
Whether to include bounding boxes for each mask (when available).

Varsayılan: false

Çıktı

Başarılı bir iş, sonuçlarını outputs altında listeler; dosyalar bizim tarafımızda saklanır. Tüm alanlar için İşler sayfasına bak.

İş yanıtından bir bölüm
"outputs": [
  { "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]

Fiyatlandırma

  • 1 istek$0,02/ istek

Girdinin kesin ücreti ücret teklifinden gelir. Bakiye nasıl kesinleşir?