Skip to content

Convert a 360 spin to video

By , Head of IntegrationsUpdated

Open this page in a new chat

Short answer

Convert a 360 spin to video with POST /v2/files/spin2video. 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. Each call needs a bearer token and counts towards your hourly API limit.

After reading this you will know

  • How to convert a 360 spin to video
  • Which parameters it takes
  • Sample code in 9 languages and a sample answer

This command needs a bearer token and counts towards your hourly limit.

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"
}
Back to top