Create an app run
curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"specification_hash": "<string>",
"config": {
"model": {
"provider_id": "<string>",
"model_id": "<string>",
"use_cache": true,
"use_stream": true
}
},
"inputs": [
{}
],
"stream": true,
"blocking": true,
"block_filter": [
"<string>"
]
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs"
payload = {
"specification_hash": "<string>",
"config": { "model": {
"provider_id": "<string>",
"model_id": "<string>",
"use_cache": True,
"use_stream": True
} },
"inputs": [{}],
"stream": True,
"blocking": True,
"block_filter": ["<string>"]
}
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({
specification_hash: '<string>',
config: {
model: {
provider_id: '<string>',
model_id: '<string>',
use_cache: true,
use_stream: true
}
},
inputs: [{}],
stream: true,
blocking: true,
block_filter: ['<string>']
})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs",
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([
'specification_hash' => '<string>',
'config' => [
'model' => [
'provider_id' => '<string>',
'model_id' => '<string>',
'use_cache' => true,
'use_stream' => true
]
],
'inputs' => [
[
]
],
'stream' => true,
'blocking' => true,
'block_filter' => [
'<string>'
]
]),
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs"
payload := strings.NewReader("{\n \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs")
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 \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run": {
"run_id": "4a2c6e8b0d",
"app_id": "9f1d3b5a7c",
"status": {
"run": "succeeded",
"build": "succeeded"
},
"results": {},
"specification_hash": "8c0a4e6d2f",
"traces": [
[
{
"timestamp": 1234567890,
"trace": {}
}
]
]
}
}Apps
Create an app run
Create and execute a run for an app in the space specified by .
POST
/
api
/
v1
/
w
/
{wId}
/
spaces
/
{spaceId}
/
apps
/
{aId}
/
runs
Create an app run
curl --request POST \
--url https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"specification_hash": "<string>",
"config": {
"model": {
"provider_id": "<string>",
"model_id": "<string>",
"use_cache": true,
"use_stream": true
}
},
"inputs": [
{}
],
"stream": true,
"blocking": true,
"block_filter": [
"<string>"
]
}
'import requests
url = "https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs"
payload = {
"specification_hash": "<string>",
"config": { "model": {
"provider_id": "<string>",
"model_id": "<string>",
"use_cache": True,
"use_stream": True
} },
"inputs": [{}],
"stream": True,
"blocking": True,
"block_filter": ["<string>"]
}
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({
specification_hash: '<string>',
config: {
model: {
provider_id: '<string>',
model_id: '<string>',
use_cache: true,
use_stream: true
}
},
inputs: [{}],
stream: true,
blocking: true,
block_filter: ['<string>']
})
};
fetch('https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs', 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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs",
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([
'specification_hash' => '<string>',
'config' => [
'model' => [
'provider_id' => '<string>',
'model_id' => '<string>',
'use_cache' => true,
'use_stream' => true
]
],
'inputs' => [
[
]
],
'stream' => true,
'blocking' => true,
'block_filter' => [
'<string>'
]
]),
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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs"
payload := strings.NewReader("{\n \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\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://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs")
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 \"specification_hash\": \"<string>\",\n \"config\": {\n \"model\": {\n \"provider_id\": \"<string>\",\n \"model_id\": \"<string>\",\n \"use_cache\": true,\n \"use_stream\": true\n }\n },\n \"inputs\": [\n {}\n ],\n \"stream\": true,\n \"blocking\": true,\n \"block_filter\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run": {
"run_id": "4a2c6e8b0d",
"app_id": "9f1d3b5a7c",
"status": {
"run": "succeeded",
"build": "succeeded"
},
"results": {},
"specification_hash": "8c0a4e6d2f",
"traces": [
[
{
"timestamp": 1234567890,
"trace": {}
}
]
]
}
}Authorizations
Your DUST API key is a Bearer token.
Path Parameters
Unique string identifier for the workspace
ID of the space
Unique identifier of the app
Body
application/json
Hash of the app specification. Ensures API compatibility across app iterations.
Configuration for the app run
Show child attributes
Show child attributes
Array of input objects for the app
If true, the response will be streamed
If true, the request will block until the run is complete
Array of block names to filter the response
Response
App run created and executed successfully
Show child attributes
Show child attributes
⌘I