Image-To-3D
3 Regenerate Spins

Regenerate Spin

This endpoint regenerates the single spin view for a specified Image-to-3D session.

Request

POST https://api.csm.ai/image-to-3d-sessions/submit-spin-jobs

Parameters

session_code REQUIRED
type: string
in: body
description: The unique session code for the Image-to-3D session.


image_urls REQUIRED
type: array
in: body
description: A list containing the URL of the image to be used in regenerating the spin for this session.


Code Snippets

Python

import requests
import json
 
url = "https://api.csm.ai/image-to-3d-sessions/submit-spin-jobs"
 
payload = json.dumps({
  "image_urls": [
    "https://uploaded/SESSION_1708420870_7562566.jpg"
  ],
  "session_code": "SESSION_1708420870_7562566"
})
headers = {
  'x-api-key': '<X-API_KEY>',
  'Content-Type': 'application/json'
}
 
response = requests.request("POST", url, headers=headers, data=payload)
 
print(response.text)

Node.js

var request = require('request');
var options = {
  method: 'POST',
  url: 'https://api.csm.ai/image-to-3d-sessions/submit-spin-jobs',
  headers: {
    'x-api-key': '<X-API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "image_urls": [
      "https://uploaded/SESSION_1708420870_7562566.jpg"
    ],
    "session_code": "SESSION_1708420870_7562566"
  })
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Curl

curl --location 'https://api.csm.ai/image-to-3d-sessions/submit-spin-jobs' \
--header 'x-api-key: <X-API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
    "image_urls": [
        "https://uploaded/SESSION_1708420870_7562566.jpg"
    ],
    "session_code": "SESSION_1708420870_7562566"
}'

Response

{
  "error": "",
  "message": "Retrieved",
  "statusCode": 200,
  "data": {}
}