Prepare and render a product
keyshot_product_renderRun a complete product rendering pipeline in one headless KeyShot process: import or open models, assign materials, configure camera and environment, save scene, and render one or all cameras.
Instructions
Run a complete product workflow in one headless process: open or import, assign materials, configure camera and environment, save a scene copy, and render one or all cameras.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| up | No | Optional camera up direction [x, y, z]. Requires position and lookAt. | |
| width | No | Render width in pixels. Overrides the selected quality preset when provided. | |
| format | No | Output image format. Defaults to PNG when omitted. | |
| height | No | Render height in pixels. Overrides the selected quality preset when provided. | |
| lookAt | No | Camera target [x, y, z]. Must be provided together with position. | |
| samples | No | Maximum render samples. Cannot be combined with maxTimeSeconds and overrides preset sampling when provided. | |
| distance | No | Positive KeyShot camera distance applied after the transform or preset. | |
| position | No | Camera position [x, y, z]. Must be provided together with lookAt. | |
| rotation | No | Environment rotation in degrees, from 0 inclusive to 360 exclusive. | |
| modelPath | No | Absolute path to a model to import. Provide exactly one modelPath or scenePath. | |
| outputDir | No | All-cameras output directory. Invalid with single mode; a safe directory is generated when omitted. | |
| overwrite | No | Allow replacement of explicitly selected output files. Defaults to false. | |
| scenePath | No | Absolute path to an existing KeyShot scene. Provide exactly one scenePath or modelPath. | |
| brightness | No | Positive brightness multiplier for the active environment. | |
| cameraName | No | Camera to create, update, or activate. New model workflows default to Product Hero. | |
| outputPath | No | Single-mode image destination. Invalid with allCameras mode; a safe name is generated when omitted. | |
| renderMode | No | Render one active or named camera, or discover and render every saved camera. Defaults to single. | single |
| fieldOfView | No | Camera field of view in degrees, greater than 0 and less than 180. Cannot be combined with focalLength. | |
| focalLength | No | Camera focal length from 5 to 200 mm. Cannot be combined with fieldOfView. | |
| snapToGround | No | Place imported geometry on the ground. Applies only to modelPath sources and defaults to true for new models. | |
| baseScenePath | No | Optional KeyShot base scene used only when modelPath is provided. | |
| qualityPreset | No | Render quality preset: preview (960x540, 16 samples), standard (1920x1080, 64 samples), or final (3840x2160, 256 samples). | |
| centerGeometry | No | Center imported geometry. Applies only to modelPath sources and defaults to true for new models. | |
| maxTimeSeconds | No | Maximum render time in seconds. Selects time-based rendering and cannot be combined with samples. | |
| continueOnError | No | In allCameras mode, continue after one camera fails. Defaults to true. | |
| environmentName | No | Environment name from the KeyShot library. Cannot be combined with environmentPath. | |
| environmentPath | No | Absolute path to a local KeyShot environment file. Cannot be combined with environmentName. | |
| outputScenePath | No | Destination for the prepared scene. A safe numbered name is generated when omitted. | |
| cameraPresetName | No | Configured camera preset to apply. Cannot be combined with a custom position/lookAt pair. | |
| adjustEnvironment | No | Adjust the environment after model import. Applies only to modelPath sources and defaults to true for new models. | |
| adjustCameraLookAt | No | Retarget the camera after model import. Applies only to modelPath sources and defaults to true for new models. | |
| materialAssignments | No | Object-specific material changes applied before camera and environment setup. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the requested operation completed successfully. | |
| data | No | Operation-specific structured result data, or null when unavailable. | |
| error | Yes | Human-readable failure reason, or null after success. | |
| warnings | Yes | Non-fatal conditions the user or agent should review. | |
| errorCode | No | Stable error category for common failures. | |
| outputFiles | Yes | Absolute paths of images or scene files created by the operation. | |
| suggestions | No | Actionable recovery steps for the user or agent. | |
| keyshotStdoutTail | Yes | Truncated tail of KeyShot headless output for diagnostics. |