Create execution
POST
/
v1
/
machines
/
{machine_id}
/
executions
Create execution
curl --request POST \
--url https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"command": [
"<string>"
],
"cwd": "<string>",
"env": {},
"stdin": "<string>",
"timeout_ms": 123
}
'import requests
url = "https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions"
payload = {
"command": ["<string>"],
"cwd": "<string>",
"env": {},
"stdin": "<string>",
"timeout_ms": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
command: ['<string>'],
cwd: '<string>',
env: {},
stdin: '<string>',
timeout_ms: 123
})
};
fetch('https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions', 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://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions",
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([
'command' => [
'<string>'
],
'cwd' => '<string>',
'env' => [
],
'stdin' => '<string>',
'timeout_ms' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <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://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions"
payload := strings.NewReader("{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-api-key", "<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))
}HttpResponse<String> response = Unirest.post("https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"command": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"execution_id": "<string>",
"machine_id": "<string>",
"artifacts": [
{
"artifact_id": "<string>",
"name": "<string>"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"env_keys": [
"<string>"
],
"error_code": "<string>",
"error_message": "<string>",
"exit_code": 123,
"expires_at": "2023-11-07T05:31:56Z",
"retry_after_ms": 123,
"signal": 123,
"started_at": "2023-11-07T05:31:56Z",
"stderr_bytes": 123,
"stderr_truncated": true,
"stdout_bytes": 123,
"stdout_truncated": true
}
Authorizations
ApiKeyAuthBearerAuth
Dedalus API key. Alternative to Bearer token.
Path Parameters
Required string length:
4 - 253Pattern:
^dm-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Body
application/json
Response
OK
Available options:
wake_in_progress, queued, running, succeeded, failed, cancelled, expired Show child attributes
Show child attributes
Last modified on July 13, 2026
Was this page helpful?
⌘I
Create execution
curl --request POST \
--url https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"command": [
"<string>"
],
"cwd": "<string>",
"env": {},
"stdin": "<string>",
"timeout_ms": 123
}
'import requests
url = "https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions"
payload = {
"command": ["<string>"],
"cwd": "<string>",
"env": {},
"stdin": "<string>",
"timeout_ms": 123
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
command: ['<string>'],
cwd: '<string>',
env: {},
stdin: '<string>',
timeout_ms: 123
})
};
fetch('https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions', 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://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions",
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([
'command' => [
'<string>'
],
'cwd' => '<string>',
'env' => [
],
'stdin' => '<string>',
'timeout_ms' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"x-api-key: <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://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions"
payload := strings.NewReader("{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("x-api-key", "<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))
}HttpResponse<String> response = Unirest.post("https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions")
.header("Idempotency-Key", "<idempotency-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dcs.dedaluslabs.ai/v1/machines/{machine_id}/executions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"command\": [\n \"<string>\"\n ],\n \"cwd\": \"<string>\",\n \"env\": {},\n \"stdin\": \"<string>\",\n \"timeout_ms\": 123\n}"
response = http.request(request)
puts response.read_body{
"command": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"execution_id": "<string>",
"machine_id": "<string>",
"artifacts": [
{
"artifact_id": "<string>",
"name": "<string>"
}
],
"completed_at": "2023-11-07T05:31:56Z",
"cwd": "<string>",
"env_keys": [
"<string>"
],
"error_code": "<string>",
"error_message": "<string>",
"exit_code": 123,
"expires_at": "2023-11-07T05:31:56Z",
"retry_after_ms": 123,
"signal": 123,
"started_at": "2023-11-07T05:31:56Z",
"stderr_bytes": 123,
"stderr_truncated": true,
"stdout_bytes": 123,
"stdout_truncated": true
}
