Create proposal
curl --request POST \
--url https://api.sigmora.org/v1/workflow/proposals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"projectId": "prj_9x2a4c",
"snapshotId": "ctx_2e8b40",
"recipeId": "rcp_5c1d77",
"execution": {
"kind": "video.render",
"input": {
"story": "A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.",
"videoType": "lesson",
"aspect": "horizontal"
}
},
"usageEstimate": {
"credits": 300,
"mediaMinutes": 6,
"aiCredits": 120
},
"publishDestinationId": null
}
'import requests
url = "https://api.sigmora.org/v1/workflow/proposals"
payload = {
"projectId": "prj_9x2a4c",
"snapshotId": "ctx_2e8b40",
"recipeId": "rcp_5c1d77",
"execution": {
"kind": "video.render",
"input": {
"story": "A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.",
"videoType": "lesson",
"aspect": "horizontal"
}
},
"usageEstimate": {
"credits": 300,
"mediaMinutes": 6,
"aiCredits": 120
},
"publishDestinationId": None
}
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({
projectId: 'prj_9x2a4c',
snapshotId: 'ctx_2e8b40',
recipeId: 'rcp_5c1d77',
execution: {
kind: 'video.render',
input: {
story: 'A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.',
videoType: 'lesson',
aspect: 'horizontal'
}
},
usageEstimate: {credits: 300, mediaMinutes: 6, aiCredits: 120},
publishDestinationId: null
})
};
fetch('https://api.sigmora.org/v1/workflow/proposals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"proposal": {
"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 proposal
Create a costed, version-pinned workflow proposal.
POST
/
v1
/
workflow
/
proposals
Create proposal
curl --request POST \
--url https://api.sigmora.org/v1/workflow/proposals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'idempotency-key: <idempotency-key>' \
--data '
{
"projectId": "prj_9x2a4c",
"snapshotId": "ctx_2e8b40",
"recipeId": "rcp_5c1d77",
"execution": {
"kind": "video.render",
"input": {
"story": "A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.",
"videoType": "lesson",
"aspect": "horizontal"
}
},
"usageEstimate": {
"credits": 300,
"mediaMinutes": 6,
"aiCredits": 120
},
"publishDestinationId": null
}
'import requests
url = "https://api.sigmora.org/v1/workflow/proposals"
payload = {
"projectId": "prj_9x2a4c",
"snapshotId": "ctx_2e8b40",
"recipeId": "rcp_5c1d77",
"execution": {
"kind": "video.render",
"input": {
"story": "A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.",
"videoType": "lesson",
"aspect": "horizontal"
}
},
"usageEstimate": {
"credits": 300,
"mediaMinutes": 6,
"aiCredits": 120
},
"publishDestinationId": None
}
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({
projectId: 'prj_9x2a4c',
snapshotId: 'ctx_2e8b40',
recipeId: 'rcp_5c1d77',
execution: {
kind: 'video.render',
input: {
story: 'A mean tells you where the middle of your data sits; a standard deviation tells you how far a typical point wanders from it. Two classes can share a mean of 70 and still look nothing alike: in one, every score lands between 65 and 75; in the other, half the room scored 40 and half scored 100. The standard deviation is the number that tells those classes apart.',
videoType: 'lesson',
aspect: 'horizontal'
}
},
usageEstimate: {credits: 300, mediaMinutes: 6, aiCredits: 120},
publishDestinationId: null
})
};
fetch('https://api.sigmora.org/v1/workflow/proposals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"proposal": {
"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
Authorized project where the proposal may run.
Required string length:
1 - 200Immutable authorized context snapshot the proposal will use.
Required string length:
1 - 200Approved workflow recipe to pin for this proposal.
Required string length:
1 - 200Bounded operation and its validated execution input.
Show child attributes
Show child attributes
Caller-visible estimate used for credit and approval review.
Show child attributes
Show child attributes
Immutable recipe revision to use; omit to pin the current approved revision.
Required range:
x <= 9007199254740991Approved destination id for publish work, or null when the proposal does not publish.
Required string length:
1 - 200Optional RFC 3339 expiry after which approval is refused.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$