Resources

API – Renders

API Base URL: https://api-platform.vntana.com

For a collection of all Endpoints in our Admin API, view the documentation here. To view the collection of Public Endpoints, view the documentation hereNote: In the following guide and aforementioned documentation, you will see referenced in numerous Endpoints something called a Client. This refers to the folders one can create on the Platform within an Organization. The Client nomenclature is a legacy reference being replaced with Folder. These will be referenced as Client / Folder in all guides.

Triggering Renders

With the opening of the render capabilities beyond just the auto-render behavior, the ability to trigger, track, and download renders has been opened to the API. The API allows you to initiate the processing of new renders with a single simple request. This will take in the settings for both still image renders and the turntable.

To trigger new renders, call this endpoint:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Method: POST
Endpoint: /v1/products/renders
Headers: { x-auth-token : ‘Bearer ‘ + refreshToken }
Body: {
“productUuids”: [
“”
],
“imageWidth”: 1920,
“imageHeight”: 1080,
“imageFormat”: “PNG”,
“turntable”: {
“includeGif”: true,
“imageCount”: 120,
“frameRate”: 30,
“width”: 1920,
“height”: 1080
}
}
  • productUuids – [required] A list of all productUuid’s that you wish to generate new renders for.

  • imageWidth – [required] The width of the still image renders.

  • imageHeight – [required] The height of the still image renders.

  • imageFormat – [required] The file format the renders should be produced in. Options: ["PNG", "JPG", "WEBP"]

  • turntable – [required] Object containing settings for the turntable generation

    • includeGif – [required] Indicates whether a gif should also be generated. The mp4 will always generate.

    • imageCount – [required] Indicates how many frames should be generated for the 360 view.

    • frameRate – [required] Indicates how many frames per second the turntable should be produced at. frameRate and imageCount together determine the length of the mp4/gif.

    • width – [required] indicates the width of the frames

    • height – [required] indicates the height of the frames

A successful response will return a list of the productUuid’s that the renders were triggered for, as well as any errors that may have occurred:

1
2
3
4
5
6
7
8
9
10
{
“success”: true,
“errors”: [],
“response”: {
“uuids”: [
“”
],
“errors”: null
}
}

Once the renders have been triggered it can be tracked via webhooks or simply by polling the Attachments API to see if new renders are available.

Postman

You can test triggering renders using the below Postman collection. It contains the necessary endpoints for authentication as well as the render endpoint. The individual endpoints can be run separately, or as a collection, just make sure to add the necessary credentials. For the render endpoint, you can add a list of productUuid’s to trigger the rendering on, as well as change the settings as laid out above. For more information on running any of our Postman collections, see this guide.

Downloading Renders

The renders/turntables that are generated can be downloaded using the API as well. The files are classified as Attachments even though they are displayed in their own section of the Asset Details page, and as such can be retrieved via the Attachments API. To learn more about downloading renders see this guide.

Tracking Status via Webhooks

The status of renders can be tracked using Webhook events. There are separate events for the image renders and the turntable generation. You can learn more about using Webhooks by visiting this guide.

Render Events
				
					renders.pending
renders.processing
renders.completed
renders.failed
				
			
Turntable Events
				
					turntable.pending
turntable.processing
turntable.completed
turntable.failed
				
			

