Hormouz AIHormouzSign in

grounded_sam: image generation model

Grounded SAM returns segmentation masks for whatever you name in a text prompt — "clothes,shoes", "car" — built on Grounding DINO and Segment Anything. Four mask images per run, served asynchronously from inside Iran through Hormouz.

Pricing:
~$0.000975 / sec (Nvidia L40S GPU)
Type:
image
  • Image generation

Grounded SAM combines Grounding DINO, a zero-shot detector that turns free text into bounding boxes, with Segment Anything, which turns those boxes into pixel-precise masks. You describe what to find in mask_prompt as a comma-separated list, optionally what to subtract in negative_mask_prompt, and get back the combined mask. It was built for clothing segmentation in virtual try-on and works the same way for any object a detector can name.

Served through Hormouz behind an asynchronous predictions API. The required input is image; mask_prompt defaults to "clothes,shoes" and negative_mask_prompt to "pants", so pass an empty string for the negative prompt if you want nothing subtracted. adjustment_factor grows (positive) or shrinks (negative) the mask by that many pixels. The output is four images in a fixed order: the input annotated with the positive mask, the input annotated with the negative mask, the mask itself (white where matched), and the inverted mask. The third and fourth are what an inpainting model expects as its mask input.

Billed on GPU time on an Nvidia L40S at $0.000975 per second. A typical run takes two to five seconds, roughly $0.002 to $0.005 per call. Hormouz reserves a small amount when the request is admitted and returns the difference once the job settles, so the reservation you see is larger than the final charge.

Hormouz provides stable access to this model from inside Iran, with no foreign credit card and no circumvention tooling.

Quickstart

# Create the prediction, then poll until succeeded
curl -s https://api.hormouz.net/v1/predictions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":"schananas/grounded_sam","input":{"image":"https://example.com/input.jpg"}}'

Specs

VendorSchananas
TypeImage
Context window—
Pricing~$0.000975 / sec (Nvidia L40S GPU)
APIpredictions

Code example

cURL
# Create the prediction, then poll until succeeded
curl -s https://api.hormouz.net/v1/predictions \
  -H "Authorization: Bearer ng-YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version":"schananas/grounded_sam","input":{"image":"https://example.com/input.jpg"}}'
Python
import requests
BASE = "https://api.hormouz.net/v1"
H = {"Authorization": "Bearer ng-YOUR_API_KEY", "Content-Type": "application/json"}
r = requests.post(f"{BASE}/predictions", headers=H,
    json={"version": "schananas/grounded_sam", "input": {"image":"https://example.com/input.jpg"}})
print(r.json()["id"])
JavaScript
const BASE = "https://api.hormouz.net/v1";
const res = await fetch(`${BASE}/predictions`, {
  method: "POST",
  headers: { Authorization: "Bearer ng-YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ version: "schananas/grounded_sam", input: {"image":"https://example.com/input.jpg"} }),
});
const { id } = await res.json();

Buy the grounded_sam API, paid in rial

  • Buy credit with an Iranian bank card; no foreign card or account needed.
  • One Hormouz key reaches grounded_sam and 600+ other models, and you pay only for what you use.
  • No VPN and no risk of a banned account; just change the base URL to api.hormouz.net/v1.
Create an account

Use via Hormouz

Connect to this model and 600+ others with one API key, then see usage down to each request.

Request company access

Updated 2026-10-13