Skip to main content
POST
/
templates
/
run
Test-run a template
curl --request POST \
  --url https://www.orgo.ai/api/templates/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ref": "default/my-template@1.0.0"
}
'
import requests

url = "https://www.orgo.ai/api/templates/run"

payload = { "ref": "default/my-template@1.0.0" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ref: 'default/my-template@1.0.0'})
};

fetch('https://www.orgo.ai/api/templates/run', 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://www.orgo.ai/api/templates/run",
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([
'ref' => 'default/my-template@1.0.0'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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://www.orgo.ai/api/templates/run"

payload := strings.NewReader("{\n \"ref\": \"default/my-template@1.0.0\"\n}")

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

req.Header.Add("Authorization", "Bearer <token>")
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))

}
HttpResponse<String> response = Unirest.post("https://www.orgo.ai/api/templates/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ref\": \"default/my-template@1.0.0\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://www.orgo.ai/api/templates/run")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ref\": \"default/my-template@1.0.0\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "desktop_id": "<string>",
  "status": "<string>",
  "vnc_password": "<string>",
  "public_host": "<string>",
  "resolution": "<string>"
}
{
"error": "Invalid API key"
}
Boots a short-lived, auto-reaped computer from a template ref — the same in-editor “Run” that the dashboard uses to test a template before sharing it. The preview is reclaimed automatically after a period of inactivity.
Test-runs require a Scale plan. For a persistent computer, use Create computer with template_ref instead — that’s the durable path and it counts toward your plan’s computer quota.

Request body

ref
string
required
Template ref to boot, in namespace/name@version form. Your own (default/…) or a curated (system/…) ref. The template’s build must be ready.

Response

Returns a short-lived computer you connect to exactly like any other. The key fields:
desktop_id
string
The preview’s identifier. Build its connection URLs the same way as any computer (https://www.orgo.ai/desktops/{desktop_id}/…), and pass it back to stop the run.
id
string
The underlying VM id.
status
string
Current status.
vnc_password
string
VNC / WebSocket token for the preview.
See Create computer for the full connection model.

Example

curl -X POST https://www.orgo.ai/api/templates/run \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref": "default/my-template@1.0.0"}'
# Stop the preview when you're done (id = desktop_id from the run response)
curl -X DELETE "https://www.orgo.ai/api/templates/run?id=$DESKTOP_ID" \
  -H "Authorization: Bearer $ORGO_API_KEY"

Stop a test-run

DELETE /templates/run?id={desktop_id} stops the preview and reclaims the VM. Previews are also reaped automatically, so a missed stop won’t leak a computer.

Errors

StatusMeaning
401Missing or invalid API key.
403Test-runs require a Scale plan or higher.
409The template’s build isn’t ready. Build it first.
429Run-VM rate limit or concurrency cap reached. Back off and retry.

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Body

application/json
ref
string
required
Example:

"default/my-template@1.0.0"

Response

Preview computer booted

A short-lived preview computer booted from a template ref. Connect to it like any computer; it is auto-reaped.

id
string

Underlying VM id.

desktop_id
string

Ephemeral desktop id. Use it for same-origin connection URLs and to stop the run via DELETE /templates/run?id=.

status
string
vnc_password
string
public_host
string
resolution
string