Generate a workflow from a brief, template, or blank scaffold
Create a Workflow + one draft revision from a single seed.
brief runs the async compile pipeline (HTTP 202, poll
GET /workflows/revisions/{revision_id}); template_id / blank seed a
graph synchronously (HTTP 201, LLM-free). Exactly one seed must be provided.
POST
/
v1
/
workflows
/
generate
Generate a workflow from a brief, template, or blank scaffold
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/workflows/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"brief": "<string>",
"template_id": "<string>",
"blank": false,
"kind": "component"
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/generate"
payload = {
"name": "<string>",
"description": "<string>",
"brief": "<string>",
"template_id": "<string>",
"blank": False,
"kind": "component"
}
headers = {
"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: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
brief: '<string>',
template_id: '<string>',
blank: false,
kind: 'component'
})
};
fetch('https://api-sandbox.featherhq.com/v1/workflows/generate', 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-sandbox.featherhq.com/v1/workflows/generate",
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([
'name' => '<string>',
'description' => '<string>',
'brief' => '<string>',
'template_id' => '<string>',
'blank' => false,
'kind' => 'component'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://api-sandbox.featherhq.com/v1/workflows/generate"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api-sandbox.featherhq.com/v1/workflows/generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}"
response = http.request(request)
puts response.read_body{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation_status": "<string>",
"mode": "brief"
}{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation_status": "<string>",
"mode": "brief"
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Headers
Body
application/json
Body for POST /workflows/generate.
Exactly one of brief / template_id / blank must be supplied
(enforced below; else 422). brief runs the async compile pipeline;
template_id / blank seed a graph synchronously (LLM-free).
Response
Successful Response
Result of generate. generation_status is the new revision's
compilation_status (pending for a fresh brief, succeeded for
template/blank/cache-hit). mode echoes which seed ran.
Was this page helpful?
⌘I
Generate a workflow from a brief, template, or blank scaffold
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/workflows/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"brief": "<string>",
"template_id": "<string>",
"blank": false,
"kind": "component"
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/workflows/generate"
payload = {
"name": "<string>",
"description": "<string>",
"brief": "<string>",
"template_id": "<string>",
"blank": False,
"kind": "component"
}
headers = {
"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: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
brief: '<string>',
template_id: '<string>',
blank: false,
kind: 'component'
})
};
fetch('https://api-sandbox.featherhq.com/v1/workflows/generate', 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-sandbox.featherhq.com/v1/workflows/generate",
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([
'name' => '<string>',
'description' => '<string>',
'brief' => '<string>',
'template_id' => '<string>',
'blank' => false,
'kind' => 'component'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://api-sandbox.featherhq.com/v1/workflows/generate"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api-sandbox.featherhq.com/v1/workflows/generate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/workflows/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"brief\": \"<string>\",\n \"template_id\": \"<string>\",\n \"blank\": false,\n \"kind\": \"component\"\n}"
response = http.request(request)
puts response.read_body{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation_status": "<string>",
"mode": "brief"
}{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation_status": "<string>",
"mode": "brief"
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}