Call it
curl https://api.peume.com/v1/call/convert-and-optimize-model \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"format": "GLTF"
}
}'const res = await fetch("https://api.peume.com/v1/call/convert-and-optimize-model", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"format": "GLTF"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/convert-and-optimize-model",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"format": "GLTF"
}
},
)
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: convert-and-optimize-model.
Parameters
input_run_idstringrunId of one of YOUR OWN earlier, successful runs that generated a 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 or /multiview-to-model/p-series.
inputstringA model file instead (GLB, GLTF, FBX, OBJ, STL; ≤ 150 MB): a public https URL — e.g. a model_url from an earlier run — or a file_ token from /files/presign.
formatRequiredstringTarget: GLTF (web), FBX (Unity / Unreal), USDZ (Apple AR), OBJ, STL or 3MF (printing).
GLTF · FBX · USDZ · OBJ · STL · 3MF
force_symmetrybooleanForce symmetry (only with quad: true).
bakebooleanBake advanced materials into base textures (default true).
pack_uvbooleanPack all UVs into one layout.
export_vertex_colorsbooleanInclude vertex colors (OBJ and GLTF only).
with_animationbooleanKeep skeleton and animation data (default true).
animate_in_placebooleanIn-place animation (no root motion).
part_namesarrayOnly export these parts (from /mesh/segment).
export_orientationstringForward axis (default +x).
+x · -x · +y · -y
fbx_presetstringFBX import preset (default blender).
blender · 3dsmax · mixamo · bake_scale
texture_packagingstringFBX only: textures embedded, or a zip with a texture folder.
embedded · zip
quadbooleanQuad mesh (output forced to FBX).
face_limitintegerMax faces (default: keep the original count).
flatten_bottombooleanFlatten the bottom.
flatten_bottom_thresholdnumberFlattening depth threshold (default 0.01).
texture_sizeintegerDiffuse texture size in pixels (default 4096).
texture_formatstringTexture image format (default JPEG).
JPEG · PNG · WEBP · BMP · DPX · HDR · OPEN_EXR · TARGA · TIFF
pivot_to_center_bottombooleanMove the pivot to the bottom center.
scale_factornumberScale the exported model (default 1).
