Current Apexify.js 6.0.0 documentation for renderScene.
apexify.jsRuntime: nodeCURRENTSince 6.0.0
renderScene(input: SceneRenderInput, options?: SceneRenderOptions): Promise<Buffer> validates and renders a scene to PNG bytes.
Validation is mandatory. The deprecated validate option may still appear in older TypeScript code for source compatibility, but it is ignored and cannot disable safety checks. Use maxSurfaceDepth only to impose a stricter nesting cap than the configured runtime limit.
Use the painter method when you want to reject a payload before entering a larger workflow. Rendering performs the same validation again at its boundary.
renderScene resolves string asset references through painter.assets by default. Pass { resolveAssetRefs: false } only when the scene is already resolved or $ must remain literal data.
Builder asset resolution is off by default. Use .render({ resolveAssetRefs: true }) for builders created by painter.createScene() when the snapshot contains $ references.
Scene validation/resource failures retain their structured Apexify error types such as ApexifyInputError and ApexifyResourceLimitError. Unexpected rendering/decode failures become ApexifyDecodeError with the original cause preserved.
Validation covers scene budgets and known domain inputs, but application-level policy still belongs to your application—for example, whether a particular local file path should be permitted.