UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 526 kB
{"openapi":"3.0.0","servers":[{"description":"Live server","url":"https://api.shutterstock.com"},{"description":"Sandbox server","url":"https://api-sandbox.shutterstock.com"}],"info":{"contact":{"x-twitter":"Shutterstock"},"description":"The Shutterstock API provides access to Shutterstock's library of media, as well as information about customers' accounts and the contributors that provide the media.","title":"Shutterstock API Explorer","version":"1.1.32","x-apisguru-categories":["media"],"x-logo":{"url":"https://twitter.com/Shutterstock/profile_image?size=original"},"x-origin":[{"format":"openapi","url":"https://api-explorer.shutterstock.com/openapi.json","version":"3.0"}],"x-providerName":"shutterstock.com"},"paths":{"/v2/ai/audio/descriptors":{"get":{"description":"This endpoint lists the descriptors that you can use in the audio regions in an audio render.","operationId":"listCustomDescriptors","parameters":[{"description":"Show descriptors with an average render speed that is greater than or equal to the specified value","example":5,"in":"query","name":"render_speed_over","schema":{"type":"number"}},{"description":"Show descriptors that contain the specified band (case-sentsitive)","example":"Corporate Folk Bonfire Band 1","in":"query","name":"band_id","schema":{"type":"string"}},{"description":"Show descriptors with the specified band name (case-sensitive)","example":"Documentary Underscore Heartfelt Band 1","in":"query","name":"band_name","schema":{"type":"string"}},{"description":"Page number","example":"1","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of results per page","example":"1","in":"query","name":"per_page","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Show descriptors with the specified IDs (case-sensitive)","example":"documentary_underscore_heartfelt","in":"query","name":"id","schema":{"items":{"type":"string"},"maxItems":20,"type":"array"}},{"description":"Show descriptors with the specified instrument name (case-sensitive)","example":"Precision Bass - Full","in":"query","name":"instrument_name","schema":{"type":"string"}},{"description":"Show descriptors with the specified instrument ID (case-sensitive)","example":"direct_fluorescent_synth_lead","in":"query","name":"instrument_id","schema":{"type":"string"}},{"description":"Show descriptors whose tempo range includes the specified tempo in beats per minute","example":90,"in":"query","name":"tempo","schema":{"type":"number"}},{"description":"Show descriptors with a tempo that is less than or equal to the specified number","example":120,"in":"query","name":"tempo_to","schema":{"type":"number"}},{"description":"Show descriptors that have a tempo range that includes the specified tempo in beats per minute","example":60,"in":"query","name":"tempo_from","schema":{"type":"number"}},{"description":"Show descriptors with the specified name (case-sensitive)","example":"Corporate Pop Inspirational High Energy","in":"query","name":"name","schema":{"type":"string"}},{"description":"Show descriptors with the specified tag, such as Cinematic or Roomy (case-sensitive)","example":"Cinematic","in":"query","name":"tag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/DescriptorsListResult/example"}}},"schema":{"$ref":"#/components/schemas/DescriptorsListResult"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"basic":[]},{"customer_accessCode":[]}],"summary":"List computer audio descriptors","tags":["custom_music"],"x-code-samples":[{"lang":"shell","source":"curl -X GET \"https://api.shutterstock.com/v2/ai/audio/descriptors\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n"},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst customMusicApi = new sstk.CustomMusicApi();\n\nconst queryParams = {\n \"tag\": \"Cinematic\"\n};\n\ncustomMusicApi.listCustomDescriptors(queryParams)\n .then((data) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams = {\n \"tag\": \"Cinematic\",\n};\n\nsstk.customMusic.listCustomDescriptors(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { CustomMusicApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams: CustomMusicApiMethodsParams[\"listCustomDescriptors\"] = {\n \"tag\": \"Cinematic\",\n};\n\nsstk.customMusic.listCustomDescriptors(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/ai/audio/descriptors\",\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);\n"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\nshutterstock ai-audio list-custom-descriptors \\\n --tag Cinematic\n"}]}},"/v2/ai/audio/instruments":{"get":{"description":"This endpoint lists the instruments that you can include in computer audio. If you specify more than one search parameter, the API uses an AND condition.","operationId":"listCustomInstruments","parameters":[{"description":"Show instruments with the specified ID","example":"wood_blocks","in":"query","name":"id","schema":{"items":{"type":"string"},"type":"array"}},{"description":"Number of results per page","example":1,"in":"query","name":"per_page","schema":{"default":20,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Page number","example":"1","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Show instruments with the specified name (case-sensitive)","example":"Precision Bass - Full","in":"query","name":"name","schema":{"type":"string"}},{"description":"Show instruments with the specified tag, such as Percussion or Strings (case-sensitive)","example":"Percussion","in":"query","name":"tag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/InstrumentsListResult/example"}}},"schema":{"$ref":"#/components/schemas/InstrumentsListResult"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"basic":[]},{"customer_accessCode":[]}],"summary":"List computer audio instruments","tags":["custom_music"],"x-code-samples":[{"lang":"shell","source":"curl -X GET \"https://api.shutterstock.com/v2/ai/audio/instruments\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n"},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst customMusicApi = new sstk.CustomMusicApi();\n\nconst queryParams = {\n \"tag\": \"Percussion\"\n};\n\ncustomMusicApi.listCustomInstruments(queryParams)\n .then((data) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams = {\n \"tag\": \"Percussion\",\n};\n\nsstk.customMusic.listCustomInstruments(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { CustomMusicApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams: CustomMusicApiMethodsParams[\"listCustomInstruments\"] = {\n \"tag\": \"Percussion\",\n};\n\nsstk.customMusic.listCustomInstruments(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/ai/audio/instruments\",\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);\n"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\nshutterstock ai-audio list-custom-instruments \\\n --tag Percussion\n"}]}},"/v2/ai/audio/renders":{"get":{"description":"This endpoint shows the status of one or more audio renders, including download links for completed audio.","operationId":"fetchRenders","parameters":[{"description":"One or more render IDs","example":["L2w7h9VNFlkzpllSUunSYayenKjN","BeHx3UNXzMBB4dGsC9aa6VxnpcWl"],"in":"query","name":"id","required":true,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/AudioRendersListResults/example"}}},"schema":{"$ref":"#/components/schemas/AudioRendersListResults"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"security":[{"basic":[]},{"customer_accessCode":[]}],"summary":"Get details about audio renders","tags":["custom_music"],"x-code-samples":[{"lang":"shell","source":"curl -X GET \"https://api.shutterstock.com/v2/ai/audio/renders\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\" \\\n -G \\\n --data-urlencode \"id=L2w7h9VNFlkzpllSUunSYayenKjN\" \\\n --data-urlencode \"id=BeHx3UNXzMBB4dGsC9aa6VxnpcWl\"\n"},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst customMusicApi = new sstk.CustomMusicApi();\n\nconst renders = [\n \"L2w7h9VNFlkzpllSUunSYayenKjN\",\n \"BeHx3UNXzMBB4dGsC9aa6VxnpcWl\"\n];\n\ncustomMusicApi.fetchRenders(renders)\n .then((data) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams = {\n \"id\": [\n \"L2w7h9VNFlkzpllSUunSYayenKjN\",\n \"BeHx3UNXzMBB4dGsC9aa6VxnpcWl\",\n ],\n};\n\nsstk.customMusic.fetchRenders(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { CustomMusicApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst queryParams: CustomMusicApiMethodsParams[\"fetchRenders\"] = {\n \"id\": [\n \"L2w7h9VNFlkzpllSUunSYayenKjN\",\n \"BeHx3UNXzMBB4dGsC9aa6VxnpcWl\",\n ],\n};\n\nsstk.customMusic.fetchRenders(queryParams)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/ai/audio/renders?id=L2w7h9VNFlkzpllSUunSYayenKjN&id=BeHx3UNXzMBB4dGsC9aa6VxnpcWl\",\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);\n"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\nshutterstock ai-audio fetch-renders \\\n --id L2w7h9VNFlkzpllSUunSYayenKjN \\\n --id BeHx3UNXzMBB4dGsC9aa6VxnpcWl\n"}]},"post":{"description":"This endpoint creates rendered audio from timeline data. It returns a render ID that you can use to download the finished audio when it is ready. The render ID is valid for up to 48 hours.","operationId":"createAudioRenders","requestBody":{"content":{"application/json":{"example":{"$ref":"#/components/schemas/CreateAudioRendersRequest/example"},"schema":{"$ref":"#/components/schemas/CreateAudioRendersRequest"}}},"description":"Parameters for the audio, including the timeline and information about the output file","required":true},"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"audio_renders":[{"created_date":"2025-04-15T13:52:09.803Z","files":[],"id":"njlpYoWWmb1AYs2nZyw7EcNWbAkZ","preset":"MASTER_MP3","progress_percent":0,"status":"WAITING_COMPOSE","timeline":{},"updated_date":"2025-04-15T13:52:09.803Z"}]}}},"schema":{"$ref":"#/components/schemas/AudioRendersListResults"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"basic":[]},{"customer_accessCode":[]}],"summary":"Create rendered audio","tags":["custom_music"],"x-code-samples":[{"lang":"shell","source":"DATA='{\n \"audio_renders\": [\n {\n \"preset\": \"MASTER_MP3\",\n \"filename\": \"My_audio_ai.mp3\",\n \"timeline\": {\n \"spans\": [\n {\n \"id\": 111,\n \"span_type\": \"metered\",\n \"time\": 0,\n \"tempo\": 80,\n \"regions\": [\n {\n \"id\": 222,\n \"descriptor\": \"documentary_underscore_heartfelt\",\n \"beat\": 0,\n \"end_type\": {\n \"beat\": 17,\n \"event\": \"ending\",\n \"type\": \"ringout\"\n },\n \"region\": \"music\"\n }\n ],\n \"instrument_groups\": [\n {\n \"instrument_group\": \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_viola_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_first_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_second_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_cello_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n }\n ]\n },\n {\n \"span_type\": \"unmetered\",\n \"time\": 15\n }\n ]\n }\n }\n ]\n}'\n\ncurl -X POST \"https://api.shutterstock.com/v2/ai/audio/renders\" \\\n -d \"$DATA\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n"},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst customMusicApi = new sstk.CustomMusicApi();\n\nconst body = {\n \"audio_renders\": [\n {\n \"preset\": \"MASTER_MP3\",\n \"filename\": \"My_audio_ai.mp3\",\n \"timeline\": {\n \"spans\": [\n {\n \"id\": 111,\n \"span_type\": \"metered\",\n \"time\": 0,\n \"tempo\": 80,\n \"regions\": [\n {\n \"id\": 222,\n \"descriptor\": \"documentary_underscore_heartfelt\",\n \"beat\": 0,\n \"end_type\": {\n \"beat\": 17,\n \"event\": \"ending\",\n \"type\": \"ringout\"\n },\n \"region\": \"music\"\n }\n ],\n \"instrument_groups\": [\n {\n \"instrument_group\": \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_viola_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_first_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_second_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_cello_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n }\n ]\n },\n {\n \"span_type\": \"unmetered\",\n \"time\": 15\n }\n ]\n }\n }\n ]\n};\n\ncustomMusicApi.createAudioRenders(body)\n .then(async (data) => {\n const { id } = data.audio_renders[0];\n console.log(id);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst audioRendersBody = {\n \"body\": {\n \"audio_renders\": [\n {\n \"preset\": \"MASTER_MP3\",\n \"filename\": \"My_audio_ai.mp3\",\n \"timeline\": {\n \"spans\": [\n {\n \"id\": 111,\n \"span_type\": \"metered\",\n \"time\": 0,\n \"tempo\": 80,\n \"regions\": [\n {\n \"id\": 222,\n \"descriptor\": \"documentary_underscore_heartfelt\",\n \"beat\": 0,\n \"end_type\": {\n \"beat\": 17,\n \"event\": \"ending\",\n \"type\": \"ringout\",\n },\n \"region\": \"music\",\n },\n ],\n \"instrument_groups\": [\n {\n \"instrument_group\": \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_viola_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_first_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_second_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_cello_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\",\n },\n ],\n },\n ],\n },\n {\n \"span_type\": \"unmetered\",\n \"time\": 15,\n },\n ],\n },\n },\n ],\n },\n};\n\nsstk.customMusic.createAudioRenders(audioRendersBody)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock, {\n AudioRenderTimelineSpanRegionEndTypeEventEnum,\n AudioRenderTimelineSpanRegionEndTypeTypeEnum,\n AudioRenderTimelineSpanRegionRegionEnum,\n AudioRenderTimelineSpanSpanTypeEnum,\n CreateAudioRenderPresetEnum,\n AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum,\n} from \"shutterstock-api\";\nimport type { CustomMusicApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst audioRendersBody: CustomMusicApiMethodsParams[\"createAudioRenders\"] = {\n \"body\": {\n \"audio_renders\": [\n {\n \"preset\": CreateAudioRenderPresetEnum.MASTERMP3,\n \"filename\": \"My_audio_ai.mp3\",\n \"timeline\": {\n \"spans\": [\n {\n \"id\": 111,\n \"span_type\": AudioRenderTimelineSpanSpanTypeEnum.Metered,\n \"time\": 0,\n \"tempo\": 80,\n \"regions\": [\n {\n \"id\": 222,\n \"descriptor\": \"documentary_underscore_heartfelt\",\n \"beat\": 0,\n \"end_type\": {\n \"beat\": 17,\n \"event\": AudioRenderTimelineSpanRegionEndTypeEventEnum.Ending,\n \"type\": AudioRenderTimelineSpanRegionEndTypeTypeEnum.Ringout,\n },\n \"region\": AudioRenderTimelineSpanRegionRegionEnum.Music,\n },\n ],\n \"instrument_groups\": [\n {\n \"instrument_group\": \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_viola_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_first_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_second_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n {\n \"instrument_group\": \"nice_scoring_cello_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": AudioRenderTimelineSpanInstrumentGroupStatusStatusEnum.Active,\n },\n ],\n },\n ],\n },\n {\n \"span_type\": AudioRenderTimelineSpanSpanTypeEnum.Unmetered,\n \"time\": 15,\n },\n ],\n },\n },\n ],\n },\n};\n\nsstk.customMusic.createAudioRenders(audioRendersBody)\n .then(({ data }) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$body = [\n \"audio_renders\" => [\n [\n \"preset\" => \"MASTER_MP3\",\n \"filename\" => \"My_audio_ai.mp3\",\n \"timeline\" => [\n \"spans\" => [\n [\n \"id\" => 111,\n \"span_type\" => \"metered\",\n \"time\" => 0,\n \"tempo\" => 80,\n \"regions\" => [\n [\n \"id\" => 222,\n \"descriptor\" => \"documentary_underscore_heartfelt\",\n \"beat\" => 0,\n \"end_type\" => [\n \"beat\" => 17,\n \"event\" => \"ending\",\n \"type\" => \"ringout\"\n ],\n \"region\" => \"music\"\n ]\n ],\n \"instrument_groups\" => [\n [\n \"instrument_group\" => \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"nice_scoring_viola_ensemble\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"nice_scoring_first_violin_ensemble\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"nice_scoring_second_violin_ensemble\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ],\n [\n \"instrument_group\" => \"nice_scoring_cello_ensemble\",\n \"statuses\" => [\n [\n \"beat\" => 0,\n \"status\" => \"active\"\n ]\n ]\n ]\n ]\n ],\n [\n \"span_type\" => \"unmetered\",\n \"time\" => 15\n ]\n ]\n ]\n ]\n ]\n];\n$encodedBody = json_encode($body);\n\n$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/ai/audio/renders\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $encodedBody,\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\",\n \"Content-Type: application/json\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);\n"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\necho '{\n \"audio_renders\": [\n {\n \"preset\": \"MASTER_MP3\",\n \"filename\": \"My_audio_ai.mp3\",\n \"timeline\": {\n \"spans\": [\n {\n \"id\": 111,\n \"span_type\": \"metered\",\n \"time\": 0,\n \"tempo\": 80,\n \"regions\": [\n {\n \"id\": 222,\n \"descriptor\": \"documentary_underscore_heartfelt\",\n \"beat\": 0,\n \"end_type\": {\n \"beat\": 17,\n \"event\": \"ending\",\n \"type\": \"ringout\"\n },\n \"region\": \"music\"\n }\n ],\n \"instrument_groups\": [\n {\n \"instrument_group\": \"full_aw_nylon_acoustic_lead_guitar\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_viola_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_devonshire_upright_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_first_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_second_violin_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"warm_kawai_grand_acoustic_piano_dreamy\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"sweet_kawai_grand_acoustic_piano\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n },\n {\n \"instrument_group\": \"nice_scoring_cello_ensemble\",\n \"statuses\": [\n {\n \"beat\": 0,\n \"status\": \"active\"\n }\n ]\n }\n ]\n },\n {\n \"span_type\": \"unmetered\",\n \"time\": 15\n }\n ]\n }\n }\n ]\n}' > data.json\n\nshutterstock ai-audio create-audio-renders data.json\n"}]}},"/v2/audio":{"get":{"description":"This endpoint lists information about one or more audio tracks, including the description and publication date.","operationId":"getTrackList","parameters":[{"description":"One or more audio IDs","example":["442583","434750"],"in":"query","name":"id","required":true,"schema":{"items":{"pattern":"^[1-9]\\d*$","type":"string","x-pattern-description":"A number that does not start with 0"},"maxItems":500,"minItems":1,"type":"array"}},{"description":"Amount of detail to render in the response","example":"full","in":"query","name":"view","schema":{"default":"minimal","enum":["minimal","full"],"type":"string"}},{"description":"The ID of the search that is related to this request","example":"00000000-0000-0000-0000-000000000000","in":"query","name":"search_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/AudioDataList/example"}}},"schema":{"$ref":"#/components/schemas/AudioDataList"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"basic":[]},{"customer_accessCode":[]}],"summary":"List audio tracks","tags":["audio"]}},"/v2/audio/collections":{"get":{"description":"This endpoint lists your collections of audio tracks and their basic attributes.","operationId":"getTrackCollectionList","parameters":[{"description":"Page number","example":"1","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"}},{"description":"Number of results per page","example":"100","in":"query","name":"per_page","schema":{"default":100,"maximum":150,"minimum":1,"type":"integer"}},{"description":"Which sharing information to include in the response, such as a URL to the collection","example":"share_code","in":"query","name":"embed","schema":{"items":{"enum":["share_code","share_url"],"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/CollectionDataList/example"}}},"schema":{"$ref":"#/components/schemas/CollectionDataList"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"customer_accessCode":["collections.view"]}],"summary":"List audio collections","tags":["audio"]},"post":{"description":"This endpoint creates one or more collections (soundboxes). To add tracks, use `POST /v2/audio/collections/{id}/items`.","operationId":"createTrackCollection","requestBody":{"content":{"application/json":{"examples":{"default":{"description":"Create a soundbox","value":{"name":"Best rock music"}}},"schema":{"$ref":"#/components/schemas/CollectionCreateRequest"}}},"description":"Collection metadata","required":true},"responses":{"201":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/CollectionCreateResponse/example"}}},"schema":{"$ref":"#/components/schemas/CollectionCreateResponse"}}},"description":"Successfully created audio collection"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"security":[{"customer_accessCode":["collections.edit"]}],"summary":"Create audio collections","tags":["audio"],"x-code-samples":[{"lang":"shell","source":"DATA='{\n \"name\": \"Best rock music\"\n}'\n\ncurl -X POST \"https://api.shutterstock.com/v2/audio/collections\" \\\n -d \"$DATA\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\""},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst audioApi = new sstk.AudioApi();\n\nconst body = {\n \"name\": \"Best rock music\",\n};\n\naudioApi.createTrackCollection(body)\n .then((data) => {\n console.log(data);\n })\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst newCollectionBody = {\n \"body\": {\n \"name\": \"Best rock music\",\n },\n};\n\nsstk.audio.createTrackCollection(newCollectionBody)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { AudioApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst newCollectionBody: AudioApiMethodsParams[\"createTrackCollection\"] = {\n \"body\": {\n \"name\": \"Best rock music\",\n },\n};\n\nsstk.audio.createTrackCollection(newCollectionBody)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$body = [\n \"name\" => \"Best rock music\"\n];\n$encodedBody = json_encode($body);\n\n$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/audio/collections\",\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $encodedBody,\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\",\n \"Content-Type: application/json\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\necho '{\n \"name\": \"Best rock music\"\n}' > data.json\n\nshutterstock images create-image-collection data.json\n"}]}},"/v2/audio/collections/{id}":{"delete":{"description":"This endpoint deletes a collection.","operationId":"deleteTrackCollection","parameters":[{"description":"Collection ID","example":"48433111","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted collection"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Collection not found"}},"security":[{"customer_accessCode":["collections.edit"]}],"summary":"Delete audio collections","tags":["audio"],"x-code-samples":[{"lang":"shell","source":"curl -X DELETE \"https://api.shutterstock.com/v2/audio/collections/48433111\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\""},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst audioApi = new sstk.AudioApi();\n\nconst collectionId = \"48433107\";\n\naudioApi.deleteTrackCollection(collectionId)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst collectionId = \"48433107\";\n\nconst deleteCollectionParams = {\n \"id\": collectionId,\n};\n\nsstk.audio.deleteTrackCollection(deleteCollectionParams)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { AudioApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst collectionId = \"48433107\";\n\nconst deleteCollectionParams: AudioApiMethodsParams[\"deleteTrackCollection\"] = {\n \"id\": collectionId,\n};\n\nsstk.audio.deleteTrackCollection(deleteCollectionParams)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"php","source":"$options = [\n CURLOPT_URL => \"https://api.shutterstock.com/v2/audio/collections/48433111\",\n CURLOPT_USERAGENT => \"php/curl\",\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\"\n ],\n CURLOPT_RETURNTRANSFER => 1\n];\n\n$handle = curl_init();\ncurl_setopt_array($handle, $options);\n$response = curl_exec($handle);\ncurl_close($handle);\n\n$decodedResponse = json_decode($response);\nprint_r($decodedResponse);"},{"lang":"bash","source":"export SHUTTERSTOCK_API_TOKEN=\"v2/ODYwYmRlNzBiYjMzNTE2M2UyZTQvMTc4NzI2OTM4L2N1c3RvbWVyLzIvWEtXR01HQ1FaVHRLOG85a\"\n\nshutterstock audio delete-track-collection 48433111\n"}]},"get":{"description":"This endpoint gets more detailed information about a collection, including the number of items in it and when it was last updated. To get the tracks in collections, use `GET /v2/audio/collections/{id}/items`.","operationId":"getTrackCollection","parameters":[{"description":"Collection ID","example":"48433107","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Which sharing information to include in the response, such as a URL to the collection","in":"query","name":"embed","schema":{"items":{"enum":["share_code","share_url"],"type":"string"},"type":"array"}},{"description":"Code to retrieve a shared collection","in":"query","name":"share_code","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"examples":{"response":{"value":{"$ref":"#/components/schemas/Collection/example"}}},"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Collection not found"}},"security":[{"customer_accessCode":["collections.view"]}],"summary":"Get the details of audio collections","tags":["audio"]},"post":{"description":"This endpoint sets a new name for a collection.","operationId":"renameTrackCollection","parameters":[{"description":"Collection ID","example":"48433107","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"examples":{"default":{"description":"Renaming a soundbox","value":{"name":"Best rock music"}}},"schema":{"$ref":"#/components/schemas/CollectionUpdateRequest"}}},"description":"Collection changes","required":true},"responses":{"204":{"description":"Successfully updated collection"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Collection not found"}},"security":[{"customer_accessCode":["collections.edit"]}],"summary":"Rename audio collections","tags":["audio"],"x-code-samples":[{"lang":"shell","source":"DATA='{\n \"name\": \"Best rock music\"\n}'\n\ncurl -X POST \"https://api.shutterstock.com/v2/audio/collections/48433107\" \\\n -d \"$DATA\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: application/json\" \\\n -H \"Authorization: Bearer $SHUTTERSTOCK_API_TOKEN\""},{"lang":"javascript_v1--nodejs","source":"const sstk = require(\"shutterstock-api\");\n\nsstk.setAccessToken(process.env.SHUTTERSTOCK_API_TOKEN);\n\nconst audioApi = new sstk.AudioApi();\n\nconst collectionId = \"48433107\";\n\nconst body = {\n \"name\": \"Best rock music\"\n};\n\naudioApi.renameTrackCollection(collectionId, body)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"javascript_v2--nodejs","source":"const Shutterstock = require(\"shutterstock-api\");\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst collectionId = \"48433107\";\n\nconst renameAudioBody = {\n \"id\": collectionId,\n \"body\": {\n \"name\": \"Best rock music\",\n },\n};\n\nsstk.audio.renameTrackCollection(renameAudioBody)\n .catch((error) => {\n console.error(error);\n });\n"},{"lang":"typescript_v2--nodejs","source":"import Shutterstock from \"shutterstock-api\";\nimport type { AudioApiMethodsParams } from \"shutterstock-api\";\n\nconst sstk = new Shutterstock({\n \"accessToken\": process.env.SHUTTERSTOCK_API_TOKEN,\n});\n\nconst collectionId = \"48433107\";\n\nconst renameAudioBody: AudioApiMethodsParams[\"renameTrackCollection\"] = {\n \"id\": colle