How to Convert USDZ to GLTF using Aspose.3D REST API

Hello,

I can convert USDZ to GLTF files using the web interface. But I’d like to do it via API, preferably using PHP, cURL or Python using the 3D Conversion Cloud API.

However I am stuck - I think my programming skills are not good enough to make sense of the documentation. I was curious if somebody has an example of a working script that can just convert an USDZ into a GLTF file using the API? Something that I can use as a base to understand how it works. Sadly I didn’t get the scripts from the documentation to work. I assume I have to put them together in a specific way so they work in combination, but I can’t figure out how.

Thanks a lot,
Christoph

@cburgdorfer

Please find the sample cURL commands to upload a USDZ file to cloud storage and then convert USDZ to GLTF file format using Aspose.3D Cloud API. Hopefully, it will help you to accomplish the task.

Convert USDZ to GLTF in cURL

curl -X PUT "https://api.aspose.cloud/v3.0/3d/storage/file/Temp/test.usdz"
-H "accept: application/json"
-H "authorization: Bearer [Access_Token]"
-H "Content-Type: multipart/form-data"
-T "C:/Users/hp 840 g3/Downloads/test.usdz"
curl -X POST "https://api.aspose.cloud/v3.0/3d/saveas/newformat?name=test.usdz&newformat=gltf&newfilename=test.gltf&folder=Temp&IsOverwrite=false" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]"