Référence de l'API

SaaS Image API · version 1.0.0 · URL de base https://app.imagebake.com/v1

API REST du SaaS d'édition d'images par workflows : envoyer des images, les faire passer dans un workflow publié, récupérer les fichiers produits.

Authentification

Chaque requête porte une clé API : Authorization: Bearer sk_live_…. Une clé se crée dans l'interface (menu Clés API) ; elle n'est affichée qu'une fois. Ses scopes limitent ce qu'elle peut faire : workflows:read, workflows:write, runs:read, runs:write. Les routes marquées « session » sont réservées à l'interface web.

Conventions

  • JSON partout, dates ISO 8601, poids en octets.
  • Identifiants préfixés : wf_ (workflow), wfv_ (version), ast_ (fichier), run_ (exécution), item_ (image d'un run), out_ (fichier produit), key_ (clé API), team_, usr_.
  • Listes paginées par curseur : { data, links, meta }. Passer meta.next_cursor dans ?cursor= pour la page suivante (null à la fin) ; ?per_page= règle la taille.
  • Erreurs au format unique { "error": { "type", "code", "message", "details" } }. Tester code, stable, plutôt que message.
  • Limite d'appels par clé selon le plan : en-têtes X-RateLimit-Limit et X-RateLimit-Remaining, puis 429 avec Retry-After.
  • Idempotence : l'en-tête Idempotency-Key sur POST /workflows/{workflow}/runs renvoie le même run si la requête est rejouée.

Parcours type

  1. POST /uploads : une URL d'envoi pré-signée par fichier ; envoyer le fichier en PUT directement sur cette URL.
  2. POST /uploads/{asset}/confirm : le fichier est vérifié et devient utilisable (ast_…).
  3. POST /workflows/{workflow}/runs avec assets et archive: true (ou ?wait=30 pour attendre la fin).
  4. GET /runs/{run} jusqu'à un statut final (succeeded, partial, failed, canceled), ou un webhook.
  5. GET /runs/{run}/archive : redirection vers le ZIP ; ou GET /runs/{run}/outputs pour chaque fichier.

Exemples complets (curl, Node, PHP) dans docs/api-examples/ du dépôt.

Admin

GET/healthpublic

Vérifie que la base, Redis et le stockage S3 répondent

Action modèle : même logique exposée en HTTP (GET /v1/health) et en commande (app:health).

Réponse 200

Tous les services répondent.

ChampType
status"ok" | "degraded"
checksobject

Erreurs

  • 503
curl -X GET "https://app.imagebake.com/v1/health"

GET/statuspublic

État public du service, pour la page de statut

État public du service, pour la page de statut (/status de la SPA) et les sondes externes : un statut par composant (operational, degraded, outage), sans détail interne.

  • API, base, cache (Redis), stockage : GetHealthStatus ; - traitement : outage sans worker Horizon, degraded si une file dépasse son seuil ou si le taux d'échec des images dépasse celui des alertes (MeasureOperations, config/ops.php).

Réponse 200

`PublicStatusResource`

ChampType
status"outage" | "degraded" | "operational"
versionstring
updated_atstring
componentsobject[]

Erreurs

  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/status"

Assets

POST/uploadsruns:write

Crée un asset `pending` par fichier annoncé et renvoie de quoi l'envoyer directement au bucket

Crée un asset pending par fichier annoncé et renvoie de quoi l'envoyer directement au bucket : une URL PUT pré-signée, ou une URL par partie au-delà de 10 Mo (multipart S3). Le fichier ne transite jamais par PHP ; le client appelle ensuite ConfirmUpload.

Corps (JSON)

ChampTypeDescription
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"

Indicatif : le vrai type est lu dans les octets à la confirmation.

Réponse 201

Liste de `UploadResource`

ChampType
dataobject[]

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 file_too_large, validation_failed
  • 429 too_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

Confirme qu'un fichier a été envoyé au bucket

Confirme qu'un fichier a été envoyé au bucket : termine l'upload multipart, vérifie le poids sans rien télécharger, puis lit le fichier pour le vérifier et le dédoublonner (IngestSourceFile). Idempotent : un asset déjà prêt est renvoyé tel quel.

Paramètres

NomOùTypeDescription
asset *pathstring

Identifiant ast_….

Réponse 200

`AssetResource`

ChampType
idstring
kind"source" | "output" | "archive" | "preview" | "watermark" | "catalog"
status"pending" | "ready" | "rejected"
original_namestring | null
mimestring | null
sizeinteger | null
widthinteger | null
heightinteger | null
sha256string | null
error_codestring | null
urlstring | null
expires_atstring | null
created_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 409 upload_incomplete, upload_not_found
  • 422 upload_rejected
  • 429 too_many_requests
curl -X POST "https://app.imagebake.com/v1/uploads/ast_01jbz8m6k3t7v9w2x4y6z8a0b2/confirm" \
  -H "Authorization: Bearer $API_KEY"

GET/assetsruns:read

Fichiers envoyés par l'équipe et encore disponibles, les plus récents d'abord

Fichiers envoyés par l'équipe et encore disponibles, les plus récents d'abord (choix d'une image d'exemple dans l'éditeur, filigranes).

Paramètres

NomOùTypeDescription
per_pagequeryinteger
kindquerystring

Type de fichier : source (par défaut) ou watermark.

cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `AssetResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/assets" \
  -H "Authorization: Bearer $API_KEY"

Billing

GET/planspublic

Plans en libre-service, du gratuit au plus complet, avec leurs prix et leurs limites

Public : sans authentification. Le plan Business (sur devis) n'est pas listé : sales_contact_url mène au service commercial.

Réponse 200

Liste de `PlanResource`

ChampType
dataobject[]
sales_contact_urlstring

Erreurs

  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/plans"

GET/usageruns:read

Consommation du mois en cours d'une équipe

Consommation du mois en cours d'une équipe : crédits du plan, offerts, packs de crédits, utilisés, réservés par les runs en cours, restants ; images traitées ; crédits et images par jour.

Réponse 200

`UsageResource`

ChampType
plan"free" | "starter" | "pro" | "team" | "business"
periodobject
creditsobject
images_processedinteger
dailyobject[]
limitsobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/usage" \
  -H "Authorization: Bearer $API_KEY"

POST/workflows/{workflow}/runs/estimateruns:read

Estimation haute des crédits d'un run

Estimation haute des crédits d'un run : chaque sortie au plus aussi grande que sa source, aucune en cache. Réservée à la création (ReserveCredits), ajustée à la fin (SettleCredits).

Appelée par CreateRun, et par la page « Exécuter » avant le lancement : POST /v1/workflows/{wf_…}/runs/estimate. Les assets inconnus, pas prêts ou expirés sont ignorés.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Corps (JSON)

ChampTypeDescription
versionstring
assets *string[]

Réponse 200

ChampType
creditsinteger

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 409 workflow_not_published
  • 422 validation_failed
  • 429 too_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

Entrées publiées du catalogue, dans l'ordre éditorial

Entrées publiées du catalogue, dans l'ordre éditorial (sort_order), filtrables par catégorie, recherche (titre, résumé et tags dans les deux langues, slug), modèles de départ et mises en avant. Les textes sont rendus dans la langue locale.

La liste publiée est en cache 10 minutes (catalog.cache_minutes) ; SyncCatalog l'invalide. Pas de pagination : le catalogue compte quelques dizaines d'entrées.

Remplace GET /v1/workflow-templates (starter=1).

Paramètres

NomOùTypeDescription
categoryquerystring
qquerystringnull
starterqueryboolean
featuredqueryboolean
localequerystring

Réponse 200

Liste de `CatalogWorkflowResource`

ChampType
dataobject[]

Erreurs

  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/catalog"

GET/catalog/{slug}public

Détail d'une entrée publiée du catalogue

Détail d'une entrée publiée du catalogue : description, graphe, paramètres à personnaliser, image d'exemple et fichiers produits avec URLs signées (le site public les télécharge au build).

Paramètres

NomOùTypeDescription
slug *pathstring
localequerystring

Réponse 200

`CatalogWorkflowDetailResource`

ChampType
idstring
slugstring
localestring
category"performance" | "social" | "ecommerce" | "content" | "brand" | "privacy"
titlestring
summarystring
tagsstring[]
graphobject
outputsobject[]
sample_sizeinteger | null
credits_per_imageinteger
is_starterboolean
is_featuredboolean
guest_enabledboolean
landing_slugstring | null
duplicates_countinteger
published_atstring | null
descriptionstring
fingerprintstring
engine_versionstring
highlighted_paramsobject[]
sampleobject | null
rendered_atstring | null

Erreurs

  • 403 forbidden
  • 404 catalog_workflow_not_found
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/catalog/<slug>"

POST/catalog/{slug}/duplicateworkflows:write

Duplique une entrée publiée du catalogue dans l'équipe

Duplique une entrée publiée du catalogue dans l'équipe : copie du graphe (avec les overrides des paramètres mis en avant, validés par le schéma du bloc), workflow nommé d'après le titre dans la langue de l'utilisateur (« Titre (2) » si le nom est pris), publié en v1 par défaut, image d'exemple posée comme image d'aperçu. La copie est indépendante : modifier l'une ne touche pas l'autre ; seule source_catalog_fingerprint garde la trace de la version copiée.

Provenance : ref (le paramètre de /use/:slug, ex. landing:social-media-image-resizer) est gardé dans l'événement d'usage, pour le widget « Acquisition » ; une valeur mal formée est ignorée.

Idempotence : avec la même Idempotency-Key, l'équipe récupère le même workflow (200), sans doublon.

Paramètres

NomOùTypeDescription
slug *pathstring
Idempotency-Keyheaderstring

Clé choisie par le client (1 à 255 caractères) : rejouée, la requête renvoie le même workflow (200) sans en créer un autre.

Corps (JSON)

ChampTypeDescription
namestring | null
publishboolean
overridesstring[]
source"app" | "landing"
locale"en" | "fr"
refstring | null

Provenance (ref de /use/:slug) : normalisée, ignorée si mal formée.

Réponse 200

Requête rejouée (même Idempotency-Key) : le workflow déjà créé.

ChampType
idstring
namestring
slugstring
descriptionstring | null
draftobject
latest_versionobject | null
preview_sampleobject | null
source_catalogobject | null
archived_atstring | null
created_atstring
updated_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 402 plan_limit_exceeded
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 catalog_workflow_not_found
  • 422 invalid_override, validation_failed
  • 429 too_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

Essai sans compte d'une entrée du catalogue marquée `guest`

Essai sans compte d'une entrée du catalogue marquée guest : une image envoyée depuis l'interface, traitée par le graphe du catalogue (avec les paramètres mis en avant personnalisés), en file (ProcessGuestRun).

Garde-fous, dans l'ordre : fonction activée, requête de la SPA (session Sanctum, CSRF vérifié), jeton Cloudflare Turnstile (VerifyTurnstileToken), paramètres valides, quota du visiteur et de son IP (GetGuestQuota, sous verrou par IP), puis vérification de l'image (IngestSourceFile, limites du plan gratuit). L'essai compte dans le quota dès sa création ; refusé ou en échec, il ne compte plus.

Paramètres

NomOùTypeDescription
slug *pathstring

Réponse 202

Essai créé, en file.

ChampType
idstring
status"pending" | "queued" | "running" | "succeeded" | "failed"
workflowobject
sourceobject | null
outputsobject[]
errorobject | null
duration_msinteger | null
created_atstring
finished_atstring | null
expires_atstring

Erreurs

  • 403 captcha_failed, forbidden, guest_not_allowed, interface_required
  • 404 catalog_workflow_not_found
  • 422 invalid_override, upload_rejected, validation_failed
  • 429 guest_quota_exceeded, too_many_requests
  • 503 guest_runs_unavailable
curl -X POST "https://app.imagebake.com/v1/catalog/<slug>/try" \
  -H "Content-Type: application/json" \
  -d '{ … }'

GET/guest/quotapublic

Essais sans compte restants

Essais sans compte restants : daily_limit par visiteur (cookie) et ip_daily_limit par adresse IP sur les window_hours dernières heures ; le plus contraignant des deux l'emporte. Les essais en échec ne comptent pas.

Réponse 200

`GuestQuotaResource`

ChampType
limitinteger
usedinteger
remaininginteger
window_hoursinteger
resets_atstring | null

Erreurs

  • 403 interface_required
  • 429 too_many_requests
  • 503 guest_runs_unavailable
curl -X GET "https://app.imagebake.com/v1/guest/quota"

GET/guest/runs/{guestRun}public

État d'un essai sans compte et ses fichiers

État d'un essai sans compte et ses fichiers (URLs signées), pour le visiteur qui l'a lancé (même cookie de navigateur) ; 404 pour tout autre, et une fois l'essai expiré.

L'interface l'interroge jusqu'à la fin du traitement.

Paramètres

NomOùTypeDescription
guestRun *pathstring

Réponse 200

`GuestRunResource`

ChampType
idstring
status"pending" | "queued" | "running" | "succeeded" | "failed"
workflowobject
sourceobject | null
outputsobject[]
errorobject | null
duration_msinteger | null
created_atstring
finished_atstring | null
expires_atstring

Erreurs

  • 403 forbidden, interface_required
  • 404 guest_run_not_found
  • 429 too_many_requests
  • 503 guest_runs_unavailable
curl -X GET "https://app.imagebake.com/v1/guest/runs/<guestRun>"

Engine

GET/blockspublic

Catalogue des blocs et schémas de paramètres, d'où l'éditeur génère ses formulaires

Réponse 200

Liste de `BlockResource`

ChampType
dataobject[]
curl -X GET "https://app.imagebake.com/v1/blocks"

Identity

GET/me/export/downloadpublic

Télécharger l'export des données du compte, depuis le lien signé envoyé par e-mail

Télécharge l'export des données du compte, depuis le lien signé envoyé par e-mail : redirige vers le ZIP (URL valable 15 minutes). Ne demande pas de session : le lien peut être ouvert dans un autre navigateur.

Paramètres

NomOùTypeDescription
export *querystring
expires *queryinteger
signature *querystring

Erreurs

  • 410 export_expired
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/me/export/download"

GET/me

Utilisateur, équipe courante, limites et clé API de l'appelant

L'utilisateur est null avec une clé API, la clé est null avec une session.

Réponse 200

`MeResource`

ChampType
userobject | null
teamobject
limitsobject
api_keyobject | null

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/me" \
  -H "Authorization: Bearer $API_KEY"

Runs

POST/workflows/{workflow}/runsruns:write

Lance un workflow publié sur un lot d'images

Lance un workflow publié sur un lot d'images : assets déjà envoyés et/ou URLs importées (ImportAssetFromUrl). Crée le run (queued) et une image par source, réserve les crédits estimés (ReserveCredits, 402 si le quota du mois ne suffit pas), puis DispatchRun.

Idempotence : avec la même Idempotency-Key, l'équipe récupère le même run, sans rien relancer.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

waitqueryinteger

Attendre la fin du run, jusqu'à ce nombre de secondes (30 au plus). Les sorties sont alors incluses dans la réponse.

Idempotency-Keyheaderstring

Clé choisie par le client (1 à 255 caractères) : rejouée, la requête renvoie le même run (200) sans en créer un autre.

Corps (JSON)

ChampTypeDescription
versionstring
assetsstring[]
urlsstring[]
archiveboolean
webhook_urlstring | null

Réponse 200

Run déjà créé avec la même `Idempotency-Key`.

ChampType
idstring
workflow_idstring
versionobject
origin"ui" | "api" | "cli" | "admin"
status"queued" | "running" | "succeeded" | "partial" | "failed" | "canceled"
countsobject
creditsobject
archiveobject
webhook_urlstring | null
errorsobject[]
outputsobject[]
created_atstring
started_atstring | null
finished_atstring | null
duration_msinteger | null

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 402 quota_exceeded
  • 403 email_unverified, forbidden, insufficient_scope, plan_limit_exceeded
  • 404 not_found
  • 409 workflow_archived, workflow_not_published
  • 422 invalid_assets, invalid_webhook_url, no_images, too_many_images, validation_failed
  • 429 too_many_requests
  • 503 billing_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

Runs d'une équipe, les plus récents d'abord, filtrables par statut et par workflow

Paramètres

NomOùTypeDescription
statusquerystring
workflowquerystring
per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `RunResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs" \
  -H "Authorization: Bearer $API_KEY"

GET/runs/{run}runs:read

Statut, compteurs et erreurs par image d'un run

Paramètres

NomOùTypeDescription
run *pathstring

Identifiant run_….

Réponse 200

`RunResource`

ChampType
idstring
workflow_idstring
versionobject
origin"ui" | "api" | "cli" | "admin"
status"queued" | "running" | "succeeded" | "partial" | "failed" | "canceled"
countsobject
creditsobject
archiveobject
webhook_urlstring | null
errorsobject[]
outputsobject[]
created_atstring
started_atstring | null
finished_atstring | null
duration_msinteger | null

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2" \
  -H "Authorization: Bearer $API_KEY"

GET/runs/{run}/itemsruns:read

Images d'un run dans l'ordre d'envoi, avec leur statut et, en cas d'échec, le nœud fautif

Paramètres

NomOùTypeDescription
run *pathstring

Identifiant run_….

per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `RunItemResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/items" \
  -H "Authorization: Bearer $API_KEY"

GET/runs/{run}/outputsruns:read

Fichiers produits par un run, avec leurs URLs de téléchargement signées

Fichiers produits par un run, avec leurs URLs de téléchargement signées (15 minutes).

Paramètres

NomOùTypeDescription
run *pathstring

Identifiant run_….

per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `RunOutputResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/outputs" \
  -H "Authorization: Bearer $API_KEY"

GET/runs/{run}/archiveruns:read

URL signée du ZIP d'un run terminé, valable 15 minutes

Si l'archive n'existe pas (non demandée, expirée après 48 h, échec), elle est (re)construite : null en attendant.

Paramètres

NomOùTypeDescription
run *pathstring

Identifiant run_….

Réponse 202

ChampType
statusstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 409 no_outputs, run_not_finished
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/archive" \
  -H "Authorization: Bearer $API_KEY"

POST/runs/{run}/cancelruns:write

Annule un run en cours

Annule un run en cours : les images en file ne seront pas traitées (batch annulé), celles en cours se terminent. FinalizeRun garde le statut canceled et compte ce qui a été fait. Idempotent sur un run déjà annulé.

Paramètres

NomOùTypeDescription
run *pathstring

Identifiant run_….

Réponse 200

`RunResource`

ChampType
idstring
workflow_idstring
versionobject
origin"ui" | "api" | "cli" | "admin"
status"queued" | "running" | "succeeded" | "partial" | "failed" | "canceled"
countsobject
creditsobject
archiveobject
webhook_urlstring | null
errorsobject[]
outputsobject[]
created_atstring
started_atstring | null
finished_atstring | null
duration_msinteger | null

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 409 run_finished
  • 429 too_many_requests
curl -X POST "https://app.imagebake.com/v1/runs/run_01jbz8m6k3t7v9w2x4y6z8a0b2/cancel" \
  -H "Authorization: Bearer $API_KEY"

GET/webhooks/secretruns:read

Secret de signature des webhooks de l'équipe

Secret de signature des webhooks de l'équipe (whsec_…), créé au premier appel. Le destinataire s'en sert pour vérifier l'en-tête X-Signature (voir SendRunWebhook).

Réponse 200

ChampType
secretstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/webhooks/secret" \
  -H "Authorization: Bearer $API_KEY"

GET/webhooks/deliveriesruns:read

Historique des livraisons de webhooks des runs de l'équipe, les plus récentes d'abord

Paramètres

NomOùTypeDescription
statusquerystring
per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `WebhookDeliveryResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/webhooks/deliveries" \
  -H "Authorization: Bearer $API_KEY"

POST/webhooks/deliveries/{delivery}/retryruns:write

Renvoie un événement déjà livré ou abandonné

Renvoie un événement déjà livré ou abandonné : nouvelle livraison (même run, même événement, même URL), signée avec le secret actuel et envoyée tout de suite, avec ses propres tentatives. L'ancienne reste dans l'historique.

Paramètres

NomOùTypeDescription
delivery *pathstring

Identifiant whd_….

Réponse 201

`WebhookDeliveryResource`

ChampType
idstring
run_idstring
event"run.succeeded" | "run.partial" | "run.failed"
urlstring
status"pending" | "delivered" | "failed"
attemptsinteger
response_statusinteger | null
last_errorstring | null
next_attempt_atstring | null
delivered_atstring | null
created_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope, plan_limit_exceeded
  • 404 not_found
  • 409 delivery_pending
  • 429 too_many_requests
curl -X POST "https://app.imagebake.com/v1/webhooks/deliveries/whd_01jbz8m6k3t7v9w2x4y6z8a0b2/retry" \
  -H "Authorization: Bearer $API_KEY"

Workflows

GET/workflowsworkflows:read

Workflows non archivés d'une équipe, les plus récents d'abord

Paramètres

NomOùTypeDescription
per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `WorkflowResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows" \
  -H "Authorization: Bearer $API_KEY"

POST/workflowsworkflows:write

Crée un workflow, avec un brouillon vide

Crée un workflow, avec un brouillon vide (une entrée reliée à une sortie) ou fourni. Seule la forme du brouillon est vérifiée. Pour partir d'un modèle du catalogue : DuplicateCatalogWorkflow.

Corps (JSON)

ChampTypeDescription
name *string
descriptionstring | null
draftstring[]

Réponse 201

`WorkflowResource`

ChampType
idstring
namestring
slugstring
descriptionstring | null
draftobject
latest_versionobject | null
preview_sampleobject | null
source_catalogobject | null
archived_atstring | null
created_atstring
updated_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 invalid_workflow, validation_failed
  • 429 too_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

Un workflow, son brouillon et sa dernière version

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Réponse 200

`WorkflowResource`

ChampType
idstring
namestring
slugstring
descriptionstring | null
draftobject
latest_versionobject | null
preview_sampleobject | null
source_catalogobject | null
archived_atstring | null
created_atstring
updated_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2" \
  -H "Authorization: Bearer $API_KEY"

PATCH/workflows/{workflow}workflows:write

Modifie le nom, la description ou le brouillon

Modifie le nom, la description ou le brouillon (sauvegarde automatique de l'éditeur). Seule la forme du brouillon est vérifiée : un graphe incomplet est accepté.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Corps (JSON)

ChampTypeDescription
namestring
descriptionstring | null
draftstring[]

Réponse 200

`WorkflowResource`

ChampType
idstring
namestring
slugstring
descriptionstring | null
draftobject
latest_versionobject | null
preview_sampleobject | null
source_catalogobject | null
archived_atstring | null
created_atstring
updated_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 422 invalid_workflow, validation_failed
  • 429 too_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

Archive un workflow

Archive un workflow : il disparaît de la liste et ne peut plus être modifié ni publié, mais ses versions restent lisibles (des exécutions y font référence). Idempotent.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Réponse 204

Aucun contenu

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 429 too_many_requests
curl -X DELETE "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2" \
  -H "Authorization: Bearer $API_KEY"

GET/workflows/{workflow}/exportworkflows:read

Document JSON du brouillon, ou d'une version publiée, à versionner dans un dépôt Git

Nom et description du workflow dans meta ; JSON canonique (clés triées), donc stable d'un export à l'autre.

Se réimporte par POST /v1/workflows/import.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

versionquerystring

Réponse 200

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/export" \
  -H "Authorization: Bearer $API_KEY"

POST/workflows/{workflow}/validateworkflows:read

Valide le brouillon comme à la publication, limite de nœuds du plan comprise

Liste vide = publiable.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Réponse 200

Résultat de la validation ; `errors` est vide si le brouillon est publiable.

ChampType
validboolean
errorsobject[]

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 429 too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/validate" \
  -H "Authorization: Bearer $API_KEY"

GET/workflows/{workflow}/versionsworkflows:read

Versions publiées d'un workflow, la plus récente d'abord, graphe compris

Versions publiées d'un workflow, la plus récente d'abord, graphe compris (l'éditeur restaure une version dans le brouillon).

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

per_pagequeryinteger
cursorquerystring

Curseur de la page voulue : meta.next_cursor (ou prev_cursor) de la réponse précédente.

Réponse 200

Liste de `WorkflowVersionResource`

ChampType
dataobject[]
linksobject
metaobject

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 422 validation_failed
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/versions" \
  -H "Authorization: Bearer $API_KEY"

POST/workflows/{workflow}/versionsworkflows:write

Fige le brouillon en version numérotée

Fige le brouillon en version numérotée : validation complète, plan d'exécution calculé une fois pour toutes, empreinte SHA-256 du JSON canonique. Le workflow est verrouillé pendant la transaction, donc deux publications simultanées obtiennent des numéros distincts.

Si le brouillon n'a pas changé depuis la dernière version (même empreinte), elle est renvoyée telle quelle.

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

Réponse 200

Brouillon inchangé : la dernière version.

ChampType
idstring
workflow_idstring
numberinteger
fingerprintstring
engine_versionstring
graphobject
published_bystring | null
created_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope, plan_limit_exceeded
  • 404 not_found
  • 409 workflow_archived
  • 422 invalid_workflow
  • 429 too_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

Une version publiée par son numéro, ou `latest` pour la dernière

Paramètres

NomOùTypeDescription
workflow *pathstring

Identifiant wf_….

number *pathstring

Réponse 200

`WorkflowVersionResource`

ChampType
idstring
workflow_idstring
numberinteger
fingerprintstring
engine_versionstring
graphobject
published_bystring | null
created_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, forbidden, insufficient_scope
  • 404 not_found
  • 429 too_many_requests
curl -X GET "https://app.imagebake.com/v1/workflows/wf_01jbz8m6k3t7v9w2x4y6z8a0b2/versions/<number>" \
  -H "Authorization: Bearer $API_KEY"

POST/workflows/importworkflows:write

Crée un workflow depuis un document exporté

Crée un workflow depuis un document exporté (corps de la requête = le fichier JSON). Le document devient le brouillon ; meta.name et meta.description deviennent le nom et la description.

Corps (JSON)

ChampTypeDescription
metaobject
meta.namestring | null
meta.descriptionstring | null

Réponse 201

`WorkflowResource`

ChampType
idstring
namestring
slugstring
descriptionstring | null
draftobject
latest_versionobject | null
preview_sampleobject | null
source_catalogobject | null
archived_atstring | null
created_atstring
updated_atstring

Erreurs

  • 401 invalid_api_key, unauthenticated
  • 403 email_unverified, insufficient_scope
  • 422 invalid_workflow, validation_failed
  • 429 too_many_requests
curl -X POST "https://app.imagebake.com/v1/workflows/import" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'