Skip to content

360 spins, video and 3D

By , Head of IntegrationsUpdated

Open this page in a new chat

Short answer

These commands turn your media into other formats: a 360 spin into an MP4 video, a video into a 360 spin, a 3D model into GLB, and a product photo into one without its background. They also export spins in the formats that Amazon, Walmart, Home Depot, Lowe's, Grainger and MSC Direct ask for.

After reading this you will know

  • How to turn a spin into a video and a video into a spin
  • How to export a spin for Amazon, Walmart and other retailers
  • How to convert 3D models and remove image backgrounds

Every command on this page needs a bearer token.

POSThttps://api.sirv.com/v2/files/3d/model2GLB

Use this method to convert OBJ, USD, USDZ, FBX to GLB format

The answer gives the ID of the job. Check its progress with Get results of GLB conversion job.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/model.usdzPath of the 3D model to convert: an OBJ, USD, USDZ or FBX file.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/3d/model2GLB', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/model.usdz"
}),
});
console.log(res.status, await res.text());

Example response

{
"id": "string"
}
POSThttps://api.sirv.com/v2/files/spin2video

Use this API method to convert a 360 spin into an MP4 video.

You can specify the width/height of the video and the number of rotations.

If it is a multi-row spin, you can also specify which row should be converted.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to turn into a video.
optionsobjectNoSize, number of loops, speed and row of the video.
options.widthnumberNo1920Up to 1920.
options.heightnumberNo1080Up to 1080.
options.loopsnumberNo3Up to 20.
options.speednumberNo3600Up to 60000.
options.rowstringNosingleFor a spin with several rows: one row in the video, or all of them. One of: single, all.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2video', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"options": {
"width": 1920,
"height": 1080,
"loops": 3,
"speed": 3600
}
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/coin_single_1920x1080.mp4"
}
POSThttps://api.sirv.com/v2/files/video2spin

Use this API method to create a 360 spin from a video file.

Choose the start and end time if you only wish to convert part of the video.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/video.mp4Path of the video to turn into a spin.
optionsobjectNoWhich part of the video to use, and how many frames the spin gets.
options.startnumberNo2Where in the video the spin starts, in seconds.
options.endnumberNo8Where in the video the spin ends, in seconds.
options.framesnumberNo32Up to 512.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/video2spin', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/video.mp4",
"options": {
"frames": 32
}
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/video/video.spin"
}
POSThttps://api.sirv.com/v2/files/spin2amazon360

This API method will generate a zip file containing 360 spin images that meet Amazon’s requirements for width, height, format and file naming.

The response will contain the zip file URL. You must know the ASIN (Amazon Standard Identification Number) to use this 360 spin zip method.

The ASIN is displayed on the Amazon product page.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
asinstringYesASIN1234Amazon Standard Identification Number

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2amazon360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"asin": "ASIN1234"
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/ASIN1234.zip"
}
POSThttps://api.sirv.com/v2/files/spin2grainger360

This API method will generate a zip file containing 360 spin images that meet Grainger’s requirements for format and file naming.

The response will contain the zip file URL. You must know the Grainger SKU to use this 360 spin zip method.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
skustringYesSKU1234Grainger SKU

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2grainger360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"sku": "SKU1234"
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/SKU1234.zip"
}
POSThttps://api.sirv.com/v2/files/spin2homedepot360

This API method will generate a zip file containing 360 spin images that meet Home Depot’s requirements for image dimensions, format and naming.

The response will contain the zip file URL for download. You must know the Home Depot OMSID to use this 360 spin zip method.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
omsidstringYes100650378Home Depot OMSID
spinNumbernumberNo2Spin number in case product has more than 1 spin

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2homedepot360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"omsid": "100650378",
"spinNumber": 2
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/100650378.zip"
}
POSThttps://api.sirv.com/v2/files/spin2lowes360

This API method will generate a zip file containing 360 spin images that meet Lowe’s requirements for format and file naming.

The response will contain the zip file URL. You must know the Lowe’s barcode to use this 360 spin zip method.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
barcodestringYes1234567890Lowe’s barcode

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2lowes360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"barcode": "1234567890"
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/1234567890.zip"
}
POSThttps://api.sirv.com/v2/files/spin2msc360

This API method will generate a zip file containing 360 spin images that meet MSC Direct’s requirements for format and file naming.

The response will contain the zip file URL.

You must know the MSC Direct’s vendor item # (MSC ID) to use this 360 spin zip method.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
mscidstringYes12345678MSC Direct’s MSC ID

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2msc360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"mscid": "12345678"
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/.Export/MSC-Spins/12345678.zip"
}
POSThttps://api.sirv.com/v2/files/spin2walmart360

This API method will generate a zip file containing 360 spin images that meet Walmart’s requirements for format and file naming.

The response will contain the zip file URL. You must know the Walmart GTIN to use this 360 spin zip method.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/coin/coin.spinPath of the .spin file to export.
gtinstringYes00612052029955Walmart GTIN

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/spin2walmart360', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/coin/coin.spin",
"gtin": "00612052029955"
}),
});
console.log(res.status, await res.text());

Example response

{
"filename": "/REST API Examples/coin/00612052029955.zip"
}
GEThttps://api.sirv.com/v2/files/3d/model2GLB

Use this method to get results of the job created with POST /files/3d/model2GLB

Query parameters

NameTypeRequiredExampleDescription
idstringYesJob ID returned from POST /files/3d/model2GLB

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/3d/model2GLB?id=JOB_ID', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"progress": 0
}

Get results of image background removal job

Section titled “Get results of image background removal job”
GEThttps://api.sirv.com/v2/files/removeBackground

Use this method to get results of the job created with POST /v2/files/removeBackground.

Query parameters

NameTypeRequiredExampleDescription
idstringYesJob ID returned from POST /files/removeBackground

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/removeBackground?id=JOB_ID', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}` },
});
console.log(res.status, await res.text());

Example response

{
"progress": 0
}
POSThttps://api.sirv.com/v2/files/removeBackground

Use this method to remove background from images

The answer gives the ID of the job. Check its progress with Get results of image background removal job.

Request body (JSON)

FieldTypeRequiredExampleDescription
filenamestringYes/REST API Examples/filename.jpgPath of the image, starting with /.
overwritebooleanNofalseOverwrite original image or not
formatstringNopngOutput image format. One of: png, jpg, original.

Example request

// Your bearer token, from POST /v2/token, in the SIRV_TOKEN environment variable
const res = await fetch('https://api.sirv.com/v2/files/removeBackground', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SIRV_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({
"filename": "/REST API Examples/filename.jpg",
"overwrite": false,
"format": "png"
}),
});
console.log(res.status, await res.text());

Example response

{
"id": "string"
}
Back to top