Get your draft of a crew
curl --request GET \
--url https://api.example.com/api/crew-templates/drafts/{key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/crew-templates/drafts/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/crew-templates/drafts/{key}', 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.example.com/api/crew-templates/drafts/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/crew-templates/drafts/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/crew-templates/drafts/{key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/drafts/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"key": "<string>",
"spec": {
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
],
"name": "",
"tools": [
"<string>"
],
"approval": {},
"max_execution_time": 43200,
"max_tool_calls": 5000,
"output_format": "text",
"human_checkpoint": false
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
},
"defaults": {
"max_execution_time": 43200,
"max_tool_calls": 5000,
"max_iterations": 500,
"approval_tools": [
"<string>"
],
"notify_on_failure": true
}
},
"description": "",
"tags": [
"<string>"
],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"is_shared": false,
"change_note": ""
},
"updated_at": "<string>",
"base_version": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Crew templates
Get your draft of a crew
Your unsaved working copy of a crew, as the builder last kept it. A draft is yours alone and is not a version: nothing runs from it.
GET
/
api
/
crew-templates
/
drafts
/
{key}
Get your draft of a crew
curl --request GET \
--url https://api.example.com/api/crew-templates/drafts/{key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/crew-templates/drafts/{key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/crew-templates/drafts/{key}', 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.example.com/api/crew-templates/drafts/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/crew-templates/drafts/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/crew-templates/drafts/{key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/crew-templates/drafts/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"key": "<string>",
"spec": {
"name": "<string>",
"crew_config": {
"agents": [
{
"id": "<string>",
"ref": {
"artifact_id": "<string>",
"version": "<string>"
},
"role": "",
"goal": "",
"backstory": ""
}
],
"tasks": [
{
"description": "<string>",
"agent_index": 0,
"expected_output": "",
"context": [
123
],
"name": "",
"tools": [
"<string>"
],
"approval": {},
"max_execution_time": 43200,
"max_tool_calls": 5000,
"output_format": "text",
"human_checkpoint": false
}
],
"id": "<string>",
"verbose": false,
"process": "sequential",
"layout": {},
"context_packs": [
{
"artifact_id": "<string>",
"version": "<string>",
"token_budget": 101
}
],
"repository": {
"repos": [
{
"artifact_id": "<string>",
"version": "<string>"
}
],
"branch_prefix": "nx1/",
"max_files": 5,
"max_lines": 200,
"may_open_pr": true,
"may_comment": false
},
"defaults": {
"max_execution_time": 43200,
"max_tool_calls": 5000,
"max_iterations": 500,
"approval_tools": [
"<string>"
],
"notify_on_failure": true
}
},
"description": "",
"tags": [
"<string>"
],
"variables": [
{
"name": "<string>",
"label": "<string>",
"description": "",
"type": "string",
"required": true,
"default": "<unknown>",
"choices": [
"<string>"
],
"min_length": 123,
"max_length": 123,
"min_value": 123,
"max_value": 123,
"sensitive": false,
"group": "<string>",
"show_if": {}
}
],
"is_shared": false,
"change_note": ""
},
"updated_at": "<string>",
"base_version": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
Path Parameters
Response
Successful Response
Was this page helpful?

