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 }. Passermeta.next_cursordans?cursor=pour la page suivante (null à la fin) ;?per_page=règle la taille. - Erreurs au format unique
{ "error": { "type", "code", "message", "details" } }. Testercode, stable, plutôt quemessage. - Limite d'appels par clé selon le plan : en-têtes
X-RateLimit-LimitetX-RateLimit-Remaining, puis429avecRetry-After. - Idempotence : l'en-tête
Idempotency-KeysurPOST /workflows/{workflow}/runsrenvoie le même run si la requête est rejouée.
Parcours type
POST /uploads: une URL d'envoi pré-signée par fichier ; envoyer le fichier enPUTdirectement sur cette URL.POST /uploads/{asset}/confirm: le fichier est vérifié et devient utilisable (ast_…).POST /workflows/{workflow}/runsavecassetsetarchive: true(ou?wait=30pour attendre la fin).GET /runs/{run}jusqu'à un statut final (succeeded,partial,failed,canceled), ou un webhook.GET /runs/{run}/archive: redirection vers le ZIP ; ouGET /runs/{run}/outputspour 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.
| Champ | Type |
|---|---|
status | "ok" | "degraded" |
checks | object |
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 :
outagesans worker Horizon,degradedsi 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`
| Champ | Type |
|---|---|
status | "outage" | "degraded" | "operational" |
version | string |
updated_at | string |
components | object[] |
Erreurs
429too_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)
| Champ | 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" | Indicatif : le vrai type est lu dans les octets à la confirmation. |
Réponse 201
Liste de `UploadResource`
| Champ | Type |
|---|---|
data | object[] |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
asset * | path | string | Identifiant |
Réponse 200
`AssetResource`
| Champ | 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 |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
per_page | query | integer | |
kind | query | string | Type de fichier : |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `AssetResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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`
| Champ | Type |
|---|---|
data | object[] |
sales_contact_url | string |
Erreurs
429too_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`
| Champ | Type |
|---|---|
plan | "free" | "starter" | "pro" | "team" | "business" |
period | object |
credits | object |
images_processed | integer |
daily | object[] |
limits | object |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Corps (JSON)
| Champ | Type | Description |
|---|---|---|
version | string | |
assets * | string[] |
Réponse 200
| Champ | Type |
|---|---|
credits | integer |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
category | query | string | |
q | query | stringnull | |
starter | query | boolean | |
featured | query | boolean | |
locale | query | string |
Réponse 200
Liste de `CatalogWorkflowResource`
| Champ | Type |
|---|---|
data | object[] |
Erreurs
422validation_failed429too_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
| Nom | Où | Type | Description |
|---|---|---|---|
slug * | path | string | |
locale | query | string |
Réponse 200
`CatalogWorkflowDetailResource`
| Champ | 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 |
Erreurs
403forbidden404catalog_workflow_not_found422validation_failed429too_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
| Nom | Où | Type | Description |
|---|---|---|---|
slug * | path | string | |
Idempotency-Key | header | string | 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)
| Champ | Type | Description |
|---|---|---|
name | string | null | |
publish | boolean | |
overrides | string[] | |
source | "app" | "landing" | |
locale | "en" | "fr" | |
ref | string | null | Provenance ( |
Réponse 200
Requête rejouée (même Idempotency-Key) : le workflow déjà créé.
| Champ | 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 |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
slug * | path | string |
Réponse 202
Essai créé, en file.
| Champ | 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 |
Erreurs
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
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`
| Champ | Type |
|---|---|
limit | integer |
used | integer |
remaining | integer |
window_hours | integer |
resets_at | string | null |
Erreurs
403interface_required429too_many_requests503guest_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
| Nom | Où | Type | Description |
|---|---|---|---|
guestRun * | path | string |
Réponse 200
`GuestRunResource`
| Champ | 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 |
Erreurs
403forbidden,interface_required404guest_run_not_found429too_many_requests503guest_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`
| Champ | Type |
|---|---|
data | object[] |
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
| Nom | Où | Type | Description |
|---|---|---|---|
export * | query | string | |
expires * | query | integer | |
signature * | query | string |
Erreurs
410export_expired422validation_failed429too_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`
| Champ | Type |
|---|---|
user | object | null |
team | object |
limits | object |
api_key | object | null |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
wait | query | integer | Attendre la fin du run, jusqu'à ce nombre de secondes (30 au plus). Les sorties sont alors incluses dans la réponse. |
Idempotency-Key | header | string | 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)
| Champ | Type | Description |
|---|---|---|
version | string | |
assets | string[] | |
urls | string[] | |
archive | boolean | |
webhook_url | string | null |
Réponse 200
Run déjà créé avec la même `Idempotency-Key`.
| Champ | 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 |
Erreurs
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
Runs d'une équipe, les plus récents d'abord, filtrables par statut et par workflow
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
status | query | string | |
workflow | query | string | |
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `RunResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
Statut, compteurs et erreurs par image d'un run
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
run * | path | string | Identifiant |
Réponse 200
`RunResource`
| Champ | 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 |
Erreurs
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
Images d'un run dans l'ordre d'envoi, avec leur statut et, en cas d'échec, le nœud fautif
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
run * | path | string | Identifiant |
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `RunItemResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
run * | path | string | Identifiant |
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `RunOutputResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
run * | path | string | Identifiant |
Réponse 202
| Champ | Type |
|---|---|
status | string |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
run * | path | string | Identifiant |
Réponse 200
`RunResource`
| Champ | 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 |
Erreurs
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
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
| Champ | Type |
|---|---|
secret | string |
Erreurs
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
Historique des livraisons de webhooks des runs de l'équipe, les plus récentes d'abord
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
status | query | string | |
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `WebhookDeliveryResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
delivery * | path | string | Identifiant |
Réponse 201
`WebhookDeliveryResource`
| Champ | 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 |
Erreurs
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
Workflows non archivés d'une équipe, les plus récents d'abord
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `WorkflowResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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)
| Champ | Type | Description |
|---|---|---|
name * | string | |
description | string | null | |
draft | string[] |
Réponse 201
`WorkflowResource`
| Champ | 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 |
Erreurs
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
Un workflow, son brouillon et sa dernière version
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Réponse 200
`WorkflowResource`
| Champ | 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 |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Corps (JSON)
| Champ | Type | Description |
|---|---|---|
name | string | |
description | string | null | |
draft | string[] |
Réponse 200
`WorkflowResource`
| Champ | 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 |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Réponse 204
Aucun contenu
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
version | query | string |
Réponse 200
Erreurs
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
Valide le brouillon comme à la publication, limite de nœuds du plan comprise
Liste vide = publiable.
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Réponse 200
Résultat de la validation ; `errors` est vide si le brouillon est publiable.
| Champ | Type |
|---|---|
valid | boolean |
errors | object[] |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
per_page | query | integer | |
cursor | query | string | Curseur de la page voulue : |
Réponse 200
Liste de `WorkflowVersionResource`
| Champ | Type |
|---|---|
data | object[] |
links | object |
meta | object |
Erreurs
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
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
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
Réponse 200
Brouillon inchangé : la dernière version.
| Champ | Type |
|---|---|
id | string |
workflow_id | string |
number | integer |
fingerprint | string |
engine_version | string |
graph | object |
published_by | string | null |
created_at | string |
Erreurs
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
Une version publiée par son numéro, ou `latest` pour la dernière
Paramètres
| Nom | Où | Type | Description |
|---|---|---|---|
workflow * | path | string | Identifiant |
number * | path | string |
Réponse 200
`WorkflowVersionResource`
| Champ | Type |
|---|---|
id | string |
workflow_id | string |
number | integer |
fingerprint | string |
engine_version | string |
graph | object |
published_by | string | null |
created_at | string |
Erreurs
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
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)
| Champ | Type | Description |
|---|---|---|
meta | object | |
meta.name | string | null | |
meta.description | string | null |
Réponse 201
`WorkflowResource`
| Champ | 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 |
Erreurs
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 '{ … }'