Create recipe
curl --request POST \
--url https://api.sigmora.org/v1/workflow/recipes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"scope": "workspace",
"title": "Lesson plan to narrated lesson",
"description": "Turns an approved lesson plan into a scripted, editor-reviewed lesson video.",
"definition": {
"acceptedTriggers": [
"manual",
"approved_file"
],
"inputTypes": [
"document"
],
"requiredSourceRoles": [
"primary",
"brand"
],
"steps": [
{
"id": "draft-script",
"kind": "model_assisted",
"title": "Draft a narrated lesson script",
"retryable": true,
"compensates": false
},
{
"id": "editor-review",
"kind": "human_gate",
"title": "Editor approves the script",
"retryable": false,
"compensates": false
},
{
"id": "render",
"kind": "deterministic",
"title": "Render the lesson video",
"retryable": true,
"compensates": false
}
],
"outputs": [
{
"type": "script",
"required": true
},
{
"type": "video",
"required": true
},
{
"type": "captions",
"required": false
}
],
"qualityChecks": [
{
"id": "claims-cited",
"kind": "factual",
"blocking": true
},
{
"id": "brand-voice",
"kind": "brand",
"blocking": false
}
],
"autonomy": {
"mode": "supervised",
"maxCredits": 1500,
"allowedSourceConnectors": [
"google_drive",
"sigmora"
],
"allowedDestinations": [],
"generationApprovalRequired": true,
"publishApprovalRequired": true,
"reviewAt": null,
"killSwitchEnabled": true
},
"retentionMode": "artifacts_only",
"lockedParameters": [
"aspect"
]
}
}
'import requests
url = "https://api.sigmora.org/v1/workflow/recipes"
payload = {
"scope": "workspace",
"title": "Lesson plan to narrated lesson",
"description": "Turns an approved lesson plan into a scripted, editor-reviewed lesson video.",
"definition": {
"acceptedTriggers": ["manual", "approved_file"],
"inputTypes": ["document"],
"requiredSourceRoles": ["primary", "brand"],
"steps": [
{
"id": "draft-script",
"kind": "model_assisted",
"title": "Draft a narrated lesson script",
"retryable": True,
"compensates": False
},
{
"id": "editor-review",
"kind": "human_gate",
"title": "Editor approves the script",
"retryable": False,
"compensates": False
},
{
"id": "render",
"kind": "deterministic",
"title": "Render the lesson video",
"retryable": True,
"compensates": False
}
],
"outputs": [
{
"type": "script",
"required": True
},
{
"type": "video",
"required": True
},
{
"type": "captions",
"required": False
}
],
"qualityChecks": [
{
"id": "claims-cited",
"kind": "factual",
"blocking": True
},
{
"id": "brand-voice",
"kind": "brand",
"blocking": False
}
],
"autonomy": {
"mode": "supervised",
"maxCredits": 1500,
"allowedSourceConnectors": ["google_drive", "sigmora"],
"allowedDestinations": [],
"generationApprovalRequired": True,
"publishApprovalRequired": True,
"reviewAt": None,
"killSwitchEnabled": True
},
"retentionMode": "artifacts_only",
"lockedParameters": ["aspect"]
}
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
scope: 'workspace',
title: 'Lesson plan to narrated lesson',
description: 'Turns an approved lesson plan into a scripted, editor-reviewed lesson video.',
definition: {
acceptedTriggers: ['manual', 'approved_file'],
inputTypes: ['document'],
requiredSourceRoles: ['primary', 'brand'],
steps: [
{
id: 'draft-script',
kind: 'model_assisted',
title: 'Draft a narrated lesson script',
retryable: true,
compensates: false
},
{
id: 'editor-review',
kind: 'human_gate',
title: 'Editor approves the script',
retryable: false,
compensates: false
},
{
id: 'render',
kind: 'deterministic',
title: 'Render the lesson video',
retryable: true,
compensates: false
}
],
outputs: [
{type: 'script', required: true},
{type: 'video', required: true},
{type: 'captions', required: false}
],
qualityChecks: [
{id: 'claims-cited', kind: 'factual', blocking: true},
{id: 'brand-voice', kind: 'brand', blocking: false}
],
autonomy: {
mode: 'supervised',
maxCredits: 1500,
allowedSourceConnectors: ['google_drive', 'sigmora'],
allowedDestinations: [],
generationApprovalRequired: true,
publishApprovalRequired: true,
reviewAt: null,
killSwitchEnabled: true
},
retentionMode: 'artifacts_only',
lockedParameters: ['aspect']
}
})
};
fetch('https://api.sigmora.org/v1/workflow/recipes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"recipe": {
"id": "<string>"
},
"version": {
"id": "<string>"
}
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Create recipe
Create a versioned workflow recipe. Workspace recipes require workspace-owner authority; personal recipes remain private until explicitly copied.
POST
/
v1
/
workflow
/
recipes
Create recipe
curl --request POST \
--url https://api.sigmora.org/v1/workflow/recipes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"scope": "workspace",
"title": "Lesson plan to narrated lesson",
"description": "Turns an approved lesson plan into a scripted, editor-reviewed lesson video.",
"definition": {
"acceptedTriggers": [
"manual",
"approved_file"
],
"inputTypes": [
"document"
],
"requiredSourceRoles": [
"primary",
"brand"
],
"steps": [
{
"id": "draft-script",
"kind": "model_assisted",
"title": "Draft a narrated lesson script",
"retryable": true,
"compensates": false
},
{
"id": "editor-review",
"kind": "human_gate",
"title": "Editor approves the script",
"retryable": false,
"compensates": false
},
{
"id": "render",
"kind": "deterministic",
"title": "Render the lesson video",
"retryable": true,
"compensates": false
}
],
"outputs": [
{
"type": "script",
"required": true
},
{
"type": "video",
"required": true
},
{
"type": "captions",
"required": false
}
],
"qualityChecks": [
{
"id": "claims-cited",
"kind": "factual",
"blocking": true
},
{
"id": "brand-voice",
"kind": "brand",
"blocking": false
}
],
"autonomy": {
"mode": "supervised",
"maxCredits": 1500,
"allowedSourceConnectors": [
"google_drive",
"sigmora"
],
"allowedDestinations": [],
"generationApprovalRequired": true,
"publishApprovalRequired": true,
"reviewAt": null,
"killSwitchEnabled": true
},
"retentionMode": "artifacts_only",
"lockedParameters": [
"aspect"
]
}
}
'import requests
url = "https://api.sigmora.org/v1/workflow/recipes"
payload = {
"scope": "workspace",
"title": "Lesson plan to narrated lesson",
"description": "Turns an approved lesson plan into a scripted, editor-reviewed lesson video.",
"definition": {
"acceptedTriggers": ["manual", "approved_file"],
"inputTypes": ["document"],
"requiredSourceRoles": ["primary", "brand"],
"steps": [
{
"id": "draft-script",
"kind": "model_assisted",
"title": "Draft a narrated lesson script",
"retryable": True,
"compensates": False
},
{
"id": "editor-review",
"kind": "human_gate",
"title": "Editor approves the script",
"retryable": False,
"compensates": False
},
{
"id": "render",
"kind": "deterministic",
"title": "Render the lesson video",
"retryable": True,
"compensates": False
}
],
"outputs": [
{
"type": "script",
"required": True
},
{
"type": "video",
"required": True
},
{
"type": "captions",
"required": False
}
],
"qualityChecks": [
{
"id": "claims-cited",
"kind": "factual",
"blocking": True
},
{
"id": "brand-voice",
"kind": "brand",
"blocking": False
}
],
"autonomy": {
"mode": "supervised",
"maxCredits": 1500,
"allowedSourceConnectors": ["google_drive", "sigmora"],
"allowedDestinations": [],
"generationApprovalRequired": True,
"publishApprovalRequired": True,
"reviewAt": None,
"killSwitchEnabled": True
},
"retentionMode": "artifacts_only",
"lockedParameters": ["aspect"]
}
}
headers = {
"idempotency-key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'idempotency-key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
scope: 'workspace',
title: 'Lesson plan to narrated lesson',
description: 'Turns an approved lesson plan into a scripted, editor-reviewed lesson video.',
definition: {
acceptedTriggers: ['manual', 'approved_file'],
inputTypes: ['document'],
requiredSourceRoles: ['primary', 'brand'],
steps: [
{
id: 'draft-script',
kind: 'model_assisted',
title: 'Draft a narrated lesson script',
retryable: true,
compensates: false
},
{
id: 'editor-review',
kind: 'human_gate',
title: 'Editor approves the script',
retryable: false,
compensates: false
},
{
id: 'render',
kind: 'deterministic',
title: 'Render the lesson video',
retryable: true,
compensates: false
}
],
outputs: [
{type: 'script', required: true},
{type: 'video', required: true},
{type: 'captions', required: false}
],
qualityChecks: [
{id: 'claims-cited', kind: 'factual', blocking: true},
{id: 'brand-voice', kind: 'brand', blocking: false}
],
autonomy: {
mode: 'supervised',
maxCredits: 1500,
allowedSourceConnectors: ['google_drive', 'sigmora'],
allowedDestinations: [],
generationApprovalRequired: true,
publishApprovalRequired: true,
reviewAt: null,
killSwitchEnabled: true
},
retentionMode: 'artifacts_only',
lockedParameters: ['aspect']
}
})
};
fetch('https://api.sigmora.org/v1/workflow/recipes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"recipe": {
"id": "<string>"
},
"version": {
"id": "<string>"
}
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}{
"success": false,
"error": "<string>",
"code": "invalid_request",
"details": "<unknown>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}Authorizations
A workspace API key.
Headers
Required stable id for this logical write; reuse it after a timeout. Upload endpoints also require the same value in body.idempotencyKey.
Required string length:
1 - 255Body
application/json
Recipe ownership scope; workspace recipes require workspace-owner authority.
Available options:
personal, workspace Short human-readable recipe name.
Required string length:
1 - 240What the recipe does, its intended outcome, and important operating constraints.
Required string length:
1 - 4000Immutable versioned recipe behavior, outputs, quality checks, and autonomy policy.
Show child attributes
Show child attributes