Image-To-3D
6 Get Mesh URL

Get Mesh URL

Check if a mesh is available for a specified Image-to-3D session.

Request

GET https://api.csm.ai/image-to-3d-sessions/get-mesh/<Session Code>

Code Snippets

Python

import requests
 
url = "https://api.csm.ai/image-to-3d-sessions/get-mesh/SESSION_1689154282_5871682"
 
payload = ""
headers = {
  'x-api-key': '<X-API_KEY>',
}
 
response = requests.request("GET", url, headers=headers, data=payload)
 
print(response.text)

Node.js

var request = require('request');
var options = {
  method: 'GET',
  url: 'https://api.csm.ai/image-to-3d-sessions/get-mesh/SESSION_1689154282_5871682',
  headers: {
    'x-api-key': '<X-API_KEY>',
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Curl

curl -k --location 'https://api.csm.ai/image-to-3d-sessions/get-mesh/SESSION_1689154282_5871682' \
--header 'x-api-key: <X-API_KEY>'

Response

{
  "error": "",
  "message": "Retrieved",
  "statusCode": 200,
  "data": [
    {
      "mesh_url_usdz": "",
      "mesh_url_glb": "",
      "mesh_url": "",
      "mesh_url_zip": "",
      "mesh_url_fbx": "",
      "mesh_url_3mf": "",
      "preview_mesh_url_zip": "https://imageto3d.blob.core.windows.net/data/inference_outputs/csmdev@yopmail.com/SESSION/SESSION_preview.zip?se=2033-08-22T15%3A28%3A01Z&sp=r&sv=2023-01-03&sr=b&sig=1MmUHTwc%2BX8guIvy8fG68Y356Ea/zZtedmqIEuxlq2Q%3D",
      "preview_mesh_url_glb": "https://imageto3d.blob.core.windows.net/data/inference_outputs/csmdev@yopmail.com/SESSION/mesh_preview.glb?se=2033-08-22T15%3A27%3A56Z&sp=r&sv=2023-01-03&sr=b&sig=hkt1jsmFdkjYdHa5p34FHfhwUMRZ%2B8scD1I5bxiZrag%3D",
      "preview_mesh_url_usdz": "https://imageto3d.blob.core.windows.net/data/inference_outputs/csmdev@yopmail.com/SESSION/mesh_preview.usdz?se=2033-08-22T15%3A27%3A58Z&sp=r&sv=2023-01-03&sr=b&sig=h%2BggTeIo3wI52v/2ri50uUxihg/2Bgy9CAkTAdxP%2BOI%3D",
      "preview_mesh_url_fbx": "https://imageto3d.blob.core.windows.net/data/inference_outputs/csmdev@yopmail.com/SESSION/mesh_preview.usdz?se=2033-08-22T15%3A27%3A58Z&sp=r&sv=2023-01-03&sr=b&sig=h%2BggTeIo3wI52v/2ri50uUxihg/2Bgy9CAkTAdxP%2BOI%3D",
      "preview_mesh_url_3mf": "https://imageto3d.blob.core.windows.net/data/inference_outputs/csmdev@yopmail.com/SESSION/mesh_preview.usdz?se=2033-08-22T15%3A27%3A58Z&sp=r&sv=2023-01-03&sr=b&sig=h%2BggTeIo3wI52v/2ri50uUxihg/2Bgy9CAkTAdxP%2BOI%3D",
      "status": "preview_done"
    }
  ]
}