The data sent by the Webhooks POST request is largely the same for any event, with most differences being related to optimization status of an Asset. As such, you should expect to see the same structure for any of the render and turntable events and an example can be seen below:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
    ‘event’: ‘renders.completed’,
    ‘organization’: {
        ‘uuid’: ‘string’
    },
    ‘product’: {
        ‘uuid’: ‘string’,
        ‘name’: ‘VNTANA FullZip_Blue’,
        ‘description’: ”,
        ‘locations’: None,
        ‘tags’: [],
        ‘attributes’: {},
        ‘status’: ‘LIVE_PUBLIC’,
        ‘material’: None,
        ‘optimization’: None,
        ‘asset’: {
            ‘thumbnailBlobId’: ‘string.png’,
            ‘assetBlobId’: ‘string.glb’,
            ‘assetOriginalName’: ‘VNTANA FullZip_Blue.glb’,
            ‘assetOriginalSize’: 464929548,
            ‘generationRequestUuid’: ‘string’
        },
        ‘autoPublish’: False,
        ‘rendererConfigs’: ‘{“autoRotate”:false,”showEnvironment”:false,”environment”:”Default”,”exposure”:1.0,”shadowIntensity”:0.0,”shadowSoftness”:0.0,”presetBg”:”White”,”yaw”:”auto”,”pitch”:”auto”,”distance”:”auto”,”fov”:”auto”,”targetPointX”:”auto”,”targetPointY”:”auto”,”targetPointZ”:”auto”,”showHotspotNumbers”:false,”orientation”:{“roll”:0.0,”pitch”:0.0,”yaw”:0.0},”disableZoom”:false,”shadowFloorPosition”:0.0,”rotationSpeed”:”100%”,”postprocessing”:{“tonemap”:”TONEMAP_ACES_HILL_EXPOSURE_BOOST”,”smaa”:false,”sharpen”:{“amount”:0.0},”bloom”:{“strength”:0.0,”threshold”:3.0,”radius”:0.0}},”useAoMaps”:true,”lights”:{“useSceneLights”:true,”color”:”#ffffff”,”intensity”:1.0},”zoomLimits”:{“minimumRadius”:-1.0,”maximumRadius”:-1.0,”minimumFieldOfView”:-1.0,”maximumFieldOfView”:-1.0},”shading”:”metallic”}’,
        ‘dracoCompression’: None,
        ‘textureCompression’: None,
        ‘modelOpsParameters’: {
            ‘PIVOT_POINT_ALIGNMENT’: {
                ‘pivotPoint’: ‘center’
            },
            ‘DRACO_COMPRESSION’: {
                ‘enabled’: ‘true’
            },
            ‘ORIENTATION’: None,
            ‘TEXTURE_COMPRESSION’: {
                ‘ambientOcclusionRadius’: ‘null’,
                ‘useKTX’: ‘false’,
                ‘bakeAmbientOcclusion’: ‘false’,
                ‘maxDimension’: ‘2048’,
                ‘ambientOcclusionResolution’: ‘null’,
                ‘forceFileSizeLimit’: ‘false’,
                ‘aggression’: ‘2’,
                ‘lossless’: ‘false’,
                ‘fileSizeLimit’: ‘null’,
                ‘ambientOcclusionStrength’: ‘null’
            },
            ‘OPTIMIZATION’: {
                ‘poly’: ‘75000’,
                ‘forcePolygonCount’: ‘false’,
                ‘obstructedGeometry’: ‘true’,
                ‘desiredOutput’: ‘AUTO’
            },
            ‘AR_SCALING’: None
        },
        ‘pipelineUuid’: ’87d414ec-e1f3-4fe3-a5f9-ac4b9cdc51f1′,
        ‘preset’: None,
        ‘viewerSettings’: {
            ‘value’: ‘{“jewelry”:{“enabled”:false},”controls”:{“autoRotate”:{“enabled”:false,”speed”:5.0},”enableZoom”:true},”styling”:{“background”:”#ffffff”},”rendering”:{“sharpen”:0.0,”toneMap”:”aces”,”exposure”:1.0,”transparencyMode”:”normal”},”scene”:{“environment”:{“skybox”:false,”src”:”https://storage.googleapis.com/static-prd-mul-reg-stn-unif-vntana-com/assets/environment_maps/Studio_A_dim.hdr”},”shadow”:{“intensity”:0.0,”resolution”:512},”lights”:{“showModelLights”:true,”lightRig”:[{“intensity”:1,”color”:16777215,”position”:[0,0,0],”type”:”directional”,”direction”:[0.37788859497245025,-0.6253020730046984,-0.6827865898549665]},{“intensity”:1,”color”:16777215,”position”:[0,0,0],”type”:”directional”,”direction”:[-0.544306629479127,-0.625302032486377,-0.5592205837355044]},{“intensity”:1,”color”:16777215,”position”:[0,0,0],”type”:”directional”,”direction”:[-0.024428939559004506,0.6049951951138368,0.7958542836482022]},{“intensity”:1,”color”:16777215,”position”:[0,0,0],”type”:”directional”,”direction”:[0,1,0]}],”preferModelLights”:true,”lightRigOverrideColor”:16777215,”lightRigIntensity”:1.0}}}’,
            ‘presetUuid’: None,
            ‘showHotspotNumbers’: False
        }
    },
    ‘client’: {
        ‘uuid’: ‘string’
    }
}

The key pieces of information here are the organization.uuid, client.uuid, and product.uuid. These are necessary to call the endpoints which allow you to locate and download the renders/turntables via the Attachments API. See the above linked guide on Downloading Attachments for more information on this process.

On This Page

Accelerate Your
Digital Transformation

Learn how our platform can automate your 3D process.

Tap the magnifying glass to the left of your screen to search our resources.