POST https://app.sushibelt.ai/api/v1/workflows/{id}/runs
Starts a run of one workflow. The cost is estimated and held from your team's credits before anything runs. Use the returned jobId to read the run, or pass callbackUrl to be told when it finishes. A workflow can have one run in progress at a time.
Needs an API key with the runs:create scope. See Scopes.
Every field is optional. An empty or missing body runs the workflow as it was built.
Run a workflow: request body fields
Name
Description
inputsobject (key → string) · Optional
Values that replace a step's value for this run, keyed by the step's API input key. A key that matches no step is refused with 422.
modestring · Optional
draft runs a cheaper pass for trying a workflow out: one variation, fewer sampling steps, short text answers. It is not a discount — a model priced per run costs the same. preview behaves like production. One of: production, draft, preview.Default: "production"
deferboolean · Optional
Queue the run to start later instead of now. The answer is 202 with a deferredJobId. A deferred run that has not started within 24 hours expires. Follow it with Get a deferred run; a callbackUrl passed with it is kept for the run it becomes.Default: false
maxMultipliernumber · Optional
Used only with defer: the price multiplier the deferred run waits for.Default: 0.7
callbackUrlstring (uri) · Optional
An https URL to send the Run finished webhook to. Anything other than https is refused with 422.
callbackSecretstring · Optional
A secret of your choosing. When set, each webhook is signed with it in X-Sushibelt-Signature.
202 Accepted — With defer: true: the run is queued to start later.
401 Unauthorized — The key is missing, malformed, unknown, revoked or expired. Message: Unauthorized.
402 Payment required — The run would spend more than you allow: the team's balance is below the estimate, the project's hard cap would be passed, one step would pass the team's per-step credit limit, or this key has reached its monthly credit cap. Messages: Insufficient credits, Monthly credit cap reached.
403 Forbidden — The key does not have the runs:create scope, or it is limited to other workflows. Messages: Scope not permitted for this key, Workflow not permitted for this key.
404 Not found — Nothing with this id exists in your team, or the workflow has no canvas. Messages: Workflow not found, Canvas not found.
409 Conflict — This workflow already has a run in progress.
422 Unprocessable content — An inputs key matches no step, callbackUrl is not https, the workflow failed validation, or a step can only run on providers whose integration level bars this run (providers names them, level says why): app_only ("In app · own key on API") runs through the API only on your team’s own key, byok_only only on it, and not_allowed / region_restricted not at all. Add your key under Team → Connections, run the workflow from the app, or pick another provider on that step. Messages: Unknown input key(s): foo, callbackUrl must be a valid https:// URL, DiffusionWorker runs on Fal, which is not available through the API without your own key. Add your key under Connections, run this workflow from the app, or pick another provider on that step..
429 Too many requests — Too many requests with this key. By default a key may make 60 requests a minute. Wait for the number of seconds in Retry-After. Message: Rate limit exceeded. Headers: Retry-After.
500 Server error — Something failed on our side. Message: Server error: ….
503 Service unavailable — The key has a monthly credit cap and it could not be checked just now, so the run was refused rather than started unmetered. Retry after Retry-After seconds. Message: Unable to verify monthly credit cap; try again shortly. Headers: Retry-After.
200 OK: response fields
Name
Description
jobIdstring (uuid) · Required
The run. Pass it to Get a run.
workflowIdstring (uuid) · Required
The workflow that is running.
statusstring · Required
Always queued.
estimatedCreditsnumber · Required
The estimated cost in credits (1 credit = $0.01). You are charged per step as each finishes.
POST https://app.sushibelt.ai/api/v1/agents/{id}/runs
Runs an agent's active workflow. If the agent has no active workflow, its newest workflow runs. The response names the workflow that ran in workflowId. The request body and responses are the same as Run a workflow.
Needs an API key with the runs:create scope. See Scopes.
Every field is optional. An empty or missing body runs the workflow as it was built.
Run an agent: request body fields
Name
Description
inputsobject (key → string) · Optional
Values that replace a step's value for this run, keyed by the step's API input key. A key that matches no step is refused with 422.
modestring · Optional
draft runs a cheaper pass for trying a workflow out: one variation, fewer sampling steps, short text answers. It is not a discount — a model priced per run costs the same. preview behaves like production. One of: production, draft, preview.Default: "production"
deferboolean · Optional
Queue the run to start later instead of now. The answer is 202 with a deferredJobId. A deferred run that has not started within 24 hours expires. Follow it with Get a deferred run; a callbackUrl passed with it is kept for the run it becomes.Default: false
maxMultipliernumber · Optional
Used only with defer: the price multiplier the deferred run waits for.Default: 0.7
callbackUrlstring (uri) · Optional
An https URL to send the Run finished webhook to. Anything other than https is refused with 422.
callbackSecretstring · Optional
A secret of your choosing. When set, each webhook is signed with it in X-Sushibelt-Signature.
202 Accepted — With defer: true: the run is queued to start later.
401 Unauthorized — The key is missing, malformed, unknown, revoked or expired. Message: Unauthorized.
402 Payment required — The run would spend more than you allow: the team's balance is below the estimate, the project's hard cap would be passed, one step would pass the team's per-step credit limit, or this key has reached its monthly credit cap. Messages: Insufficient credits, Monthly credit cap reached.
403 Forbidden — The key does not have the runs:create scope, or it is limited to other workflows. Messages: Scope not permitted for this key, Workflow not permitted for this key.
404 Not found — Nothing with this id exists in your team, or the workflow has no canvas. Messages: Agent not found, No workflow found for this agent, Workflow not found, Canvas not found.
409 Conflict — This workflow already has a run in progress.
422 Unprocessable content — An inputs key matches no step, callbackUrl is not https, the workflow failed validation, or a step can only run on providers whose integration level bars this run (providers names them, level says why): app_only ("In app · own key on API") runs through the API only on your team’s own key, byok_only only on it, and not_allowed / region_restricted not at all. Add your key under Team → Connections, run the workflow from the app, or pick another provider on that step. Messages: Unknown input key(s): foo, callbackUrl must be a valid https:// URL, DiffusionWorker runs on Fal, which is not available through the API without your own key. Add your key under Connections, run this workflow from the app, or pick another provider on that step..
429 Too many requests — Too many requests with this key. By default a key may make 60 requests a minute. Wait for the number of seconds in Retry-After. Message: Rate limit exceeded. Headers: Retry-After.
500 Server error — Something failed on our side. Message: Server error: ….
503 Service unavailable — The key has a monthly credit cap and it could not be checked just now, so the run was refused rather than started unmetered. Retry after Retry-After seconds. Message: Unable to verify monthly credit cap; try again shortly. Headers: Retry-After.
200 OK: response fields
Name
Description
jobIdstring (uuid) · Required
The run. Pass it to Get a run.
workflowIdstring (uuid) · Required
The workflow that is running.
statusstring · Required
Always queued.
estimatedCreditsnumber · Required
The estimated cost in credits (1 credit = $0.01). You are charged per step as each finishes.
Returns a run's status, each step's status, and — once the last steps finish — the output. Poll until status is completed or failed; a few seconds between reads is enough. Reading a run never spends credits, so a key over its monthly cap can still read the runs it started.
Needs an API key with the runs:read scope. See Scopes.
401 Unauthorized — The key is missing, malformed, unknown, revoked or expired. Message: Unauthorized.
403 Forbidden — The key does not have the runs:read scope. Message: Scope not permitted for this key.
404 Not found — No run with this id exists in your team. A run in another team reads the same way. Message: Run not found.
429 Too many requests — Too many requests with this key. By default a key may make 60 requests a minute. Wait for the number of seconds in Retry-After. Message: Rate limit exceeded. Headers: Retry-After.
200 OK: response fields
Name
Description
jobIdstring (uuid) · Required
No description.
statusstring · Required
Once steps exist: processing, then completed or failed (any failed step fails the run). Before that, the run's own state. One of: queued, claimed, processing, completed, failed, cancelled, stopped.
progressinteger · Required
Completed steps as a percentage.
stepsarray of RunStep · Required
No description.
steps[].node_idstring · Required
No description.
steps[].step_typestring · Required
No description.
steps[].statusstring · Required
One of: queued, processing, completed, failed, skipped, unknown.
steps[].errorstring · Optional
Why the step failed. Present only on a failed step.
outputarray of RunOutput · Required
What the last steps of the workflow produced — the steps nothing else reads from. Empty until they finish.
output[].node_idstring · Required
No description.
output[].step_typestring · Required
No description.
output[].resultany · Required
What the step produced — for an image step, the image URLs. The shape depends on the node type. Every file URL is Sushibelt's own copy, marked as AI-generated in its metadata (EU AI Act Art. 50(2)) and signed for two hours; a provider's link is never returned. Each file object carries availability: ready (the url is set), processing (the copy is still being made — poll again) or unavailable (the file could not be stored and marked; url is null).
output[].licenceobject · Optional
The licence this output ships under: as strict as the strictest model it comes from. Absent when no model step is involved. Not legal advice.
output[].licence.commercial_usestring · Required
One of: yes, provider_terms, unchecked, no.
output[].licence.modelsarray of LicenceModel · Required
No description.
output[].ai_generatedboolean · Required
True when this output, or any step it comes from, was made by an AI model — the machine-readable marking the EU AI Act (Art. 50) asks for. Images and audio are also marked inside the file.
output[].generated_byarray of object · Optional
The AI model steps this output comes from. Absent when none.
output[].generated_by[].node_idstring · Required
No description.
output[].generated_by[].providerstring · Required
No description.
output[].generated_by[].modelstring or null · Required
GET https://app.sushibelt.ai/api/v1/deferred-runs/{id}
Returns a run you started with defer: true: whether it is still waiting, has started, expired or was cancelled. Once it has started, jobId is the run it became — read that with Get a run.
Needs an API key with the runs:read scope. See Scopes.
401 Unauthorized — The key is missing, malformed, unknown, revoked or expired. Message: Unauthorized.
403 Forbidden — The key does not have the runs:read scope. Message: Scope not permitted for this key.
404 Not found — No deferred run with this id exists in your team. One in another team reads the same way. Message: Deferred run not found.
429 Too many requests — Too many requests with this key. By default a key may make 60 requests a minute. Wait for the number of seconds in Retry-After. Message: Rate limit exceeded. Headers: Retry-After.
200 OK: response fields
Name
Description
deferredJobIdstring (uuid) · Required
No description.
workflowIdstring (uuid) · Required
No description.
statusstring · Required
waiting until the price multiplier reaches maxMultiplier; dispatched once the run has started (see jobId); expired if it did not start within 24 hours, or could not be paid for or allowed when its turn came; cancelled if its key was revoked or expired, or you cancelled it. One of: waiting, dispatched, expired, cancelled.
maxMultipliernumber · Required
No description.
createdAtstring (date-time) · Required
No description.
expiresAtstring or null (date-time) · Required
No description.
dispatchedAtstring or null (date-time) · Required
No description.
jobIdstring or null (uuid) · Required
The run it became, once dispatched. Pass it to Get a run.
We send POST to the callbackUrl you passed when you started the run.
Sent to the callbackUrl you passed when you started a run, once the run completes or fails. The body is the same as Get a run, plus event. Reply with any 2xx status within 8 seconds. Anything else is retried: after 2 minutes, then twice as long each time, at most an hour apart, for 5 attempts in all. Because a delivery can arrive twice, treat jobId and event together as an idempotency key. When you passed callbackSecret, check X-Sushibelt-Signature: compute HMAC-SHA256 of the raw body with your secret, hex-encode it, and compare it to the value after sha256= in constant time.
One of: run.completed, run.failed, run.stopped, run.cancelled.
jobIdstring (uuid) · Required
No description.
statusstring · Required
No description.
progressinteger · Optional
No description.
stepsarray of RunStep · Optional
No description.
steps[].node_idstring · Required
No description.
steps[].step_typestring · Required
No description.
steps[].statusstring · Required
One of: queued, processing, completed, failed, skipped, unknown.
steps[].errorstring · Optional
Why the step failed. Present only on a failed step.
outputarray of RunOutput · Optional
No description.
output[].node_idstring · Required
No description.
output[].step_typestring · Required
No description.
output[].resultany · Required
What the step produced — for an image step, the image URLs. The shape depends on the node type. Every file URL is Sushibelt's own copy, marked as AI-generated in its metadata (EU AI Act Art. 50(2)) and signed for two hours; a provider's link is never returned. Each file object carries availability: ready (the url is set), processing (the copy is still being made — poll again) or unavailable (the file could not be stored and marked; url is null).
output[].licenceobject · Optional
The licence this output ships under: as strict as the strictest model it comes from. Absent when no model step is involved. Not legal advice.
output[].licence.commercial_usestring · Required
One of: yes, provider_terms, unchecked, no.
output[].licence.modelsarray of LicenceModel · Required
No description.
output[].ai_generatedboolean · Required
True when this output, or any step it comes from, was made by an AI model — the machine-readable marking the EU AI Act (Art. 50) asks for. Images and audio are also marked inside the file.
output[].generated_byarray of object · Optional
The AI model steps this output comes from. Absent when none.
output[].generated_by[].node_idstring · Required
No description.
output[].generated_by[].providerstring · Required
No description.
output[].generated_by[].modelstring or null · Required