API reference
SaaS Image API · version 1.0.0 · base URL https://app.imagebake.com/v1
REST API of the workflow-based image editing SaaS: upload images, run them through a published workflow, download the output files.
Authentication
Every request carries an API key: Authorization: Bearer sk_live_…. A key is created in the interface (API keys menu); it is shown only once. Its scopes limit what it can do: workflows:read, workflows:write, runs:read, runs:write. Routes marked "session" are reserved for the web interface.
Conventions
- JSON everywhere, ISO 8601 dates, sizes in bytes.
- Prefixed identifiers:
wf_(workflow),wfv_(version),ast_(file),run_(run),item_(image of a run),out_(output file),key_(API key),team_,usr_. - Lists paginated by cursor:
{ data, links, meta }. Passmeta.next_cursorin?cursor=for the next page (null at the end);?per_page=sets the page size. - Errors in a single format
{ "error": { "type", "code", "message", "details" } }. Checkcode, which is stable, rather thanmessage. - Rate limit per key depending on the plan:
X-RateLimit-LimitandX-RateLimit-Remainingheaders, then429withRetry-After. - Idempotency: the
Idempotency-Keyheader onPOST /workflows/{workflow}/runsreturns the same run if the request is replayed.
Typical flow
POST /uploads: one pre-signed upload URL per file; send the file withPUTdirectly to that URL.POST /uploads/{asset}/confirm: the file is checked and becomes usable (ast_…).POST /workflows/{workflow}/runswithassetsandarchive: true(or?wait=30to wait for the end).GET /runs/{run}until a final status (succeeded,partial,failed,canceled), or a webhook.GET /runs/{run}/archive: redirect to the ZIP; orGET /runs/{run}/outputsfor each file.
Full examples (curl, Node, PHP) in the repository's docs/api-examples/.
Admin
GET/healthpublic
Checks that the database, Redis and S3 storage respond
Reference action: same logic exposed over HTTP (GET /v1/health) and as a command (app:health).
Response 200
All services respond.
| Field | Type |
|---|---|
status | "ok" | "degraded" |
checks | object |
Errors
503
curl -X GET "https://app.imagebake.com/v1/health"GET/statuspublic
Public service status, for the status page
Public service status, for the status page (/status in the SPA) and external probes: one status per component (operational, degraded, outage), with no internal details.
- API, database, cache (Redis), storage: GetHealthStatus; - processing:
outagewithout a Horizon worker,degradedif a queue exceeds its threshold or if the image failure rate exceeds the alert one (MeasureOperations, config/ops.php).
Response 200
`PublicStatusResource`
| Field | Type |
|---|---|
status | "outage" | "degraded" | "operational" |
version | string |
updated_at | string |
components | object[] |
Errors
429too_many_requests
curl -X GET "https://app.imagebake.com/v1/status"Assets
POST/uploadsruns:write
Creates a `pending` asset for each announced file and returns what is needed to send it straight to the bucket
Creates a pending asset for each announced file and returns what is needed to send it straight to the bucket: a pre-signed PUT URL, or one URL per part above 10 MB (S3 multipart). The file never goes through PHP; the client then calls ConfirmUpload.
Body (JSON)
| Field | Type | Description |
|---|---|---|
kind | "source" | "watermark" | |
files * | object[] | |
files[].name * | string | |
files[].size * | integer | |
files[].type | "image/jpeg" | "image/png" | "image/webp" | "image/avif" | "image/gif" | "image/tiff" | Informative only: the actual type is read from the bytes on confirmation. |
Response 201
Array of `UploadResource`
| Field | Type |
|---|---|
data | object[] |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422file_too_large,validation_failed429too_many_requests
curl -X POST "https://app.imagebake.com/v1/uploads" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'POST/uploads/{asset}/confirmruns:write
Confirms that a file has been sent to the bucket
Confirms that a file has been sent to the bucket: completes the multipart upload, checks the size without downloading anything, then reads the file to verify and deduplicate it (IngestSourceFile). Idempotent: an asset that is already ready is returned as is.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
asset * | path | string | Identifier |
Response 200
`AssetResource`
| Field | Type |
|---|---|
id | string |
kind | "source" | "output" | "archive" | "preview" | "watermark" | "catalog" |
status | "pending" | "ready" | "rejected" |
original_name | string | null |
mime | string | null |
size | integer | null |
width | integer | null |
height | integer | null |
sha256 | string | null |
error_code | string | null |
url | string | null |
expires_at | string | null |
created_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found409upload_incomplete,upload_not_found422upload_rejected429too_many_requests
curl -X POST "https://app.imagebake.com/v1/uploads/ast_01jbz8m6k3t7v9w2x4y6z8a0b2/confirm" \
-H "Authorization: Bearer $API_KEY"GET/assetsruns:read
Files uploaded by the team and still available, most recent first
Files uploaded by the team and still available, most recent first (picking a sample image in the editor, watermarks).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
per_page | query | integer | |
kind | query | string | File type: |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `AssetResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/assets" \
-H "Authorization: Bearer $API_KEY"Billing
GET/planspublic
Self-serve plans, from free to the most complete, with their prices and limits
Public: no authentication. The Business plan (custom quote) is not listed: sales_contact_url leads to sales.
Response 200
Array of `PlanResource`
| Field | Type |
|---|---|
data | object[] |
sales_contact_url | string |
Errors
429too_many_requests
curl -X GET "https://app.imagebake.com/v1/plans"GET/usageruns:read
A team's usage for the current month
A team's usage for the current month: plan credits, granted, credit packs, used, reserved by ongoing runs, remaining; processed images; credits and images per day.
Response 200
`UsageResource`
| Field | Type |
|---|---|
plan | "free" | "starter" | "pro" | "team" | "business" |
period | object |
credits | object |
images_processed | integer |
daily | object[] |
limits | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope429too_many_requests
curl -X GET "https://app.imagebake.com/v1/usage" \
-H "Authorization: Bearer $API_KEY"POST/workflows/{workflow}/runs/estimateruns:read
Upper estimate of a run's credits
Upper estimate of a run's credits: each output at most as large as its source, none cached. Reserved on creation (ReserveCredits), adjusted at the end (SettleCredits).
Called by CreateRun, and by the "Run" page before launching: POST /v1/workflows/{wf_…}/runs/estimate. Unknown, not ready or expired assets are ignored.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Body (JSON)
| Field | Type | Description |
|---|---|---|
version | string | |
assets * | string[] |
Response 200
| Field | Type |
|---|---|
credits | integer |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found409workflow_not_published422validation_failed429too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/runs/estimate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'Catalog
GET/catalogpublic
Published catalog entries, in editorial order
Published catalog entries, in editorial order (sort_order), filterable by category, search (title, summary and tags in both languages, slug), starter templates and featured entries. Texts are rendered in the locale language.
The published list is cached for 10 minutes (catalog.cache_minutes); SyncCatalog invalidates it. No pagination: the catalog has a few dozen entries.
Replaces GET /v1/workflow-templates (starter=1).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
category | query | string | |
q | query | stringnull | |
starter | query | boolean | |
featured | query | boolean | |
locale | query | string |
Response 200
Array of `CatalogWorkflowResource`
| Field | Type |
|---|---|
data | object[] |
Errors
422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/catalog"GET/catalog/{slug}public
Details of a published catalog entry
Details of a published catalog entry: description, graph, customizable parameters, sample image and output files with signed URLs (the public site downloads them at build time).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
slug * | path | string | |
locale | query | string |
Response 200
`CatalogWorkflowDetailResource`
| Field | Type |
|---|---|
id | string |
slug | string |
locale | string |
category | "performance" | "social" | "ecommerce" | "content" | "brand" | "privacy" |
title | string |
summary | string |
tags | string[] |
graph | object |
outputs | object[] |
sample_size | integer | null |
credits_per_image | integer |
is_starter | boolean |
is_featured | boolean |
guest_enabled | boolean |
landing_slug | string | null |
duplicates_count | integer |
published_at | string | null |
description | string |
fingerprint | string |
engine_version | string |
highlighted_params | object[] |
sample | object | null |
rendered_at | string | null |
Errors
403forbidden404catalog_workflow_not_found422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/catalog/<slug>"POST/catalog/{slug}/duplicateworkflows:write
Duplicates a published catalog entry into the team
Duplicates a published catalog entry into the team: copy of the graph (with overrides for the featured parameters, validated against the block schema), workflow named after the title in the user's language ("Title (2)" if the name is taken), published as v1 by default, sample image set as the preview image. The copy is independent: changing one does not affect the other; only source_catalog_fingerprint keeps track of the copied version.
Origin: ref (the /use/:slug parameter, e.g. landing:social-media-image-resizer) is kept in the usage event, for the "Acquisition" widget; a malformed value is ignored.
Idempotency: with the same Idempotency-Key, the team gets the same workflow back (200), without a duplicate.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
slug * | path | string | |
Idempotency-Key | header | string | Key chosen by the client (1 to 255 characters): when replayed, the request returns the same workflow (200) without creating another one. |
Body (JSON)
| Field | Type | Description |
|---|---|---|
name | string | null | |
publish | boolean | |
overrides | string[] | |
source | "app" | "landing" | |
locale | "en" | "fr" | |
ref | string | null | Origin ( |
Response 200
Replayed request (same Idempotency-Key): the workflow already created.
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
description | string | null |
draft | object |
latest_version | object | null |
preview_sample | object | null |
source_catalog | object | null |
archived_at | string | null |
created_at | string |
updated_at | string |
Errors
401invalid_api_key,unauthenticated402plan_limit_exceeded403email_unverified,forbidden,insufficient_scope404catalog_workflow_not_found422invalid_override,validation_failed429too_many_requests
curl -X POST "https://app.imagebake.com/v1/catalog/<slug>/duplicate" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'POST/catalog/{slug}/trypublic
Account-free trial of a catalog entry marked `guest`
Account-free trial of a catalog entry marked guest: one image uploaded from the interface, processed by the catalog graph (with the customized featured parameters), queued (ProcessGuestRun).
Safeguards, in order: feature enabled, request from the SPA (Sanctum session, CSRF checked), Cloudflare Turnstile token (VerifyTurnstileToken), valid parameters, quota of the visitor and their IP (GetGuestQuota, under a per-IP lock), then image check (IngestSourceFile, free plan limits). The trial counts against the quota as soon as it is created; once rejected or failed, it no longer counts.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
slug * | path | string |
Response 202
Trial created, queued.
| Field | Type |
|---|---|
id | string |
status | "pending" | "queued" | "running" | "succeeded" | "failed" |
workflow | object |
source | object | null |
outputs | object[] |
error | object | null |
duration_ms | integer | null |
created_at | string |
finished_at | string | null |
expires_at | string |
Errors
403captcha_failed,forbidden,guest_not_allowed,interface_required404catalog_workflow_not_found422invalid_override,upload_rejected,validation_failed429guest_quota_exceeded,too_many_requests503guest_runs_unavailable
curl -X POST "https://app.imagebake.com/v1/catalog/<slug>/try" \
-H "Content-Type: application/json" \
-d '{ … }'GET/guest/quotapublic
Remaining account-free trials
Remaining account-free trials: daily_limit per visitor (cookie) and ip_daily_limit per IP address over the last window_hours hours; the stricter of the two wins. Failed trials do not count.
Response 200
`GuestQuotaResource`
| Field | Type |
|---|---|
limit | integer |
used | integer |
remaining | integer |
window_hours | integer |
resets_at | string | null |
Errors
403interface_required429too_many_requests503guest_runs_unavailable
curl -X GET "https://app.imagebake.com/v1/guest/quota"GET/guest/runs/{guestRun}public
Status of an account-free trial and its files
Status of an account-free trial and its files (signed URLs), for the visitor who started it (same browser cookie); 404 for anyone else, and once the trial has expired.
The interface polls it until processing ends.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
guestRun * | path | string |
Response 200
`GuestRunResource`
| Field | Type |
|---|---|
id | string |
status | "pending" | "queued" | "running" | "succeeded" | "failed" |
workflow | object |
source | object | null |
outputs | object[] |
error | object | null |
duration_ms | integer | null |
created_at | string |
finished_at | string | null |
expires_at | string |
Errors
403forbidden,interface_required404guest_run_not_found429too_many_requests503guest_runs_unavailable
curl -X GET "https://app.imagebake.com/v1/guest/runs/<guestRun>"Engine
GET/blockspublic
Catalog of blocks and parameter schemas, from which the editor generates its forms
Response 200
Array of `BlockResource`
| Field | Type |
|---|---|
data | object[] |
curl -X GET "https://app.imagebake.com/v1/blocks"Identity
GET/me/export/downloadpublic
Downloads an account data export, from the signed link sent by email
Downloads an account data export, from the signed link sent by email: redirects to the ZIP (URL valid for 15 minutes). Does not require a session: the link can be opened in another browser.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
export * | query | string | |
expires * | query | integer | |
signature * | query | string |
Errors
410export_expired422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/me/export/download"GET/me
Caller's user, current team, limits and API key
The user is null with an API key, the key is null with a session.
Response 200
`MeResource`
| Field | Type |
|---|---|
user | object | null |
team | object |
limits | object |
api_key | object | null |
Errors
401invalid_api_key,unauthenticated429too_many_requests
curl -X GET "https://app.imagebake.com/v1/me" \
-H "Authorization: Bearer $API_KEY"Runs
POST/workflows/{workflow}/runsruns:write
Runs a published workflow on a batch of images
Runs a published workflow on a batch of images: already uploaded assets and/or imported URLs (ImportAssetFromUrl). Creates the run (queued) and one image per source, reserves the estimated credits (ReserveCredits, 402 if the monthly quota is not enough), then DispatchRun.
Idempotency: with the same Idempotency-Key, the team gets the same run back, without restarting anything.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
wait | query | integer | Wait for the run to finish, up to this number of seconds (30 at most). The outputs are then included in the response. |
Idempotency-Key | header | string | Key chosen by the client (1 to 255 characters): when replayed, the request returns the same run (200) without creating another one. |
Body (JSON)
| Field | Type | Description |
|---|---|---|
version | string | |
assets | string[] | |
urls | string[] | |
archive | boolean | |
webhook_url | string | null |
Response 200
Run already created with the same `Idempotency-Key`.
| Field | Type |
|---|---|
id | string |
workflow_id | string |
version | object |
origin | "ui" | "api" | "cli" | "admin" |
status | "queued" | "running" | "succeeded" | "partial" | "failed" | "canceled" |
counts | object |
credits | object |
archive | object |
webhook_url | string | null |
errors | object[] |
outputs | object[] |
created_at | string |
started_at | string | null |
finished_at | string | null |
duration_ms | integer | null |
Errors
401invalid_api_key,unauthenticated402quota_exceeded403email_unverified,forbidden,insufficient_scope,plan_limit_exceeded404not_found409workflow_archived,workflow_not_published422invalid_assets,invalid_webhook_url,no_images,too_many_images,validation_failed429too_many_requests503billing_busy,file_too_large,too_many_redirects,url_unreachable
curl -X POST "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/runs" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'GET/runsruns:read
A team's runs, most recent first, filterable by status and by workflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | |
workflow | query | string | |
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `RunResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs" \
-H "Authorization: Bearer $API_KEY"GET/runs/{run}runs:read
Status, counters and per-image errors of a run
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run * | path | string | Identifier |
Response 200
`RunResource`
| Field | Type |
|---|---|
id | string |
workflow_id | string |
version | object |
origin | "ui" | "api" | "cli" | "admin" |
status | "queued" | "running" | "succeeded" | "partial" | "failed" | "canceled" |
counts | object |
credits | object |
archive | object |
webhook_url | string | null |
errors | object[] |
outputs | object[] |
created_at | string |
started_at | string | null |
finished_at | string | null |
duration_ms | integer | null |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found429too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2" \
-H "Authorization: Bearer $API_KEY"GET/runs/{run}/itemsruns:read
A run's images in upload order, with their status and, on failure, the faulty node
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run * | path | string | Identifier |
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `RunItemResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/items" \
-H "Authorization: Bearer $API_KEY"GET/runs/{run}/outputsruns:read
Files produced by a run, with their signed download URLs
Files produced by a run, with their signed download URLs (15 minutes).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run * | path | string | Identifier |
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `RunOutputResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/outputs" \
-H "Authorization: Bearer $API_KEY"GET/runs/{run}/archiveruns:read
Signed URL of a finished run's ZIP, valid for 15 minutes
If the archive does not exist (not requested, expired after 48 h, failed), it is (re)built: null in the meantime.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run * | path | string | Identifier |
Response 202
| Field | Type |
|---|---|
status | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found409no_outputs,run_not_finished429too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/archive" \
-H "Authorization: Bearer $API_KEY"POST/runs/{run}/cancelruns:write
Cancels an ongoing run
Cancels an ongoing run: queued images will not be processed (batch cancelled), those in progress finish. FinalizeRun keeps the canceled status and counts what was done. Idempotent on an already cancelled run.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
run * | path | string | Identifier |
Response 200
`RunResource`
| Field | Type |
|---|---|
id | string |
workflow_id | string |
version | object |
origin | "ui" | "api" | "cli" | "admin" |
status | "queued" | "running" | "succeeded" | "partial" | "failed" | "canceled" |
counts | object |
credits | object |
archive | object |
webhook_url | string | null |
errors | object[] |
outputs | object[] |
created_at | string |
started_at | string | null |
finished_at | string | null |
duration_ms | integer | null |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found409run_finished429too_many_requests
curl -X POST "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/cancel" \
-H "Authorization: Bearer $API_KEY"GET/webhooks/secretruns:read
The team's webhook signing secret
The team's webhook signing secret (whsec_…), created on the first call. The recipient uses it to verify the X-Signature header (see SendRunWebhook).
Response 200
| Field | Type |
|---|---|
secret | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope429too_many_requests
curl -X GET "https://app.imagebake.com/v1/webhooks/secret" \
-H "Authorization: Bearer $API_KEY"GET/webhooks/deliveriesruns:read
History of webhook deliveries for the team's runs, most recent first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
status | query | string | |
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `WebhookDeliveryResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/webhooks/deliveries" \
-H "Authorization: Bearer $API_KEY"POST/webhooks/deliveries/{delivery}/retryruns:write
Resends an event that was already delivered or abandoned
Resends an event that was already delivered or abandoned: new delivery (same run, same event, same URL), signed with the current secret and sent right away, with its own attempts. The old one stays in the history.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
delivery * | path | string | Identifier |
Response 201
`WebhookDeliveryResource`
| Field | Type |
|---|---|
id | string |
run_id | string |
event | "run.succeeded" | "run.partial" | "run.failed" |
url | string |
status | "pending" | "delivered" | "failed" |
attempts | integer |
response_status | integer | null |
last_error | string | null |
next_attempt_at | string | null |
delivered_at | string | null |
created_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope,plan_limit_exceeded404not_found409delivery_pending429too_many_requests
curl -X POST "https://app.imagebake.com/v1/webhooks/deliveries/whd_01jbz8m6k3t7v9w2x4y6z8a0b2/retry" \
-H "Authorization: Bearer $API_KEY"Workflows
GET/workflowsworkflows:read
A team's non-archived workflows, most recent first
Parameters
| Name | In | Type | Description |
|---|---|---|---|
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `WorkflowResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows" \
-H "Authorization: Bearer $API_KEY"POST/workflowsworkflows:write
Creates a workflow, with an empty draft
Creates a workflow, with an empty draft (an input connected to an output) or a provided one. Only the shape of the draft is checked. To start from a catalog template: DuplicateCatalogWorkflow.
Body (JSON)
| Field | Type | Description |
|---|---|---|
name * | string | |
description | string | null | |
draft | string[] |
Response 201
`WorkflowResource`
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
description | string | null |
draft | object |
latest_version | object | null |
preview_sample | object | null |
source_catalog | object | null |
archived_at | string | null |
created_at | string |
updated_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422invalid_workflow,validation_failed429too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'GET/workflows/{workflow}workflows:read
A workflow, its draft and its latest version
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Response 200
`WorkflowResource`
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
description | string | null |
draft | object |
latest_version | object | null |
preview_sample | object | null |
source_catalog | object | null |
archived_at | string | null |
created_at | string |
updated_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found429too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2" \
-H "Authorization: Bearer $API_KEY"PATCH/workflows/{workflow}workflows:write
Updates the name, the description or the draft
Updates the name, the description or the draft (editor autosave). Only the shape of the draft is checked: an incomplete graph is accepted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Body (JSON)
| Field | Type | Description |
|---|---|---|
name | string | |
description | string | null | |
draft | string[] |
Response 200
`WorkflowResource`
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
description | string | null |
draft | object |
latest_version | object | null |
preview_sample | object | null |
source_catalog | object | null |
archived_at | string | null |
created_at | string |
updated_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found422invalid_workflow,validation_failed429too_many_requests
curl -X PATCH "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'DELETE/workflows/{workflow}workflows:write
Archives a workflow
Archives a workflow: it disappears from the list and can no longer be edited or published, but its versions remain readable (runs refer to them). Idempotent.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Response 204
No content
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found429too_many_requests
curl -X DELETE "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2" \
-H "Authorization: Bearer $API_KEY"GET/workflows/{workflow}/exportworkflows:read
JSON document of the draft, or of a published version, to keep under version control in a Git repository
Workflow name and description in meta; canonical JSON (sorted keys), hence stable from one export to the next.
Can be re-imported with POST /v1/workflows/import.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
version | query | string |
Response 200
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/export" \
-H "Authorization: Bearer $API_KEY"POST/workflows/{workflow}/validateworkflows:read
Validates the draft as on publishing, including the plan's node limit
Empty list = publishable.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Response 200
Validation result; `errors` is empty if the draft is publishable.
| Field | Type |
|---|---|
valid | boolean |
errors | object[] |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found429too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/validate" \
-H "Authorization: Bearer $API_KEY"GET/workflows/{workflow}/versionsworkflows:read
A workflow's published versions, most recent first, graph included
A workflow's published versions, most recent first, graph included (the editor restores a version into the draft).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
per_page | query | integer | |
cursor | query | string | Cursor of the requested page: |
Response 200
Array of `WorkflowVersionResource`
| Field | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found422validation_failed429too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/versions" \
-H "Authorization: Bearer $API_KEY"POST/workflows/{workflow}/versionsworkflows:write
Freezes the draft into a numbered version
Freezes the draft into a numbered version: full validation, execution plan computed once and for all, SHA-256 fingerprint of the canonical JSON. The workflow is locked during the transaction, so two simultaneous publications get distinct numbers.
If the draft has not changed since the latest version (same fingerprint), that version is returned as is.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
Response 200
Unchanged draft: the latest version.
| Field | Type |
|---|---|
id | string |
workflow_id | string |
number | integer |
fingerprint | string |
engine_version | string |
graph | object |
published_by | string | null |
created_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope,plan_limit_exceeded404not_found409workflow_archived422invalid_workflow429too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/versions" \
-H "Authorization: Bearer $API_KEY"GET/workflows/{workflow}/versions/{number}workflows:read
A published version by its number, or `latest` for the most recent one
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifier |
number * | path | string |
Response 200
`WorkflowVersionResource`
| Field | Type |
|---|---|
id | string |
workflow_id | string |
number | integer |
fingerprint | string |
engine_version | string |
graph | object |
published_by | string | null |
created_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,forbidden,insufficient_scope404not_found429too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/versions/<number>" \
-H "Authorization: Bearer $API_KEY"POST/workflows/importworkflows:write
Creates a workflow from an exported document
Creates a workflow from an exported document (request body = the JSON file). The document becomes the draft; meta.name and meta.description become the name and the description.
Body (JSON)
| Field | Type | Description |
|---|---|---|
meta | object | |
meta.name | string | null | |
meta.description | string | null |
Response 201
`WorkflowResource`
| Field | Type |
|---|---|
id | string |
name | string |
slug | string |
description | string | null |
draft | object |
latest_version | object | null |
preview_sample | object | null |
source_catalog | object | null |
archived_at | string | null |
created_at | string |
updated_at | string |
Errors
401invalid_api_key,unauthenticated403email_unverified,insufficient_scope422invalid_workflow,validation_failed429too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/import" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{ … }'