Call it
curl https://api.peume.com/v1/call/segment-image-or-model-parts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"seg_type": "image"
}
}'const res = await fetch("https://api.peume.com/v1/call/segment-image-or-model-parts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"seg_type": "image"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/segment-image-or-model-parts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"seg_type": "image"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: segment-image-or-model-parts.
Parameters
seg_typeRequiredstringRequired. image ($0.85): segment a picture; model ($0.55): segment a GLB, needs transform.
image · model
input_run_idstringrunId of one of YOUR OWN successful runs. image: /text-to-image/generate, /image-to-image/generate, /text-to-model/h-series or /text-to-model/p-series; model: /text-to-model/h-series, /text-to-model/p-series, /image-to-model/h-series, /image-to-model/p-series, /multiview-to-model/h-series, /multiview-to-model/p-series, /model/texture, /model/convert, /model/convert-advanced, /model/import, /mesh/segment, /mesh/complete, /mesh/decimate, /mesh/uv-unwrap, /animation/rig or /animation/retarget. For a /mesh/smart-segment result pass its seg_model_url as input.
inputstringA file instead: an image (PNG / JPEG / WebP) for image, a GLB for model — public https URL or file_ token.
granularitystringHow finely to split (default medium).
coarse · medium · fine
hintstringWhich parts to look for, e.g. wheels, doors.
transformarraymodel only, required: column-major 4×4 matrix, e.g. identity [1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1].
