{"slug":"Ben2","routeSlug":"ben2","name":"Ben2","developer":"Prama LLC","modality":"image","inferenceTypes":["img-rmbg"],"surface":"native-v2","infrastructure":"native-fleet","planRequired":"basic","status":"standard_model","tags":["Native GPU Fleet"],"description":"Instantly isolate subjects from backgrounds with boundary-aware precision.","useCases":["Run Ben2 via unified v2 jobs with free pre-run /price quotes","Low-latency pay-as-you-go inference on direct GPU capacity"],"samplePrompt":"Upload any image to instantly remove its background","pricing":{"unit":"Per image resolution","headlineRate":"$0.0006 / 1080p image","hasLiveQuoteEndpoint":true,"quoteEndpoint":"/api/v2/quote","isEstimated":false,"notes":"Boundary-aware transparent PNG cutouts."},"specs":{},"links":{"html":"https://runstage.dev/models/ben2","markdown":"https://runstage.dev/models/ben2.md","json":"https://runstage.dev/models/ben2.json","playground":"https://runstage.dev/playground?model=Ben2"},"snippets":{"curl":"# 1. Free pre-run retail quote\ncurl -X POST 'https://runstage.dev/api/v2/quote' \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"Ben2\",\"width\":1024,\"height\":1024}'\n\n# 2. Submit metered image upload job (PNG, JPEG, WebP, GIF, or BMP up to 10 MB)\ncurl -X POST 'https://runstage.dev/api/v2/run' \\\n  -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  --form-string 'model=Ben2' \\\n  -F \"image=@input.png\"\n\n# 3. Poll owner-scoped job result until status is \"done\" or \"failed\"\ncurl -H \"Authorization: Bearer $RUNSTAGE_API_KEY\" \\\n  'https://runstage.dev/api/v2/jobs/<request_id>'","typescript":"import { readFile } from \"node:fs/promises\";\n\nconst authHeader = `Bearer ${process.env.RUNSTAGE_API_KEY}`;\n\n// 1. Free pre-run retail quote\nconst quote = await fetch(\"https://runstage.dev/api/v2/quote\", {\n  method: \"POST\",\n  headers: { \"Content-Type\": \"application/json\" },\n  body: JSON.stringify({\n  \"model\": \"Ben2\",\n  \"width\": 1024,\n  \"height\": 1024\n}),\n}).then((r) => r.json());\nconsole.log(\"Quoted USD:\", quote.data?.price);\n\n// 2. Submit metered multipart image upload (up to 10 MB)\nconst form = new FormData();\nform.append(\"model\", \"Ben2\");\nform.append(\"image\", new Blob([await readFile(\"input.png\")], { type: \"image/png\" }), \"input.png\");\n\nconst job = await fetch(\"https://runstage.dev/api/v2/run\", {\n  method: \"POST\",\n  headers: { Authorization: authHeader },\n  body: form,\n}).then((r) => r.json());\n\n// 3. Poll owner-scoped job status until terminal\nlet result;\nfor (let i = 0; i < 60; i++) {\n  result = await fetch(`https://runstage.dev/api/v2/jobs/${job.data.request_id}`, {\n    headers: { Authorization: authHeader },\n  }).then((r) => r.json());\n  if ([\"done\", \"failed\", \"refunded\"].includes(result.data?.status)) break;\n  await new Promise((r) => setTimeout(r, 2000));\n}\nconsole.log(\"Status:\", result?.data?.status, result?.data?.result_url);","python":"import os, time, requests\n\nheaders = {\"Authorization\": f\"Bearer {os.environ['RUNSTAGE_API_KEY']}\"}\n\n# 1. Free pre-run retail quote\nquote = requests.post(\n    \"https://runstage.dev/api/v2/quote\",\n    json={\n    \"model\": \"Ben2\",\n    \"width\": 1024,\n    \"height\": 1024\n},\n    timeout=15,\n).json()\nprint(\"Quoted USD:\", quote[\"data\"][\"price\"])\n\n# 2. Submit metered multipart image upload (up to 10 MB)\nwith open(\"input.png\", \"rb\") as img_file:\n    job = requests.post(\n        \"https://runstage.dev/api/v2/run\",\n        headers=headers,\n        data={\n        \"model\": \"Ben2\"\n},\n        files={\"image\": (\"input.png\", img_file, \"image/png\")},\n        timeout=30,\n    ).json()\njob_id = job[\"data\"][\"request_id\"]\n\n# 3. Poll owner-scoped job status until terminal\nresult = None\nfor _ in range(60):\n    result = requests.get(f\"https://runstage.dev/api/v2/jobs/{job_id}\", headers=headers, timeout=15).json()\n    if result[\"data\"][\"status\"] in (\"done\", \"failed\", \"refunded\"):\n        break\n    time.sleep(2)\nprint(\"Status:\", result[\"data\"][\"status\"], result[\"data\"].get(\"result_url\"))"}}