Skip to main content
POST
/
api
/
v1
/
nodes
/
{nodeId}
/
set-version
Set the active node version
curl --request POST \
  --url https://api.melius.com/api/v1/nodes/{nodeId}/set-version \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-team-id: <api-key>' \
  --data '
{
  "versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
import requests

url = "https://api.melius.com/api/v1/nodes/{nodeId}/set-version"

payload = { "versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"x-team-id": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'x-team-id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({versionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};

fetch('https://api.melius.com/api/v1/nodes/{nodeId}/set-version', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.melius.com/api/v1/nodes/{nodeId}/set-version",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'versionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-team-id: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.melius.com/api/v1/nodes/{nodeId}/set-version"

payload := strings.NewReader("{\n \"versionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("x-team-id", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://api.melius.com/api/v1/nodes/{nodeId}/set-version")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["x-team-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"versionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "geometry": {
    "x": 123,
    "y": 123,
    "w": 123,
    "h": 123,
    "zIndex": 123
  },
  "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "activeVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "generatedText": "<string>",
  "versions": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "modelConfig": {
        "model": "<string>",
        "variant": "<string>",
        "tier": "<string>",
        "ratios": [
          "<string>"
        ],
        "resolution": "<string>",
        "voiceId": "<string>",
        "customVoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "font": {
          "familyName": "<string>"
        }
      },
      "sourceToolName": "<string>",
      "seed": 1073741823,
      "generateAudio": true,
      "negativePrompt": "<string>",
      "outputDuration": 1,
      "textPrompt": "<string>",
      "generatedText": "<string>",
      "asset": {
        "url": "<string>",
        "originalUrl": "<string>",
        "previewUrl": "<string>",
        "fileType": "<string>",
        "fileSizeInKb": 1,
        "originalWidth": 1,
        "originalHeight": 1,
        "durationInMs": 1,
        "previewExtraLowResolutionUrl": "<string>",
        "previewLowResolutionUrl": "<string>",
        "previewHighResolutionUrl": "<string>",
        "thumbnailUrl": "<string>",
        "assetSummary": "<string>",
        "assetSummaryDetails": {
          "subject": "<string>",
          "action": "<string>",
          "summary": "<string>"
        }
      },
      "layerCount": 1,
      "errorMessage": "<string>",
      "favoritedByUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "modelDisplayName": "<string>",
      "pdfExtraction": {
        "summaryText": "<string>",
        "extractedImages": [
          {
            "assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "url": "<string>",
            "pageIndex": 1,
            "imageIndex": 1
          }
        ],
        "extractedImageUrls": [
          "<string>"
        ],
        "extractedImageCount": 123
      },
      "nodeRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "errorRetryable": true
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "title": "<string>",
  "autoModel": true,
  "fastModel": true,
  "textPrompt": "<string>",
  "modelConfig": {
    "model": "<string>",
    "variant": "<string>",
    "tier": "<string>",
    "ratios": [
      "<string>"
    ],
    "resolution": "<string>",
    "voiceId": "<string>",
    "customVoiceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "font": {
      "familyName": "<string>"
    }
  },
  "outputDuration": 1,
  "seed": 1073741823,
  "generateAudio": true,
  "modelSupportsEndImage": true,
  "modelSupportsReferenceImage": true,
  "modelSupportsOptionalStartImage": true,
  "modelSupportsAudioInput": true,
  "modelGeneratesAudio": true,
  "voiceId": "<string>",
  "customVoiceId": "<string>",
  "negativePrompt": "<string>",
  "supportedInputs": [],
  "stitchClipOrder": [
    "<string>"
  ],
  "stitchAudioOverlays": [
    {
      "nodeId": "<string>",
      "startTimeSeconds": 1,
      "trimStartMs": 1,
      "trimEndMs": 1
    }
  ],
  "stitchClipTrims": {},
  "templatePorts": [
    {
      "direction": "input",
      "portId": "<string>",
      "label": "<string>",
      "handleType": "<string>",
      "nodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "internalHandle": "<string>",
      "required": true,
      "maxConnections": 1,
      "internalTargets": [
        {
          "nodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalHandle": "<string>"
        }
      ],
      "connectedSourceIds": [
        "<string>"
      ],
      "top": "<string>"
    }
  ],
  "templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "childNodeIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "magicResizeOutputs": [
    {
      "layerIndex": 123,
      "ratio": "<string>",
      "assetId": "<string>",
      "assetUrl": "<string>",
      "previewUrl": "<string>",
      "failed": true
    }
  ]
}
{
"message": "<string>"
}
{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}
{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}
{
"message": "<string>"
}
{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"retryAfterSeconds": 123
}

Authorizations

Authorization
string
header
required

A Melius API key (mel_...), sent as Authorization: Bearer <key>.

x-team-id
string
header
required

The team (workspace) to act on. Defaults to the key's team when omitted.

Path Parameters

nodeId
string<uuid>
required

Body

application/json

Body

versionId
string<uuid>
required

Response

200

id
string<uuid>
required
nodeType
enum<string>
required
Available options:
text,
image,
video,
audio,
file,
group,
custom_text,
pdf,
composite,
stitch,
magic_resize
geometry
object
required
groupId
string<uuid> | null
required
activeVersionId
string<uuid> | null
required
generatedText
string | null
required
versions
object[]
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
title
string
autoModel
boolean | null
fastModel
boolean | null
textPrompt
string | null
modelConfig
object | null
outputAspectRatio
enum<string> | null
Available options:
21:9,
16:9,
4:3,
5:4,
3:2,
1:1,
2:3,
3:4,
4:5,
9:16,
9:21
outputDuration
integer | null
Required range: x > 0
outputResolution
Available options:
360p,
480p,
540p,
580p,
720p,
1080p,
1440p,
2160p,
4k,
0.5K,
1K,
2K,
4K,
1k,
2k
seed
integer | null
Required range: 0 <= x <= 2147483647
generateAudio
boolean | null
modelSupportsEndImage
boolean | null
modelSupportsReferenceImage
boolean | null
modelSupportsOptionalStartImage
boolean | null
modelSupportsAudioInput
boolean | null
modelGeneratesAudio
boolean | null
voiceId
string | null
customVoiceId
string | null
negativePrompt
string | null
supportedInputs
enum<string>[] | null
Available options:
image,
video
stitchClipOrder
string[] | null
stitchScaleFit
enum<string> | null
Available options:
fit,
stretch
stitchAudioOverlays
object[] | null
stitchClipTrims
object | null
groupType
enum<string> | null
Available options:
default,
unified,
template
templatePorts
object[] | null
templateId
string<uuid> | null
childNodeIds
string<uuid>[]
magicResizeOutputs
object[] | null
Last modified on July 9, 2026