Introduction
Get session details for a mesh animation session. Your animation library animations and text to animation results can be retrieved using this API
Get Session Detail
Request
GET /mesh-animation/<Session Code>
Code Snippets
Python
import requests
url = "https://api.csm.ai/mesh-animation/SESSION_11_1710422392_4549402"
payload = {}
headers = {
'x-api-key': '<X-API_KEY>',
'Content-Type': 'application/json'
}
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/mesh-animation/SESSION_11_1710422392_4549402',
'headers': {
'x-api-key': '<X-API_KEY>',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
Curl
curl -k --location 'https://api.csm.ai/mesh-animation/SESSION_11_1710422392_4549402' \
--header 'x-api-key: <X-API_KEY>'
Response
{
"error": "",
"message": "Retrieved",
"statusCode": 200,
"data": {
"_id": "65d5d3038ef507e197dfd638",
"session_code": "SESSION_11_1710422392_4549402",
"image_to_3d_session_code": "SESSION_12_1710422392_4549402",
"user_id": null,
"render_url": "https://image-url.com/render_front.jpg",
"mesh_url": "https://image-url.com/mesh.zip",
"temp_prompt": {
"text": "",
"mesh_url": "",
"_id": "65d5dc30526993aa628383be"
},
"thumbnail": "https://image-url.com/SESSION_11_1710422392_4549402.jpg",
"animation_url": "https://image-url.com/SESSION_11_1710422392_4549402_Moon walk.fbx",
"status": "predefined_done",
"is_deleted": false,
"prompts": [
{
"_id": "65f2f507fc53d02bcdb9b2c4",
"session_code": "SESSION_11_1710422392_4549402",
"user_id": "65028afbe58cc11ed8f4c16d",
"text": "The person is enthusiastically blowing into a trumpet, puffing up their cheeks, feet stomping to the beat.",
"mesh_url": "https://image-url.com/SESSION_1708500764_1882619_The_person_is_enthusiastically_blowing_into_a_trumpet_puffing_up_their_cheeks_feet_stomping_to_the_beat.fbx",
"usdz_url": "https://image-url.com/SESSION_1708500764_1882619_The_person_is_enthusiastically_blowing_into_a_trumpet_puffing_up_their_cheeks_feet_stomping_to_the_beat.usdz",
"status": "text_done",
"created_at": "2024-03-14T13:00:55.611Z",
"updated_at": "2024-03-14T13:23:11.749Z"
},
],
"animation_library": [
{
"usdz_url": "",
"label": "Angry point",
"url": "https://image-url.com/animations/SESSION_11_1710422392_4549402_Angry point.fbx",
"_id": "65d5da7acb3771fdf2ae27a5"
},
{
"usdz_url": "",
"label": "Jump",
"url": "https://image-url.com/animations/SESSION_11_1710422392_4549402_Jump.fbx",
"_id": "65d5da7acb3771fdf2ae27a6"
},
],
"created_at": "2024-02-21T10:40:03.220Z",
"updated_at": "2024-03-14T13:23:11.790Z",
"animation_joint_dict": {
"Pelvis": [
398.75970458984375,
304.39398193359375
],
"R_Hip": [
378.8945922851563,
301.9108581542969
],
"R_Knee": [
371.4451904296875,
376.4049987792969
],
"R_Ankle": [
366.4789123535157,
455.86541748046875
],
"L_Hip": [
418.62481689453125,
306.87713623046875
],
"L_Knee": [
426.07421875,
381.37127685546875
],
"L_Ankle": [
433.5236511230469,
455.86541748046875
],
"Torso": [
396.27655029296875,
257.2143859863281
],
"Neck": [
401.2428588867187,
199.27450561523438
],
"Nose": [
404.3467712402344,
178.37475585937497
],
"Head": [
403.7259826660157,
157.8888702392578
],
"L_Shoulder": [
438.4899291992187,
210.03475952148438
],
"L_Elbow": [
450.9056091308594,
264.6637878417969
],
"L_Wrist": [
463.3212890625,
304.3940124511719
],
"R_Shoulder": [
359.0295104980468,
210.03475952148438
],
"R_Elbow": [
344.13067626953125,
262.1806640625
],
"R_Wrist": [
334.19812011718744,
311.8434143066406
]
},
"animation_usdz_url": "",
"admin_demo": false,
"user_demo": false
}
}