{
  "paths": {
    "/api/v1/capabilities": {
      "get": {
        "operationId": "listCapabilities",
        "summary": "Voir ce qui est disponible maintenant",
        "tags": [
          "Fonctionnalités"
        ],
        "description": "Renvoie les fonctions, modèles, formats de transfert et limites de production disponibles dans cet environnement API.",
        "x-required-scope": "projects:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicCapabilityPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works": {
      "get": {
        "operationId": "listProjects",
        "summary": "Voir la liste de vos projets",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Liste les projets accessibles. Filtrez par state et paginez avec cursor et limit.",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProjectPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createProject",
        "summary": "Créer un projet",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Crée un projet avec le name fourni. Utilisez son ID pour ajouter des ressources et lancer la production.",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Voir les infos d’un projet",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Renvoie le nom, l’état et la revision du projet, à consulter avant une modification ou une demande de production.",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateProject",
        "summary": "Modifier les infos d’un projet",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Modifie le nom ou l’état active/archived du projet. Envoyez le dernier ETag dans If-Match.",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "Utilisez le dernier ETag, guillemets compris.",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicProject"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/resources": {
      "get": {
        "operationId": "listResources",
        "summary": "Voir les éléments déjà envoyés",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Liste les scénarios, personnages, scènes, accessoires, épisodes et plans du projet. Sélectionnez le type avec kind.",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "script",
                "character",
                "scene",
                "prop",
                "episode",
                "shot"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResourcePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createResource",
        "summary": "Ajouter des éléments (scénario, images…)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Ajoute une ressource structurée via kind et data, par exemple un scénario ou un plan. Transférez les fichiers via /uploads.",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/resources/{resource_id}": {
      "get": {
        "operationId": "getResource",
        "summary": "Voir un élément",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Renvoie le type, le contenu et la revision de la ressource désignée par resource_id dans le projet.",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resource_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateResource",
        "summary": "Modifier un élément",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Met à jour kind et data. Envoyez le dernier ETag dans If-Match pour éviter les conflits de modification.",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "resource_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "Utilisez le dernier ETag, guillemets compris.",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResourceInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicResource"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads": {
      "post": {
        "operationId": "createUpload",
        "summary": "Obtenir une adresse pour envoyer un fichier",
        "tags": [
          "Envois"
        ],
        "description": "Enregistre les métadonnées et renvoie upload_url. Envoyez le fichier par PUT, puis confirmez la fin du transfert. Formats : TXT, Markdown, DOCX, PNG, JPEG, WebP, AVIF, WAV et ZIP. Les limites partagent les paramètres de Studio : consultez upload_limits dans GET /capabilities. Scénarios : 5 000 000 caractères maximum. Aucun séparateur de chemin dans le nom. WAV en PCM ou IEEE float.",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploadTicket"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "completeUpload",
        "summary": "Signaler que le fichier est bien envoyé",
        "tags": [
          "Envois"
        ],
        "description": "Vérifie le fichier transféré par rapport aux métadonnées déclarées et renvoie l’asset utilisable en production.",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/assets/{asset_id}": {
      "get": {
        "operationId": "getAsset",
        "summary": "Voir un résultat et son lien de téléchargement",
        "tags": [
          "Fichiers et résultats"
        ],
        "description": "Renvoie les métadonnées et, si disponible, un download_url signé. Téléchargez le fichier avant son expiration.",
        "x-required-scope": "assets:read",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/plans": {
      "post": {
        "operationId": "createPlan",
        "deprecated": true,
        "summary": "Voir le plan et les crédits prévus",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Voyez ce qui sera produit et combien de crédits cela coûtera, sans lancer la production.",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PlanInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicPlan"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/runs": {
      "post": {
        "operationId": "createRun",
        "deprecated": true,
        "summary": "Lancer la production",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Lance la production depuis un plan_id existant et renvoie un ID d’exécution. Suivez l’état et les résultats avec getRun.",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs": {
      "get": {
        "operationId": "listRuns",
        "summary": "Voir la liste des productions",
        "tags": [
          "Exécutions"
        ],
        "description": "Liste les exécutions avec des filtres par projet, état, client_reference et période.",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "awaiting_review",
                "stopping",
                "paused",
                "needs_attention",
                "partially_succeeded",
                "succeeded",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "client_reference",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRunPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}": {
      "get": {
        "operationId": "getRun",
        "summary": "Voir l’avancement d’une production",
        "tags": [
          "Exécutions"
        ],
        "description": "Renvoie l’état, la version et les résultats disponibles d’une exécution. Utilisez cette version pour soumettre une décision.",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/steps": {
      "get": {
        "operationId": "listRunSteps",
        "summary": "Voir l’avancement étape par étape",
        "tags": [
          "Exécutions"
        ],
        "description": "Liste les étapes d’une exécution pour identifier celles en attente, en cours ou terminées.",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStepPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/events": {
      "get": {
        "operationId": "listRunEvents",
        "summary": "Voir ce qui s’est passé pendant la production",
        "tags": [
          "Exécutions"
        ],
        "description": "Liste les événements, tels que changements d’état et demandes de validation, pour retracer la production.",
        "x-required-scope": "runs:read",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRunEventPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/runs/{run_id}/decisions": {
      "post": {
        "operationId": "decideRun",
        "summary": "Valider la suite ou arrêter",
        "tags": [
          "Exécutions"
        ],
        "description": "Soumet une décision : approve, stop, resume, cancel_remaining ou retry_result. Envoyez la dernière version dans expected_version. retry_result reprend uniquement la consultation du résultat vidéo enregistré. Fournissez expected_version à jour et step_id. Le travail et la réservation sont conservés, sans nouvelle génération. Limite : 24 heures après admission. Les autres résultats ou usages incertains nécessitent une vérification opérateur.",
        "x-required-scope": "runs:write",
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRun"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "deprecated": true,
        "summary": "Lancer une seule fonction tout de suite",
        "tags": [
          "Fonctions du workflow"
        ],
        "description": "Exécutez une seule fonction au lieu de toute la production. analyze_script lit le scénario et crée les plans, generate_image crée les images de personnages, décors, accessoires et plans, generate_video crée la vidéo d’un plan dont vous avez choisi l’image, et assemble_video assemble un épisode dont tous les plans ont une vidéo. Envoyez toujours la dernière revision du projet. Une requête Live réserve les crédits à l’avance.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs/{job_id}": {
      "get": {
        "operationId": "getJob",
        "summary": "Voir l’état et le résultat d’une tâche",
        "tags": [
          "Fonctions du workflow"
        ],
        "description": "Renvoie l’état du job et les ID des assets produits. Après achèvement, utilisez getAsset pour récupérer les fichiers.",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/requests": {
      "get": {
        "operationId": "listRequests",
        "summary": "Voir les requêtes que vous avez envoyées",
        "tags": [
          "Journaux"
        ],
        "description": "Liste les appels API avec statut HTTP et durée. Filtrez par projet et période pour examiner les requêtes.",
        "x-required-scope": "requests:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "run_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "job_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status_code",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            }
          },
          {
            "name": "method",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "GET",
                "POST",
                "PATCH",
                "PUT"
              ]
            }
          },
          {
            "name": "route_template",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRequestLogPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/requests/{request_id}": {
      "get": {
        "operationId": "getRequest",
        "summary": "Voir une requête envoyée",
        "tags": [
          "Journaux"
        ],
        "description": "Retrouve un appel par request_id avec son statut HTTP, sa durée et l’exécution ou le job associé.",
        "x-required-scope": "requests:read",
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicRequestLog"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Voir votre consommation de crédits",
        "tags": [
          "Consommation"
        ],
        "description": "Renvoie les totaux d’utilisation sur la période demandée, avec les montants réservés et facturés.",
        "x-required-scope": "usage:read",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUsage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "summary": "Voir vos adresses de notification Webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Liste les URL Webhook enregistrées, les événements suivis et leur état d’activation.",
        "x-required-scope": "webhooks:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookEndpointPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "summary": "Ajouter une adresse Webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Enregistre une URL Webhook pour recevoir les événements de production sélectionnés pour les projets indiqués.",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookIssued"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-endpoints/{endpoint_id}": {
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "summary": "Modifier une adresse Webhook",
        "tags": [
          "Webhooks"
        ],
        "description": "Active ou désactive un Webhook, ou modifie les événements reçus.",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "Utilisez le dernier ETag, guillemets compris.",
            "schema": {
              "type": "string",
              "pattern": "^\"[1-9][0-9]*\"$",
              "example": "\"1\""
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookPatch"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookEndpoint"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "Voir les envois Webhook effectués",
        "tags": [
          "Livraisons Webhook"
        ],
        "description": "Liste les tentatives de livraison Webhook et leur état pour vérifier la réception des notifications.",
        "x-required-scope": "webhooks:read",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookDeliveryPage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/webhook-deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "redeliverWebhook",
        "summary": "Renvoyer un Webhook",
        "tags": [
          "Livraisons Webhook"
        ],
        "description": "Demande une nouvelle livraison de la notification Webhook désignée par delivery_id.",
        "x-required-scope": "webhooks:write",
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Empty"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicWebhookDelivery"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/uploads/{upload_id}/content": {
      "put": {
        "operationId": "uploadContent",
        "summary": "Envoyer le contenu du fichier",
        "tags": [
          "Envois"
        ],
        "description": "Envoie les octets du fichier en application/octet-stream pour un transfert préparé. Appelez completeUpload après l’envoi.",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "upload_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploaded"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/workflow": {
      "get": {
        "operationId": "getStudioWorkflow",
        "summary": "Consulter la production Studio",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Renvoie ensemble le scénario, les épisodes, designs, scènes, assets, prises, sélections de montage et la dernière revision.",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioWorkflow"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/workflow/commands": {
      "post": {
        "operationId": "executeStudioCommand",
        "deprecated": true,
        "summary": "Modifier la production Studio",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Modifie les données de production : scénario, scènes, designs ou prises sélectionnées. Choisissez operation et envoyez input avec la dernière revision.",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCommand"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/analyses": {
      "post": {
        "operationId": "analyzeStudioScript",
        "summary": "Analyser le scénario Studio",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Analyse le scénario pour en extraire la structure de production. Fournissez script_text pour le mettre à jour, sinon le scénario enregistré est utilisé. Suivez le job avec getJob.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioAnalysis"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/cut/exports": {
      "post": {
        "operationId": "exportStudioCut",
        "deprecated": true,
        "summary": "Exporter le montage Studio",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Assemble les vidéos dans l’ordre des épisodes et scènes. selections choisit les prises ; allow_partial autorise les scènes manquantes. Suivez l’export avec getJob.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioCutExport"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/storyboard/videos": {
      "post": {
        "operationId": "generateStudioVideo",
        "deprecated": true,
        "summary": "Générer la vidéo d’une scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Génère une prise vidéo pour scene_id avec le modèle, la durée et la résolution choisis. anchor_asset_id définit l’image initiale. Suivez le job avec getJob.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioVideo"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/designs/images": {
      "post": {
        "operationId": "generateStudioImage",
        "deprecated": true,
        "summary": "Générer une image de personnage, de décor, d’accessoire ou de grille",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Génère une à quatre images pour design_id avec un prompt et des références facultatives. Choisissez l’image principale ou une variante, puis suivez getJob.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioImage"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/builds": {
      "post": {
        "operationId": "buildStudioScript",
        "summary": "Construire la production depuis le scénario",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Envoyez script_asset_ids validés et revision pour créer le scénario, les références et le storyboard. full_rebuild remplace la structure existante. Générez les images et vidéos séparément. Les jetons d’entrée et de sortie déclarés sont facturés aux mêmes tarifs que Studio. Aucun budget de crédits par requête n’est requis. GET /jobs/{job_id} → output_asset_ids.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioBuild"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/library": {
      "get": {
        "operationId": "listStudioLibrary",
        "summary": "Consulter la bibliothèque partagée",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Liste les assets importables. scope=personal consulte votre bibliothèque ; scope=studio, par défaut, consulte la bibliothèque partagée.",
        "x-required-scope": "assets:read",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "schema": {
              "type": "string",
              "enum": [
                "studio",
                "personal"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioLibrary"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/imports": {
      "post": {
        "operationId": "importStudioAsset",
        "summary": "Importer une ressource dans un projet",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Copie l’asset indiqué par asset_id depuis une bibliothèque personnelle ou partagée dans le projet. Les changements ultérieurs de la source n’affectent pas la copie.",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioImport"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicAsset"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{project_id}/script/drafts": {
      "post": {
        "operationId": "draftStudioScript",
        "summary": "Générer un brouillon de scénario",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Envoyez instructions, source_text facultatif, revision et max_output_tokens. Enregistre un nouveau scénario sans remplacer l’existant. Les jetons d’entrée et de sortie déclarés sont facturés aux mêmes tarifs que Studio. Aucun budget de crédits par requête n’est requis. GET /jobs/{job_id} → output_asset_ids.",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StudioDraft"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/jobs/{job_id}/build": {
      "get": {
        "operationId": "getStudioBuildProgress",
        "summary": "Consulter la progression et les sources",
        "tags": [
          "Fonctions du workflow"
        ],
        "description": "Renvoie l’étape, les messages de progression et les sources d’une construction de scénario, avec le texte préparé pour le traitement.",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioBuildProgress"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters": {
      "get": {
        "operationId": "listCharacters",
        "summary": "Personnage · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Consulter (list). GET /api/v1/works/{work_id}/characters. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createCharacter",
        "summary": "Personnage · Créer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Créer. POST /api/v1/works/{work_id}/characters. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}": {
      "get": {
        "operationId": "getCharacter",
        "summary": "Personnage · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Consulter. GET /api/v1/works/{work_id}/characters/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateCharacter",
        "summary": "Personnage · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Modifier. PATCH /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteCharacter",
        "summary": "Personnage · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Supprimer. DELETE /api/v1/works/{work_id}/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}/primary-image": {
      "put": {
        "operationId": "setCharacterImage",
        "summary": "Personnage · Définir l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Définir l’image de référence. PUT /api/v1/works/{work_id}/characters/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setCharacterImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/characters/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateCharacterImage",
        "summary": "Personnage · Générer l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Générer l’image de référence. POST /api/v1/works/{work_id}/characters/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateCharacterImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}": {
      "put": {
        "operationId": "attachSceneCharacter",
        "summary": "Personnage · Associer à la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Associer à la scène. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneCharacter",
        "summary": "Personnage · Dissocier de la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Personnage · Dissocier de la scène. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/characters/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneCharacterInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes": {
      "get": {
        "operationId": "listBackgroundScenes",
        "summary": "Décor · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Consulter (list). GET /api/v1/works/{work_id}/background-scenes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createBackgroundScene",
        "summary": "Décor · Créer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Créer. POST /api/v1/works/{work_id}/background-scenes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}": {
      "get": {
        "operationId": "getBackgroundScene",
        "summary": "Décor · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Consulter. GET /api/v1/works/{work_id}/background-scenes/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateBackgroundScene",
        "summary": "Décor · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Modifier. PATCH /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteBackgroundScene",
        "summary": "Décor · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Supprimer. DELETE /api/v1/works/{work_id}/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}/primary-image": {
      "put": {
        "operationId": "setBackgroundSceneImage",
        "summary": "Décor · Définir l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Définir l’image de référence. PUT /api/v1/works/{work_id}/background-scenes/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setBackgroundSceneImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/background-scenes/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateBackgroundSceneImage",
        "summary": "Décor · Générer l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Générer l’image de référence. POST /api/v1/works/{work_id}/background-scenes/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateBackgroundSceneImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}": {
      "put": {
        "operationId": "attachSceneBackgroundScene",
        "summary": "Décor · Associer à la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Associer à la scène. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneBackgroundScene",
        "summary": "Décor · Dissocier de la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Décor · Dissocier de la scène. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/background-scenes/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneBackgroundSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props": {
      "get": {
        "operationId": "listProps",
        "summary": "Accessoire · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Consulter (list). GET /api/v1/works/{work_id}/props. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createProp",
        "summary": "Accessoire · Créer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Créer. POST /api/v1/works/{work_id}/props. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createPropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}": {
      "get": {
        "operationId": "getProp",
        "summary": "Accessoire · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Consulter. GET /api/v1/works/{work_id}/props/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateProp",
        "summary": "Accessoire · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Modifier. PATCH /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updatePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteProp",
        "summary": "Accessoire · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Supprimer. DELETE /api/v1/works/{work_id}/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deletePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}/primary-image": {
      "put": {
        "operationId": "setPropImage",
        "summary": "Accessoire · Définir l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Définir l’image de référence. PUT /api/v1/works/{work_id}/props/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setPropImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/props/{reference_id}/image-generations": {
      "post": {
        "operationId": "generatePropImage",
        "summary": "Accessoire · Générer l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Générer l’image de référence. POST /api/v1/works/{work_id}/props/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generatePropImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}": {
      "put": {
        "operationId": "attachSceneProp",
        "summary": "Accessoire · Associer à la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Associer à la scène. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachScenePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneProp",
        "summary": "Accessoire · Dissocier de la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Accessoire · Dissocier de la scène. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/props/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachScenePropInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids": {
      "get": {
        "operationId": "listGrids",
        "summary": "Grille · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Consulter (list). GET /api/v1/works/{work_id}/grids. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReferencePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createGrid",
        "summary": "Grille · Créer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Créer. POST /api/v1/works/{work_id}/grids. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}": {
      "get": {
        "operationId": "getGrid",
        "summary": "Grille · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Consulter. GET /api/v1/works/{work_id}/grids/{reference_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicReference"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateGrid",
        "summary": "Grille · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Modifier. PATCH /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteGrid",
        "summary": "Grille · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Supprimer. DELETE /api/v1/works/{work_id}/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}/primary-image": {
      "put": {
        "operationId": "setGridImage",
        "summary": "Grille · Définir l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Définir l’image de référence. PUT /api/v1/works/{work_id}/grids/{reference_id}/primary-image. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setGridImageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/grids/{reference_id}/image-generations": {
      "post": {
        "operationId": "generateGridImage",
        "summary": "Grille · Générer l’image de référence",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Générer l’image de référence. POST /api/v1/works/{work_id}/grids/{reference_id}/image-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateGridImageInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}": {
      "put": {
        "operationId": "attachSceneGrid",
        "summary": "Grille · Associer à la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Associer à la scène. PUT /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachSceneGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "detachSceneGrid",
        "summary": "Grille · Dissocier de la scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Grille · Dissocier de la scène. DELETE /api/v1/works/{work_id}/scenes/{scene_id}/references/grids/{reference_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/detachSceneGridInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes": {
      "get": {
        "operationId": "listEpisodes",
        "summary": "Épisode · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Épisode · Consulter (list). GET /api/v1/works/{work_id}/episodes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicEpisodePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createEpisode",
        "summary": "Créer un épisode",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Créer un épisode. POST /api/v1/works/{work_id}/episodes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}": {
      "get": {
        "operationId": "getEpisode",
        "summary": "Épisode · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Épisode · Consulter. GET /api/v1/works/{work_id}/episodes/{episode_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicEpisode"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateEpisode",
        "summary": "Épisode · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Épisode · Modifier. PATCH /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "delete": {
        "operationId": "deleteEpisode",
        "summary": "Épisode · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Épisode · Supprimer. DELETE /api/v1/works/{work_id}/episodes/{episode_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteEpisodeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scenes": {
      "get": {
        "operationId": "listScenes",
        "summary": "Scène · Consulter (list)",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Scène · Consulter (list). GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicScenePage"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "post": {
        "operationId": "createScene",
        "summary": "Créer une scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Créer une scène. POST /api/v1/works/{work_id}/episodes/{episode_id}/scenes. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}": {
      "get": {
        "operationId": "getScene",
        "summary": "Scène · Consulter",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Scène · Consulter. GET /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. GET",
        "x-required-scope": "projects:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicScene"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      },
      "patch": {
        "operationId": "updateScene",
        "summary": "Scène · Modifier",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Scène · Modifier. PATCH /api/v1/works/{work_id}/episodes/{episode_id}/scenes/{scene_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/archive-imports": {
      "post": {
        "operationId": "createArchiveImport",
        "summary": "Importer une archive ZIP",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Importer une archive ZIP. POST /api/v1/works/{work_id}/archive-imports. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. Idempotency-Key; GET /api/v1/works/{work_id}/archive-imports/{import_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createArchiveImportInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicArchiveImport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/archive-imports/{import_id}": {
      "get": {
        "operationId": "getArchiveImport",
        "summary": "Consulter une importation ZIP",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Consulter une importation ZIP. GET /api/v1/works/{work_id}/archive-imports/{import_id}. Use a verified ZIP asset_id and current revision. Preserves the archive and uses the same name-based material update rules as Studio. Check imported, failed and asset_ids on completion. Creation requires jobs:create, assets:read, assets:write and projects:write. jobs:read",
        "x-required-scope": "jobs:read",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "import_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicArchiveImport"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/uploads": {
      "post": {
        "operationId": "createWorkUploads",
        "summary": "Préparer un lot de fichiers",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Préparer un lot de fichiers. POST /api/v1/works/{work_id}/uploads. Idempotency-Key + files (1–20) → PUT upload_url → POST /api/v1/uploads/{upload_id}/complete",
        "x-required-scope": "assets:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createWorkUploadsInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicUploadBatch"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}": {
      "delete": {
        "operationId": "deleteScene",
        "summary": "Scène · Supprimer",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Scène · Supprimer. DELETE /api/v1/works/{work_id}/scenes/{scene_id}. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/deleteSceneInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/episodes/{episode_id}/scene-order": {
      "put": {
        "operationId": "reorderScenes",
        "summary": "Réordonner les scènes",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Réordonner les scènes. PUT /api/v1/works/{work_id}/episodes/{episode_id}/scene-order. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "episode_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reorderScenesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/script": {
      "put": {
        "operationId": "saveScript",
        "summary": "Enregistrer le scénario",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Enregistrer le scénario. PUT /api/v1/works/{work_id}/script. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/saveScriptInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/video-generations": {
      "post": {
        "operationId": "generateSceneVideo",
        "summary": "Générer la vidéo de scène",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Générer la vidéo de scène. POST /api/v1/works/{work_id}/scenes/{scene_id}/video-generations. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/generateSceneVideoInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/scenes/{scene_id}/selected-take": {
      "put": {
        "operationId": "selectSceneTake",
        "summary": "Choisir la prise finale",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Choisir la prise finale. PUT /api/v1/works/{work_id}/scenes/{scene_id}/selected-take. revision + Idempotency-Key",
        "x-required-scope": "projects:write",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "scene_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/selectSceneTakeInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicStudioMutation"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/works/{work_id}/exports": {
      "post": {
        "operationId": "exportWork",
        "summary": "Exporter la vidéo finale",
        "tags": [
          "Projets et ressources"
        ],
        "description": "Exporter la vidéo finale. POST /api/v1/works/{work_id}/exports. revision + Idempotency-Key → GET /api/v1/jobs/{job_id}",
        "x-required-scope": "jobs:create",
        "parameters": [
          {
            "name": "work_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Réessayez avec la même Idempotency-Key et le même corps.",
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/exportWorkInput"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Succès",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "ETag": {
                "description": "Révision de la ressource modifiable.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Intervalle de consultation recommandé en secondes."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "data": {
                      "$ref": "#/components/schemas/PublicJob"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "openapiDocument",
        "summary": "Télécharger la spécification de l’API",
        "description": "Télécharge la spécification OpenAPI avec les chemins, champs de requête et schémas de réponse.",
        "tags": [
          "Spécification"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Document OpenAPI",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/downloads/{asset_id}": {
      "get": {
        "operationId": "downloadAsset",
        "summary": "Télécharger le fichier terminé",
        "tags": [
          "Fichiers et résultats"
        ],
        "security": [],
        "description": "Télécharge le fichier via le download_url signé complet renvoyé par getAsset. Le lien expire après cinq minutes.",
        "parameters": [
          {
            "name": "asset_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "expires",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "signature",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Octets du fichier",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ApiError"
          }
        }
      }
    }
  },
  "openapi": "3.1.0",
  "info": {
    "title": "FECINE Open API",
    "version": "1.1.0",
    "description": "API de production FECINE. Lecture publique, exécution avec une clé FECINE. GET /capabilities indique les fonctions disponibles. Live consomme des crédits, la sandbox renvoie des données de test. Réutilisez Idempotency-Key pour les nouvelles tentatives POST. Cette référence est générée depuis les contrats réels."
  },
  "servers": [
    {
      "url": "/",
      "description": "Serveur FECINE actuel"
    }
  ],
  "security": [
    {
      "PartnerApiKey": []
    }
  ],
  "components": {
    "responses": {
      "ApiError": {
        "description": "Une réponse 2xx signifie que la requête est bien passée. 201 veut dire qu’une ressource a été créée, 202 que la demande est acceptée et encore en cours : il n’y a pas encore de résultat, consultez l’état du job pour savoir quand c’est terminé.\nLes réponses réussies contiennent request_id et data. Seuls le téléchargement de fichiers et la spécification de l’API font exception.\nEn cas d’échec, tous les endpoints renvoient le même objet error. Faites vos conditions sur error.code ; message explique la cause et la marche à suivre pour une personne.\nC’est retryable qui dit si vous pouvez renvoyer la requête. Ne réessayez automatiquement que s’il vaut true, et attendez le délai indiqué par retry_after_seconds ou l’en-tête Retry-After. Pour réessayer un POST, renvoyez la même Idempotency-Key et le même corps afin de ne rien facturer ni créer deux fois.\nSi un error.code vous est inconnu, traitez-le à partir du statut HTTP et de retryable. Indiquez request_id lorsque vous contactez le support. Les échecs survenus après l’acceptation d’un job apparaissent dans son état et son résultat, pas dans cette réponse.",
        "headers": {
          "X-Request-Id": {
            "description": "Request identifier for support.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          "Retry-After": {
            "description": "Optional retry delay in seconds; check error.retryable.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "request_id": "11111111-1111-4111-8111-111111111111",
              "error": {
                "code": "INVALID_REQUEST",
                "message": "Invalid input. Check the required fields, types and values.",
                "retryable": false
              }
            }
          }
        },
        "x-error-codes": [
          {
            "code": "INVALID_REFERENCE",
            "status": "422",
            "description": "A selected reference is unavailable or does not belong to this project. Select a ready image from this project."
          },
          {
            "code": "MODEL_UNAVAILABLE",
            "status": "422",
            "description": "The selected model is unavailable. Refresh the model list and select another model."
          },
          {
            "code": "MODEL_POLICY_REQUIRED",
            "status": "503",
            "description": "No default model policy is configured. Specify a model or ask the administrator to configure the task policy."
          },
          {
            "code": "BUILD_REPLAY_CONFLICT",
            "status": "409",
            "description": "The build inputs changed. Review the saved build before continuing."
          },
          {
            "code": "INVALID_REQUEST",
            "status": "400,422",
            "description": "Invalid input. Check the required fields, types and values."
          },
          {
            "code": "INVALID_API_KEY",
            "status": "401",
            "description": "Invalid credentials or download signature. Check the API key or obtain a new download URL."
          },
          {
            "code": "INSUFFICIENT_SCOPE",
            "status": "403",
            "description": "Permission denied. Check the key scopes and project access."
          },
          {
            "code": "PARTNER_BLOCKED",
            "status": "403",
            "description": "Account blocked. Contact support."
          },
          {
            "code": "PARTNER_PAUSED",
            "status": "403",
            "description": "Account paused. Ask the administrator to resume access."
          },
          {
            "code": "RESOURCE_NOT_FOUND",
            "status": "404",
            "description": "Resource unavailable. Check its ID and access permissions."
          },
          {
            "code": "METHOD_NOT_ALLOWED",
            "status": "405",
            "description": "Unsupported HTTP method. Use the documented method."
          },
          {
            "code": "REQUEST_TIMEOUT",
            "status": "408",
            "description": "Request body timed out. Check the connection and upload size."
          },
          {
            "code": "IDEMPOTENCY_KEY_REQUIRED",
            "status": "400",
            "description": "Provide a valid Idempotency-Key header."
          },
          {
            "code": "IDEMPOTENCY_CONFLICT",
            "status": "409",
            "description": "This Idempotency-Key belongs to a different request. Reuse it only with the original request."
          },
          {
            "code": "IDEMPOTENCY_KEY_EXPIRED",
            "status": "409",
            "description": "Idempotency record expired. Check the original result before starting a new operation."
          },
          {
            "code": "PRECONDITION_FAILED",
            "status": "412",
            "description": "Provide the latest quoted ETag in If-Match."
          },
          {
            "code": "REVISION_CONFLICT",
            "status": "409",
            "description": "Resource changed. Read the latest revision before updating."
          },
          {
            "code": "RESOURCE_CONFLICT",
            "status": "409",
            "description": "Resource conflicts with existing data. Review the current resource."
          },
          {
            "code": "INVALID_TRANSITION",
            "status": "409",
            "description": "Action is unavailable in the current state. Read the latest state."
          },
          {
            "code": "RUN_IN_PROGRESS",
            "status": "409",
            "description": "A run is in progress. Check its status before starting another."
          },
          {
            "code": "JOB_RUNNING",
            "status": "409",
            "description": "A job is running. Wait for completion before editing."
          },
          {
            "code": "PLAN_EXPIRED",
            "status": "409",
            "description": "Plan expired. Create a new plan and review its quote."
          },
          {
            "code": "INSUFFICIENT_CREDITS",
            "status": "402",
            "description": "Insufficient credits. Check the balance and required credits."
          },
          {
            "code": "BUDGET_EXCEEDED",
            "status": "409,429",
            "description": "Budget limit exceeded. Review usage and the configured budget."
          },
          {
            "code": "RATE_LIMITED",
            "status": "429",
            "description": "Request rate exceeded. Follow retryable and Retry-After before retrying."
          },
          {
            "code": "CAPACITY_EXCEEDED",
            "status": "429",
            "description": "Capacity limit exceeded. Reduce the workload or wait for active work to finish."
          },
          {
            "code": "PAYLOAD_TOO_LARGE",
            "status": "413",
            "description": "Request body too large. Reduce it to the documented limit."
          },
          {
            "code": "UNSUPPORTED_MEDIA_TYPE",
            "status": "415",
            "description": "Unsupported content type or encoding. Use the documented Content-Type without Content-Encoding."
          },
          {
            "code": "UPLOAD_TOO_LARGE",
            "status": "422",
            "description": "Uploaded content exceeds its processing limit. Reduce the file size."
          },
          {
            "code": "UPLOAD_NOT_VERIFIED",
            "status": "422",
            "description": "Upload is incomplete, expired or invalid. Check the upload and verification steps."
          },
          {
            "code": "ASSET_KIND_MISMATCH",
            "status": "422",
            "description": "Asset type does not match the operation. Select a compatible asset."
          },
          {
            "code": "SELECTED_IMAGE_REQUIRED",
            "status": "422",
            "description": "Select a valid image before generating video."
          },
          {
            "code": "SELECTED_VIDEO_REQUIRED",
            "status": "422",
            "description": "Select valid videos for the requested shots before assembly."
          },
          {
            "code": "REFERENCE_LIMIT_EXCEEDED",
            "status": "422",
            "description": "Too many reference assets. Reduce them to the model limit."
          },
          {
            "code": "REFERENCE_IMAGE_REQUIRED",
            "status": "422",
            "description": "This model requires a reference image. Add an image or select a text-to-image model."
          },
          {
            "code": "INVALID_GENERATION_OPTIONS",
            "status": "422",
            "description": "Generation options are invalid. Check the model capabilities."
          },
          {
            "code": "PROMPT_REQUIRED",
            "status": "422",
            "description": "Provide a generation prompt."
          },
          {
            "code": "SCRIPT_TEXT_REQUIRED",
            "status": "422",
            "description": "Provide script text before starting this operation."
          },
          {
            "code": "SCENES_REQUIRED",
            "status": "422",
            "description": "Create scenes before starting this operation."
          },
          {
            "code": "VARIANT_NAME_REQUIRED",
            "status": "422",
            "description": "Provide a variant name."
          },
          {
            "code": "EPISODE_ALREADY_STRUCTURED",
            "status": "409",
            "description": "Episode already has shots. Review its existing structure."
          },
          {
            "code": "ONE_SCRIPT_PER_PROJECT",
            "status": "409",
            "description": "This project supports one script. Use the existing script."
          },
          {
            "code": "MULTIPLE_SCRIPTS_REQUIRE_REVIEW",
            "status": "409",
            "description": "Multiple scripts need review before continuing."
          },
          {
            "code": "NATIVE_CONTENT_ALREADY_EXISTS",
            "status": "409",
            "description": "Studio content already exists. Review it before continuing."
          },
          {
            "code": "LIVE_PROJECT_REQUIRED",
            "status": "409",
            "description": "This operation requires a live project."
          },
          {
            "code": "STUDIO_MIGRATION_REQUIRED",
            "status": "409",
            "description": "Project needs Studio migration. Contact support."
          },
          {
            "code": "UNSUPPORTED_CAPABILITY",
            "status": "422",
            "description": "Unsupported operation or profile. Check GET /capabilities."
          },
          {
            "code": "CAPABILITY_UNAVAILABLE",
            "status": "503",
            "description": "Capability currently unavailable. Check GET /capabilities."
          },
          {
            "code": "API_NOT_ACCEPTING",
            "status": "503",
            "description": "New requests are paused. Check service availability."
          },
          {
            "code": "DEPENDENCY_UNAVAILABLE",
            "status": "503",
            "description": "A required service is unavailable. Follow the retry guidance or contact support."
          },
          {
            "code": "PRICING_UNAVAILABLE",
            "status": "503",
            "description": "Pricing unavailable. A valid quote is required to proceed."
          },
          {
            "code": "MEDIA_TOOLS_UNAVAILABLE",
            "status": "503",
            "description": "Media processing unavailable. Contact support."
          },
          {
            "code": "STORAGE_READ_FAILED",
            "status": "503",
            "description": "Could not read the stored asset. Contact support with request_id."
          },
          {
            "code": "STORAGE_WRITE_FAILED",
            "status": "503",
            "description": "Could not save the asset. Check the result before retrying."
          },
          {
            "code": "INTERNAL_ERROR",
            "status": "500",
            "description": "Internal error. Follow retry guidance; include request_id when contacting support."
          },
          {
            "code": "RESPONSE_CONTRACT_VIOLATION",
            "status": "500",
            "description": "Server response validation failed. Contact support with request_id."
          },
          {
            "code": "INVALID_EXECUTION_CONTEXT",
            "status": "500",
            "description": "Execution context is invalid. Contact support."
          },
          {
            "code": "RETRY_TRANSACTION",
            "status": "503",
            "description": "Transaction could not complete. Follow the response retry guidance."
          },
          {
            "code": "CLAIM_LOST",
            "status": "409",
            "description": "Execution ownership changed. Check the current job state."
          },
          {
            "code": "PROVIDER_TIMEOUT",
            "status": "504",
            "description": "Generation service timed out. Check the existing job before submitting again."
          },
          {
            "code": "PROVIDER_TERMINAL_FAILURE",
            "status": "422",
            "description": "Generation failed. Review the job result and inputs."
          },
          {
            "code": "PROVIDER_RESULT_UNAVAILABLE",
            "status": "502",
            "description": "Generation result unavailable. Check the existing job and recovery options."
          },
          {
            "code": "INVALID_RESULT",
            "status": "422,503",
            "description": "Result failed validation. Review the job or contact support."
          },
          {
            "code": "RESULT_TOO_LARGE",
            "status": "422",
            "description": "Result exceeds the processing limit. Reduce the requested output."
          },
          {
            "code": "EXPORT_TOO_LARGE",
            "status": "422",
            "description": "Export exceeds the size limit. Reduce the export selection."
          },
          {
            "code": "RECOVERY_BACKOFF",
            "status": "409",
            "description": "Existing result recovery is delayed. Check again later; do not resubmit generation."
          },
          {
            "code": "VIDEO_RECOVERY_REVIEW_REQUIRED",
            "status": "503",
            "description": "The original video task needs scheduled recovery or operator review. Do not resubmit generation."
          },
          {
            "code": "RESULT_RECOVERY_REQUIRED",
            "status": "409,503",
            "description": "Existing result needs recovery. Check the run recovery options before resubmitting."
          },
          {
            "code": "RESULT_NOT_RECOVERABLE",
            "status": "409",
            "description": "Result cannot be recovered through this action. Review the run or contact support."
          },
          {
            "code": "RECOVERY_CAPACITY_EXCEEDED",
            "status": "409",
            "description": "Recovery limit reached. Contact support before further recovery attempts."
          },
          {
            "code": "USAGE_RECOVERY_REQUIRED",
            "status": "503",
            "description": "Usage needs reconciliation. Contact support; do not resubmit generation blindly."
          }
        ]
      }
    },
    "securitySchemes": {
      "PartnerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "FECINE API Key",
        "description": "Saisissez votre clé FECINE fec_live_* ou fec_test_*."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable error identifier. See components.responses.ApiError.x-error-codes; handle unknown codes safely."
              },
              "message": {
                "type": "string",
                "description": "Human-readable cause and action. Use code, not message, for program logic."
              },
              "retryable": {
                "type": "boolean",
                "description": "Whether automatic retry is allowed. Do not infer this from the HTTP status alone."
              },
              "retry_after_seconds": {
                "type": "integer",
                "minimum": 1,
                "description": "Wait at least this many seconds before an allowed retry."
              }
            },
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "request_id",
          "error"
        ],
        "additionalProperties": false
      },
      "Money": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "micro_units": {
            "type": "string",
            "pattern": "^[0-9]+$"
          }
        },
        "required": [
          "currency",
          "micro_units"
        ],
        "additionalProperties": false
      },
      "ProjectCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "ProjectPatch": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "additionalProperties": false,
        "description": "Au moins un champ est requis."
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "revision",
          "state",
          "created_at",
          "client_reference"
        ],
        "additionalProperties": false
      },
      "ResourceInput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "script"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 900000
                  },
                  "source_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 16
                  }
                },
                "required": [
                  "language"
                ],
                "additionalProperties": false,
                "description": "Fournissez uniquement text ou source_asset_id."
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "character"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "scene"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "prop"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "reference_asset_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  }
                },
                "required": [
                  "description"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "episode"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "script_resource_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "raw_content": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "script_resource_id",
                  "sequence"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "shot"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "data": {
                "type": "object",
                "properties": {
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "character_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  },
                  "prop_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "maxItems": 8,
                    "default": []
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "video_prompt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "duration_seconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  },
                  "selected_image_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "selected_video_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "episode_id",
                  "description",
                  "duration_seconds"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "kind",
              "name",
              "data"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Resource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "content": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "script"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 900000
                      },
                      "source_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 16
                      }
                    },
                    "required": [
                      "language"
                    ],
                    "additionalProperties": false,
                    "description": "Fournissez uniquement text ou source_asset_id."
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "character"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "scene"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "prop"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "episode"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "script_resource_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "raw_content": {
                        "type": "string",
                        "maxLength": 20000
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "script_resource_id",
                      "sequence"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "shot"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "episode_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scene_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "character_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "prop_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "video_prompt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 4000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "duration_seconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 60
                      },
                      "selected_image_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "selected_video_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "episode_id",
                      "description",
                      "duration_seconds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "project_id",
          "revision",
          "content",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Capability": {
        "type": "object",
        "properties": {
          "studio_workflow": {
            "type": "object",
            "properties": {
              "equivalent": {
                "type": "boolean"
              },
              "stages": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "script",
                    "designs",
                    "storyboard",
                    "cut"
                  ]
                }
              },
              "project_access": {
                "type": "string",
                "enum": [
                  "read_only",
                  "read_write",
                  "mixed"
                ]
              },
              "gaps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "operations": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "path",
                    "enabled"
                  ],
                  "additionalProperties": false
                },
                "default": []
              },
              "commands": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "default": []
              },
              "image_models": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "aspect_ratios": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "image_sizes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "max_reference_images": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "max_variants": {
                      "type": "integer",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "id",
                    "enabled",
                    "aspect_ratios",
                    "image_sizes",
                    "max_reference_images",
                    "max_variants"
                  ],
                  "additionalProperties": false
                },
                "default": []
              }
            },
            "required": [
              "equivalent",
              "stages",
              "project_access",
              "gaps"
            ],
            "additionalProperties": false
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "enabled": {
            "type": "boolean"
          },
          "stages": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "output_profiles": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          "max_shots": {
            "type": "integer",
            "minimum": 1
          },
          "max_episode_seconds": {
            "type": "integer",
            "minimum": 1
          },
          "upload_mime_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "max_upload_bytes": {
            "type": "integer",
            "minimum": 1
          },
          "upload_limits": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "exclusiveMinimum": 0
            }
          },
          "job_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "analyze_script",
                "generate_image",
                "generate_video",
                "assemble_video"
              ]
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "type",
                "enabled"
              ],
              "additionalProperties": false
            }
          },
          "image_size": {
            "type": "string"
          },
          "max_reference_images": {
            "type": "integer"
          }
        },
        "required": [
          "studio_workflow",
          "template_id",
          "template_version",
          "enabled",
          "stages",
          "output_profiles",
          "unsupported_reasons",
          "max_shots",
          "max_episode_seconds",
          "upload_mime_types",
          "max_upload_bytes"
        ],
        "additionalProperties": false
      },
      "PlanInput": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "const": "episode-production"
          },
          "template_version": {
            "type": "number",
            "const": 1
          },
          "project_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "episode_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 10,
            "description": "Les identifiants des épisodes doivent être uniques."
          },
          "mode": {
            "type": "string",
            "enum": [
              "reviewed",
              "automatic"
            ]
          },
          "output_profile": {
            "type": "string",
            "enum": [
              "sandbox-episode-v1",
              "episode-standard-v1"
            ]
          }
        },
        "required": [
          "template_id",
          "template_version",
          "project_revision",
          "episode_ids",
          "mode",
          "output_profile"
        ],
        "additionalProperties": false
      },
      "PlannedStep": {
        "type": "object",
        "properties": {
          "stage_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "target_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "depends_on": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "requires_review": {
            "type": "boolean"
          },
          "max_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "stage_key",
          "target_ids",
          "depends_on",
          "requires_review",
          "max_cost"
        ],
        "additionalProperties": false
      },
      "Plan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "minimum": 1
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "executable": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "budget_ceiling": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "requires_review": {
                  "type": "boolean"
                },
                "max_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "stage_key",
                "target_ids",
                "depends_on",
                "requires_review",
                "max_cost"
              ],
              "additionalProperties": false
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "project_revision",
          "template_id",
          "template_version",
          "executable",
          "expires_at",
          "budget_ceiling",
          "steps",
          "unsupported_reasons"
        ],
        "additionalProperties": false
      },
      "RunInput": {
        "type": "object",
        "properties": {
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "plan_id"
        ],
        "additionalProperties": false
      },
      "Run": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "unresolved_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "plan_id",
          "version",
          "state",
          "client_reference",
          "created_at",
          "completed_at",
          "budget_remaining",
          "committed_cost",
          "unresolved_cost",
          "output_asset_ids"
        ],
        "additionalProperties": false
      },
      "Step": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "stage_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "blocked",
              "ready",
              "queued",
              "running",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "unknown"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "ordinal": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "run_id",
          "stage_key",
          "target_id",
          "job_id",
          "state",
          "output_asset_ids",
          "error_code",
          "ordinal"
        ],
        "additionalProperties": false
      },
      "RunEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "sequence": {
            "type": "integer",
            "minimum": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "run.state_changed",
              "run.review_required",
              "run.result_ready",
              "run.needs_attention"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "step_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "event_id",
          "run_id",
          "sequence",
          "type",
          "state",
          "step_id",
          "created_at"
        ],
        "additionalProperties": false
      },
      "DecisionInput": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approve",
              "stop",
              "resume",
              "cancel_remaining",
              "retry_result"
            ],
            "description": "retry_result resumes result polling for an accepted Studio video on the original reservation; requires step_id and expected_version. It never resubmits generation. Unconfirmed usage without a saved video task requires operator review."
          },
          "expected_version": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "step_id": {
            "type": "string",
            "format": "uuid"
          },
          "selected_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 10
          }
        },
        "required": [
          "action",
          "expected_version"
        ],
        "additionalProperties": false
      },
      "JobInput": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "target_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "analyze_script",
              "generate_image",
              "generate_video",
              "assemble_video"
            ]
          },
          "profile_id": {
            "type": "string",
            "maxLength": 100
          },
          "client_reference": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "project_id",
          "project_revision",
          "target_id",
          "type",
          "profile_id"
        ],
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "blocked",
              "processing",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "needs_review"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "skipped_scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "project_id",
          "run_id",
          "state",
          "output_asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "UploadInput": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "filename": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "pattern": "^[^\\\\/\\x00-\\x1f]+$"
          },
          "mime_type": {
            "type": "string",
            "enum": [
              "text/plain",
              "text/markdown",
              "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
              "image/png",
              "image/jpeg",
              "image/webp",
              "image/avif",
              "audio/wav",
              "application/zip"
            ]
          },
          "size_bytes": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 1073741824
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "project_id",
          "filename",
          "mime_type",
          "size_bytes",
          "sha256"
        ],
        "additionalProperties": false,
        "description": "Formats : TXT, Markdown, DOCX, PNG, JPEG, WebP, AVIF, WAV et ZIP. Les limites partagent les paramètres de Studio : consultez upload_limits dans GET /capabilities. Scénarios : 5 000 000 caractères maximum. Aucun séparateur de chemin dans le nom. WAV en PCM ou IEEE float."
      },
      "UploadTicket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "asset_id",
          "upload_url",
          "method",
          "content_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "Asset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "ready",
              "errored",
              "expired"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "project_id",
          "state",
          "mime_type",
          "size_bytes",
          "download_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "RequestLog": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PATCH",
              "PUT"
            ]
          },
          "route_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "status_code": {
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0
          },
          "actor_kind": {
            "type": "string",
            "enum": [
              "api_key",
              "console"
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "created_at",
          "method",
          "route_template",
          "status_code",
          "duration_ms",
          "actor_kind",
          "project_id",
          "run_id",
          "job_id",
          "replayed",
          "error_code"
        ],
        "additionalProperties": false
      },
      "Usage": {
        "type": "object",
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "http_requests": {
            "type": "integer",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "minimum": 0
          },
          "jobs": {
            "type": "integer",
            "minimum": 0
          },
          "reserved": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "unresolved": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "amount_basis": {
            "type": "string",
            "enum": [
              "partner_limit"
            ]
          },
          "billing_mode": {
            "type": "string",
            "enum": [
              "pilot",
              "contract"
            ]
          }
        },
        "required": [
          "period_start",
          "period_end",
          "as_of",
          "http_requests",
          "runs",
          "jobs",
          "reserved",
          "committed",
          "unresolved",
          "remaining",
          "amount_basis",
          "billing_mode"
        ],
        "additionalProperties": false
      },
      "WebhookCreate": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000
          },
          "project_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 100
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          }
        },
        "required": [
          "url",
          "project_ids",
          "events"
        ],
        "additionalProperties": false
      },
      "WebhookPatch": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          }
        },
        "additionalProperties": false,
        "description": "Au moins un champ est requis."
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "project_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "secret_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "project_ids",
          "events",
          "enabled",
          "verified",
          "secret_version",
          "created_at"
        ],
        "additionalProperties": false
      },
      "WebhookIssued": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "project_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                }
              },
              "enabled": {
                "type": "boolean"
              },
              "verified": {
                "type": "boolean"
              },
              "secret_version": {
                "type": "integer",
                "minimum": 1
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "url",
              "project_ids",
              "events",
              "enabled",
              "verified",
              "secret_version",
              "created_at"
            ],
            "additionalProperties": false
          },
          "signing_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "endpoint"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "succeeded",
              "retrying",
              "exhausted"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 0
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_id",
          "state",
          "attempt",
          "http_status",
          "next_attempt_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Empty": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "CapabilityPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "studio_workflow": {
                  "type": "object",
                  "properties": {
                    "equivalent": {
                      "type": "boolean"
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "script",
                          "designs",
                          "storyboard",
                          "cut"
                        ]
                      }
                    },
                    "project_access": {
                      "type": "string",
                      "enum": [
                        "read_only",
                        "read_write",
                        "mixed"
                      ]
                    },
                    "gaps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "path",
                          "enabled"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    },
                    "commands": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "default": []
                    },
                    "image_models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "aspect_ratios": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "image_sizes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "max_reference_images": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_variants": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "enabled",
                          "aspect_ratios",
                          "image_sizes",
                          "max_reference_images",
                          "max_variants"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "equivalent",
                    "stages",
                    "project_access",
                    "gaps"
                  ],
                  "additionalProperties": false
                },
                "template_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "template_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "enabled": {
                  "type": "boolean"
                },
                "stages": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "output_profiles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "unsupported_reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "max_shots": {
                  "type": "integer",
                  "minimum": 1
                },
                "max_episode_seconds": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_mime_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "max_upload_bytes": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_limits": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "job_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "analyze_script",
                      "generate_image",
                      "generate_video",
                      "assemble_video"
                    ]
                  }
                },
                "operations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "image_size": {
                  "type": "string"
                },
                "max_reference_images": {
                  "type": "integer"
                }
              },
              "required": [
                "studio_workflow",
                "template_id",
                "template_version",
                "enabled",
                "stages",
                "output_profiles",
                "unsupported_reasons",
                "max_shots",
                "max_episode_seconds",
                "upload_mime_types",
                "max_upload_bytes"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ProjectPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "revision",
                "state",
                "created_at",
                "client_reference"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ResourcePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "script"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 900000
                            },
                            "source_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "language": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 16
                            }
                          },
                          "required": [
                            "language"
                          ],
                          "additionalProperties": false,
                          "description": "Fournissez uniquement text ou source_asset_id."
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "character"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "scene"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "prop"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "episode"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "script_resource_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "raw_content": {
                              "type": "string",
                              "maxLength": 20000
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            }
                          },
                          "required": [
                            "script_resource_id",
                            "sequence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "shot"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "episode_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "scene_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "character_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "prop_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "video_prompt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "duration_seconds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 60
                            },
                            "selected_image_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "selected_video_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "episode_id",
                            "description",
                            "duration_seconds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "project_id",
                "revision",
                "content",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RunPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "plan_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "budget_remaining": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "micro_units": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    }
                  },
                  "required": [
                    "currency",
                    "micro_units"
                  ],
                  "additionalProperties": false
                },
                "committed_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unresolved_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "required": [
                "id",
                "project_id",
                "plan_id",
                "version",
                "state",
                "client_reference",
                "created_at",
                "completed_at",
                "budget_remaining",
                "committed_cost",
                "unresolved_cost",
                "output_asset_ids"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "StepPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "blocked",
                    "ready",
                    "queued",
                    "running",
                    "awaiting_review",
                    "succeeded",
                    "failed",
                    "cancelled",
                    "unknown"
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ordinal": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "run_id",
                "stage_key",
                "target_id",
                "job_id",
                "state",
                "output_asset_ids",
                "error_code",
                "ordinal"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RunEventPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "step_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "event_id",
                "run_id",
                "sequence",
                "type",
                "state",
                "step_id",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "RequestLogPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST",
                    "PATCH",
                    "PUT"
                  ]
                },
                "route_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "status_code": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 599
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                },
                "actor_kind": {
                  "type": "string",
                  "enum": [
                    "api_key",
                    "console"
                  ]
                },
                "project_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "run_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replayed": {
                  "type": "boolean"
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "request_id",
                "created_at",
                "method",
                "route_template",
                "status_code",
                "duration_ms",
                "actor_kind",
                "project_id",
                "run_id",
                "job_id",
                "replayed",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "WebhookEndpointPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "project_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "run.state_changed",
                      "run.review_required",
                      "run.result_ready",
                      "run.needs_attention"
                    ]
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "verified": {
                  "type": "boolean"
                },
                "secret_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "url",
                "project_ids",
                "events",
                "enabled",
                "verified",
                "secret_version",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "endpoint_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sending",
                    "succeeded",
                    "retrying",
                    "exhausted"
                  ]
                },
                "attempt": {
                  "type": "integer",
                  "minimum": 0
                },
                "http_status": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_id",
                "state",
                "attempt",
                "http_status",
                "next_attempt_at",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ArchiveImport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deferred",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "phase": {
                    "type": "string",
                    "enum": [
                      "extracting",
                      "importing"
                    ]
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "phase",
                  "current",
                  "total"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "progress",
          "imported",
          "failed",
          "asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "Episode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "title": {
            "type": "string"
          },
          "raw_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "raw_content",
          "description"
        ],
        "additionalProperties": false
      },
      "Scene": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "heading": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "video_prompt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "episode_id",
          "number",
          "heading",
          "description",
          "video_prompt"
        ],
        "additionalProperties": false
      },
      "EpisodePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "ScenePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "Reference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "character",
              "scene",
              "prop",
              "grid"
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primary_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "description",
          "tags",
          "primary_asset_id"
        ],
        "additionalProperties": false
      },
      "ReferencePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "UploadBatch": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string"
                },
                "ticket": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "PUT"
                      ]
                    },
                    "content_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "asset_id",
                    "upload_url",
                    "method",
                    "content_type",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "filename",
                "ticket"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "project_id",
          "items"
        ],
        "additionalProperties": false
      },
      "listCharactersInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getCharacterInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createCharacterInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateCharacterInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setCharacterImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateCharacterImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneCharacterInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listBackgroundScenesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getBackgroundSceneInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setBackgroundSceneImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateBackgroundSceneImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneBackgroundSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listPropsInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getPropInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createPropInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updatePropInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deletePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setPropImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generatePropImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachScenePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachScenePropInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listGridsInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getGridInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createGridInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "updateGridInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "maxItems": 8
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "name",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "setGridImageInput": {
        "type": "object",
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "current_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "asset_id",
          "current_asset_id",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateGridImageInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "attachSceneGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "detachSceneGridInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "listEpisodesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getEpisodeInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "listScenesInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "getSceneInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createArchiveImportInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "asset_id"
        ],
        "additionalProperties": false
      },
      "getArchiveImportInput": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "createWorkUploadsInput": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "pattern": "^[^\\\\/\\x00-\\x1f]+$"
                },
                "mime_type": {
                  "type": "string",
                  "enum": [
                    "text/plain",
                    "text/markdown",
                    "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                    "image/png",
                    "image/jpeg",
                    "image/webp",
                    "image/avif",
                    "audio/wav",
                    "application/zip"
                  ]
                },
                "size_bytes": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 1073741824
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "required": [
                "filename",
                "mime_type",
                "size_bytes",
                "sha256"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 20
          }
        },
        "required": [
          "files"
        ],
        "additionalProperties": false
      },
      "updateEpisodeInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "raw_content": {
            "type": "string",
            "maxLength": 20000
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "title",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteEpisodeInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "updateSceneInput": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "video_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "heading",
          "revision"
        ],
        "additionalProperties": false
      },
      "deleteSceneInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "reorderScenesInput": {
        "type": "object",
        "properties": {
          "scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 500
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "scene_ids",
          "revision"
        ],
        "additionalProperties": false
      },
      "createEpisodeInput": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "raw_content": {
            "type": "string",
            "maxLength": 20000
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "title",
          "revision"
        ],
        "additionalProperties": false
      },
      "createSceneInput": {
        "type": "object",
        "properties": {
          "heading": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "video_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ]
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "heading",
          "revision"
        ],
        "additionalProperties": false
      },
      "saveScriptInput": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "maxLength": 5000000
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "text",
          "revision"
        ],
        "additionalProperties": false
      },
      "generateSceneVideoInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "anchor_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "video-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60
          },
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "aspect_ratio": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "generate_audio": {
            "type": "boolean"
          }
        },
        "required": [
          "revision",
          "duration_seconds",
          "resolution",
          "aspect_ratio"
        ],
        "additionalProperties": false
      },
      "selectSceneTakeInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "take_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "revision",
          "take_id"
        ],
        "additionalProperties": false
      },
      "exportWorkInput": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "allow_partial": {
            "type": "boolean",
            "default": true
          },
          "selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioBuildProgress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "wait_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "assistant",
                    "system_note"
                  ]
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "content": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "streaming",
                    "final"
                  ]
                },
                "seq": {
                  "type": "number"
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "role",
                "stage",
                "content",
                "status",
                "seq",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "filterMode": {
                  "type": "string",
                  "enum": [
                    "prompt_index",
                    "full_text"
                  ]
                },
                "sourceText": {
                  "type": "string"
                },
                "llmText": {
                  "type": "string"
                },
                "originalChars": {
                  "type": "number"
                },
                "preparedChars": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "filterMode",
                "sourceText",
                "llmText",
                "originalChars",
                "preparedChars"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "state",
          "stage",
          "messages",
          "sources"
        ],
        "additionalProperties": false
      },
      "StudioDraft": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "instructions": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "source_text": {
            "type": "string",
            "maxLength": 50000
          },
          "max_output_tokens": {
            "type": "integer",
            "minimum": 256,
            "maximum": 8192,
            "default": 2048
          }
        },
        "required": [
          "revision",
          "instructions"
        ],
        "additionalProperties": false
      },
      "StudioImport": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "asset_id"
        ],
        "additionalProperties": false
      },
      "StudioLibrary": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "mime",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "StudioCommand": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant"
                    ]
                  },
                  "current_asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "kind",
                  "current_asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "asset.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "trash.restore"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "entity_type": {
                    "type": "string",
                    "enum": [
                      "asset",
                      "design"
                    ]
                  }
                },
                "required": [
                  "id",
                  "entity_type"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.duplicate"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.settings.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 24
                    },
                    "maxItems": 8
                  },
                  "cover": {
                    "type": "string",
                    "enum": [
                      "amber",
                      "indigo",
                      "teal",
                      "rust",
                      "moss",
                      "ink",
                      "sage",
                      "bone",
                      "wine",
                      "wash",
                      "blush",
                      "void"
                    ]
                  },
                  "aspect": {
                    "type": "string",
                    "enum": [
                      "16:9",
                      "9:16",
                      "1:1",
                      "4:3",
                      "21:9"
                    ]
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "480p",
                      "720p",
                      "1080p",
                      "2k"
                    ]
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "realistic_general",
                      "realistic_urban",
                      "realistic_cinematic",
                      "2d_japanese_manga",
                      "2d_korean_urban",
                      "2d_korean",
                      "2d_otome",
                      "2d_chinese_manga",
                      "2d_classical",
                      "3d_chinese",
                      "3d_xianxia",
                      "3d_cartoon",
                      "cg_general",
                      "cg_cyberpunk",
                      "ink_gongbi",
                      "custom"
                    ]
                  },
                  "style_prompt": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "title",
                  "tags",
                  "cover",
                  "aspect",
                  "resolution",
                  "style",
                  "style_prompt"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.rename"
              },
              "input": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "project.state.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "active",
                      "archived"
                    ]
                  }
                },
                "required": [
                  "state"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "script.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "maxLength": 5000000
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "script.bible.update"
              },
              "input": {
                "type": "object",
                "properties": {
                  "logline": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "synopsis": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "logline",
                  "synopsis"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "episode.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "number": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "raw_content": {
                    "type": "string",
                    "maxLength": 20000
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  }
                },
                "required": [
                  "title"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "episode.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "heading": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "number": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "video_prompt": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 4000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "episode_id",
                  "heading"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.reorder"
              },
              "input": {
                "type": "object",
                "properties": {
                  "episode_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "scene_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "minItems": 1,
                    "maxItems": 500
                  }
                },
                "required": [
                  "episode_id",
                  "scene_ids"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.save"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "character",
                      "scene",
                      "prop",
                      "grid"
                    ]
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "maxItems": 8
                  }
                },
                "required": [
                  "kind",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.voice.set"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.detach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant",
                      "voice"
                    ]
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.asset.restore"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "current_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "restore_asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "primary",
                      "variant"
                    ]
                  }
                },
                "required": [
                  "id",
                  "current_asset_id",
                  "restore_asset_id",
                  "kind"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "design.variant.rename"
              },
              "input": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  }
                },
                "required": [
                  "id",
                  "asset_id",
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.design.attach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "design_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "design_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "scene.design.detach"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "design_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "design_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "cut.take.select"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "scene_id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              "operation": {
                "type": "string",
                "const": "take.delete"
              },
              "input": {
                "type": "object",
                "properties": {
                  "scene_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "asset_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "scene_id",
                  "asset_id"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "revision",
              "operation",
              "input"
            ],
            "additionalProperties": false
          }
        ]
      },
      "StudioMutation": {
        "type": "object",
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "changed_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "changed_id",
          "revision",
          "studio_url"
        ],
        "additionalProperties": false
      },
      "StudioWorkflow": {
        "type": "object",
        "properties": {
          "api_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "completed_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "state",
                "created_at",
                "completed_at",
                "total_steps",
                "completed_steps",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          },
          "trash": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "entity_type": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "design"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "entity_type",
                "name",
                "deleted_at"
              ],
              "additionalProperties": false
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lineage_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "status",
                "mime",
                "lineage_id",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "settings": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cover": {
                "type": "string"
              },
              "aspect": {
                "type": "string"
              },
              "resolution": {
                "type": "string"
              },
              "style": {
                "type": "string"
              },
              "style_prompt": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "tags",
              "cover",
              "aspect",
              "resolution",
              "style",
              "style_prompt",
              "state"
            ],
            "additionalProperties": false
          },
          "script": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "logline": {
                "type": "string"
              },
              "synopsis": {
                "type": "string"
              }
            },
            "required": [
              "text",
              "logline",
              "synopsis"
            ],
            "additionalProperties": false
          },
          "episodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "scenes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "scene_designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "design_id",
                "kind",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "takes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "asset_id",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "cut_selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "design_assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "design_id",
                "asset_id",
                "kind",
                "name",
                "position"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "api_runs",
          "project_id",
          "revision",
          "studio_url",
          "trash",
          "assets",
          "settings",
          "script",
          "episodes",
          "designs",
          "scenes",
          "scene_designs",
          "takes",
          "cut_selections",
          "design_assets"
        ],
        "additionalProperties": false
      },
      "StudioAnalysis": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "script_text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000000
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioBuild": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "script_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "default": []
          },
          "material_scope": {
            "type": "string",
            "enum": [
              "unclassified",
              "all"
            ],
            "default": "unclassified"
          },
          "preprocess": {
            "type": "object",
            "properties": {
              "ignoreAttachments": {
                "type": "boolean",
                "default": true
              },
              "discardKeywords": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "maxItems": 100,
                "default": [
                  "提示词",
                  "prompt",
                  "Midjourney",
                  "Stable Diffusion",
                  "DALL-E",
                  "Image1",
                  "Image2",
                  "正向提示词",
                  "负向提示词",
                  "视觉描述",
                  "出图要求",
                  "技术规格",
                  "画面描述",
                  "镜头提示词",
                  "请生成",
                  "角色三视图",
                  "服装本体展示",
                  "局部材质与细节放大"
                ]
              },
              "keepLabels": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "maxItems": 100,
                "default": [
                  "资产名称",
                  "资产ID",
                  "资产版本",
                  "关联角色资产名称",
                  "关联角色资产ID",
                  "关联场景资产名称",
                  "关联场景资产ID",
                  "关联道具资产名称",
                  "关联道具资产ID",
                  "服装变体ID",
                  "服装名称",
                  "道具资产ID",
                  "道具名称",
                  "场景资产ID",
                  "场景名称",
                  "宫格图ID",
                  "集数",
                  "主题",
                  "场景",
                  "角色名称",
                  "用途"
                ]
              }
            },
            "additionalProperties": false
          },
          "rebuild_policy": {
            "type": "string",
            "const": "full_rebuild"
          }
        },
        "required": [
          "revision",
          "rebuild_policy"
        ],
        "additionalProperties": false
      },
      "StudioCutExport": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "allow_partial": {
            "type": "boolean",
            "default": true
          },
          "selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          }
        },
        "required": [
          "revision"
        ],
        "additionalProperties": false
      },
      "StudioVideo": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "scene_id": {
            "type": "string",
            "format": "uuid"
          },
          "anchor_asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 12
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "video-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 10000
          },
          "duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60
          },
          "resolution": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "aspect_ratio": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20
          },
          "generate_audio": {
            "type": "boolean"
          }
        },
        "required": [
          "revision",
          "scene_id",
          "duration_seconds",
          "resolution",
          "aspect_ratio"
        ],
        "additionalProperties": false
      },
      "StudioImage": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "design_id": {
            "type": "string",
            "format": "uuid"
          },
          "variants": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "model": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "default": "image-standard"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 20000
          },
          "aspect_ratio": {
            "type": "string",
            "pattern": "^(auto|[1-9]\\d*:[1-9]\\d*)$"
          },
          "image_size": {
            "type": "string",
            "maxLength": 40
          },
          "quality": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "background": {
            "type": "string",
            "enum": [
              "auto",
              "opaque",
              "transparent"
            ]
          },
          "output_format": {
            "type": "string",
            "enum": [
              "png",
              "jpeg"
            ]
          },
          "reference_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "maxItems": 16,
            "default": []
          },
          "slot": {
            "type": "string",
            "enum": [
              "primary",
              "variant"
            ],
            "default": "primary"
          },
          "variant_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "current_asset_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "revision",
          "design_id"
        ],
        "additionalProperties": false
      },
      "Uploaded": {
        "type": "object",
        "properties": {
          "uploaded": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "uploaded"
        ],
        "additionalProperties": false
      },
      "PublicCapabilityPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "studio_workflow": {
                  "type": "object",
                  "properties": {
                    "equivalent": {
                      "type": "boolean"
                    },
                    "stages": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "script",
                          "designs",
                          "storyboard",
                          "cut"
                        ]
                      }
                    },
                    "project_access": {
                      "type": "string",
                      "enum": [
                        "read_only",
                        "read_write",
                        "mixed"
                      ]
                    },
                    "gaps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "operations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "path",
                          "enabled"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    },
                    "commands": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "default": []
                    },
                    "image_models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "aspect_ratios": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "image_sizes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "max_reference_images": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "max_variants": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "id",
                          "enabled",
                          "aspect_ratios",
                          "image_sizes",
                          "max_reference_images",
                          "max_variants"
                        ],
                        "additionalProperties": false
                      },
                      "default": []
                    }
                  },
                  "required": [
                    "equivalent",
                    "stages",
                    "project_access",
                    "gaps"
                  ],
                  "additionalProperties": false
                },
                "template_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "template_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "enabled": {
                  "type": "boolean"
                },
                "stages": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "output_profiles": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "unsupported_reasons": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "max_shots": {
                  "type": "integer",
                  "minimum": 1
                },
                "max_episode_seconds": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_mime_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "max_upload_bytes": {
                  "type": "integer",
                  "minimum": 1
                },
                "upload_limits": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "integer",
                    "exclusiveMinimum": 0
                  }
                },
                "job_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "analyze_script",
                      "generate_image",
                      "generate_video",
                      "assemble_video"
                    ]
                  }
                },
                "operations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "type",
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "image_size": {
                  "type": "string"
                },
                "max_reference_images": {
                  "type": "integer"
                }
              },
              "required": [
                "studio_workflow",
                "template_id",
                "template_version",
                "enabled",
                "stages",
                "output_profiles",
                "unsupported_reasons",
                "max_shots",
                "max_episode_seconds",
                "upload_mime_types",
                "max_upload_bytes"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicProjectPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "revision",
                "state",
                "created_at",
                "client_reference"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicProject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "revision",
          "state",
          "created_at",
          "client_reference"
        ],
        "additionalProperties": false
      },
      "PublicResourcePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "work_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "script"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 900000
                            },
                            "source_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "language": {
                              "type": "string",
                              "minLength": 2,
                              "maxLength": 16
                            }
                          },
                          "required": [
                            "language"
                          ],
                          "additionalProperties": false,
                          "description": "Fournissez uniquement text ou source_asset_id."
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "character"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "scene"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "prop"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "reference_asset_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            }
                          },
                          "required": [
                            "description"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "episode"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "script_resource_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "raw_content": {
                              "type": "string",
                              "maxLength": 20000
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            }
                          },
                          "required": [
                            "script_resource_id",
                            "sequence"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "shot"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "episode_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "scene_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "character_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "prop_ids": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "maxItems": 8,
                              "default": []
                            },
                            "description": {
                              "type": "string",
                              "maxLength": 4000
                            },
                            "video_prompt": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 4000
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 100
                            },
                            "duration_seconds": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 60
                            },
                            "selected_image_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            },
                            "selected_video_asset_id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          },
                          "required": [
                            "episode_id",
                            "description",
                            "duration_seconds"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "kind",
                        "name",
                        "data"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "work_id",
                "revision",
                "content",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "content": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "script"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 900000
                      },
                      "source_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "language": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 16
                      }
                    },
                    "required": [
                      "language"
                    ],
                    "additionalProperties": false,
                    "description": "Fournissez uniquement text ou source_asset_id."
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "character"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "scene"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "prop"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "reference_asset_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      }
                    },
                    "required": [
                      "description"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "episode"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "script_resource_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "raw_content": {
                        "type": "string",
                        "maxLength": 20000
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    },
                    "required": [
                      "script_resource_id",
                      "sequence"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "shot"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "data": {
                    "type": "object",
                    "properties": {
                      "episode_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "scene_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "character_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "prop_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "maxItems": 8,
                        "default": []
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "video_prompt": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 4000
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "duration_seconds": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 60
                      },
                      "selected_image_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      },
                      "selected_video_asset_id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    },
                    "required": [
                      "episode_id",
                      "description",
                      "duration_seconds"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "name",
                  "data"
                ],
                "additionalProperties": false
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "work_id",
          "revision",
          "content",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicUploadTicket": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "asset_id": {
            "type": "string",
            "format": "uuid"
          },
          "upload_url": {
            "type": "string",
            "format": "uri"
          },
          "method": {
            "type": "string",
            "enum": [
              "PUT"
            ]
          },
          "content_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "asset_id",
          "upload_url",
          "method",
          "content_type",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PublicAsset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "verified",
              "ready",
              "errored",
              "expired"
            ]
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "download_url": {
            "anyOf": [
              {
                "type": "string",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "mime_type",
          "size_bytes",
          "download_url",
          "expires_at"
        ],
        "additionalProperties": false
      },
      "PublicPlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_revision": {
            "type": "integer",
            "minimum": 1
          },
          "template_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "template_version": {
            "type": "integer",
            "minimum": 1
          },
          "executable": {
            "type": "boolean"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "budget_ceiling": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "requires_review": {
                  "type": "boolean"
                },
                "max_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "stage_key",
                "target_ids",
                "depends_on",
                "requires_review",
                "max_cost"
              ],
              "additionalProperties": false
            }
          },
          "unsupported_reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "project_revision",
          "template_id",
          "template_version",
          "executable",
          "expires_at",
          "budget_ceiling",
          "steps",
          "unsupported_reasons"
        ],
        "additionalProperties": false
      },
      "PublicRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "awaiting_review",
              "stopping",
              "paused",
              "needs_attention",
              "partially_succeeded",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "budget_remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "unresolved_cost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "plan_id",
          "version",
          "state",
          "client_reference",
          "created_at",
          "completed_at",
          "budget_remaining",
          "committed_cost",
          "unresolved_cost",
          "output_asset_ids"
        ],
        "additionalProperties": false
      },
      "PublicRunPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "work_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "plan_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "client_reference": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 128
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "budget_remaining": {
                  "type": "object",
                  "properties": {
                    "currency": {
                      "type": "string",
                      "pattern": "^[A-Z]{3}$"
                    },
                    "micro_units": {
                      "type": "string",
                      "pattern": "^[0-9]+$"
                    }
                  },
                  "required": [
                    "currency",
                    "micro_units"
                  ],
                  "additionalProperties": false
                },
                "committed_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unresolved_cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "pattern": "^[A-Z]{3}$"
                        },
                        "micro_units": {
                          "type": "string",
                          "pattern": "^[0-9]+$"
                        }
                      },
                      "required": [
                        "currency",
                        "micro_units"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                }
              },
              "required": [
                "id",
                "work_id",
                "plan_id",
                "version",
                "state",
                "client_reference",
                "created_at",
                "completed_at",
                "budget_remaining",
                "committed_cost",
                "unresolved_cost",
                "output_asset_ids"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicStepPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "stage_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "target_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "blocked",
                    "ready",
                    "queued",
                    "running",
                    "awaiting_review",
                    "succeeded",
                    "failed",
                    "cancelled",
                    "unknown"
                  ]
                },
                "output_asset_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "ordinal": {
                  "type": "integer"
                }
              },
              "required": [
                "id",
                "run_id",
                "stage_key",
                "target_id",
                "job_id",
                "state",
                "output_asset_ids",
                "error_code",
                "ordinal"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicRunEventPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "run_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "awaiting_review",
                    "stopping",
                    "paused",
                    "needs_attention",
                    "partially_succeeded",
                    "succeeded",
                    "failed",
                    "cancelled"
                  ]
                },
                "step_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "event_id",
                "run_id",
                "sequence",
                "type",
                "state",
                "step_id",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "blocked",
              "processing",
              "awaiting_review",
              "succeeded",
              "failed",
              "cancelled",
              "needs_review"
            ]
          },
          "output_asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "resource_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "skipped_scene_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        },
        "required": [
          "id",
          "work_id",
          "run_id",
          "state",
          "output_asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicRequestLogPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "method": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "POST",
                    "PATCH",
                    "PUT"
                  ]
                },
                "route_template": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 300
                },
                "status_code": {
                  "type": "integer",
                  "minimum": 100,
                  "maximum": 599
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0
                },
                "actor_kind": {
                  "type": "string",
                  "enum": [
                    "api_key",
                    "console"
                  ]
                },
                "work_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "run_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "job_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "replayed": {
                  "type": "boolean"
                },
                "error_code": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "request_id",
                "created_at",
                "method",
                "route_template",
                "status_code",
                "duration_ms",
                "actor_kind",
                "work_id",
                "run_id",
                "job_id",
                "replayed",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicRequestLog": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PATCH",
              "PUT"
            ]
          },
          "route_template": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          },
          "status_code": {
            "type": "integer",
            "minimum": 100,
            "maximum": 599
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0
          },
          "actor_kind": {
            "type": "string",
            "enum": [
              "api_key",
              "console"
            ]
          },
          "work_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "created_at",
          "method",
          "route_template",
          "status_code",
          "duration_ms",
          "actor_kind",
          "work_id",
          "run_id",
          "job_id",
          "replayed",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicUsage": {
        "type": "object",
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "http_requests": {
            "type": "integer",
            "minimum": 0
          },
          "runs": {
            "type": "integer",
            "minimum": 0
          },
          "jobs": {
            "type": "integer",
            "minimum": 0
          },
          "reserved": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "committed": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "unresolved": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "micro_units": {
                    "type": "string",
                    "pattern": "^[0-9]+$"
                  }
                },
                "required": [
                  "currency",
                  "micro_units"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining": {
            "type": "object",
            "properties": {
              "currency": {
                "type": "string",
                "pattern": "^[A-Z]{3}$"
              },
              "micro_units": {
                "type": "string",
                "pattern": "^[0-9]+$"
              }
            },
            "required": [
              "currency",
              "micro_units"
            ],
            "additionalProperties": false
          },
          "amount_basis": {
            "type": "string",
            "enum": [
              "partner_limit"
            ]
          },
          "billing_mode": {
            "type": "string",
            "enum": [
              "pilot",
              "contract"
            ]
          }
        },
        "required": [
          "period_start",
          "period_end",
          "as_of",
          "http_requests",
          "runs",
          "jobs",
          "reserved",
          "committed",
          "unresolved",
          "remaining",
          "amount_basis",
          "billing_mode"
        ],
        "additionalProperties": false
      },
      "PublicWebhookEndpointPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "work_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "run.state_changed",
                      "run.review_required",
                      "run.result_ready",
                      "run.needs_attention"
                    ]
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "verified": {
                  "type": "boolean"
                },
                "secret_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "url",
                "work_ids",
                "events",
                "enabled",
                "verified",
                "secret_version",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicWebhookIssued": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "work_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "run.state_changed",
                    "run.review_required",
                    "run.result_ready",
                    "run.needs_attention"
                  ]
                }
              },
              "enabled": {
                "type": "boolean"
              },
              "verified": {
                "type": "boolean"
              },
              "secret_version": {
                "type": "integer",
                "minimum": 1
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "url",
              "work_ids",
              "events",
              "enabled",
              "verified",
              "secret_version",
              "created_at"
            ],
            "additionalProperties": false
          },
          "signing_secret": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          }
        },
        "required": [
          "endpoint"
        ],
        "additionalProperties": false
      },
      "PublicWebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "work_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "run.state_changed",
                "run.review_required",
                "run.result_ready",
                "run.needs_attention"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "secret_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "work_ids",
          "events",
          "enabled",
          "verified",
          "secret_version",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicWebhookDeliveryPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "endpoint_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "sending",
                    "succeeded",
                    "retrying",
                    "exhausted"
                  ]
                },
                "attempt": {
                  "type": "integer",
                  "minimum": 0
                },
                "http_status": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_id",
                "state",
                "attempt",
                "http_status",
                "next_attempt_at",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicWebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "endpoint_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "sending",
              "succeeded",
              "retrying",
              "exhausted"
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 0
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "endpoint_id",
          "event_id",
          "state",
          "attempt",
          "http_status",
          "next_attempt_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PublicUploaded": {
        "type": "object",
        "properties": {
          "uploaded": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "uploaded"
        ],
        "additionalProperties": false
      },
      "PublicStudioWorkflow": {
        "type": "object",
        "properties": {
          "api_runs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "completed_steps": {
                  "type": "integer",
                  "minimum": 0
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "state",
                "created_at",
                "completed_at",
                "total_steps",
                "completed_steps",
                "error_code"
              ],
              "additionalProperties": false
            }
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          },
          "trash": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "entity_type": {
                  "type": "string",
                  "enum": [
                    "asset",
                    "design"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "entity_type",
                "name",
                "deleted_at"
              ],
              "additionalProperties": false
            }
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "lineage_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "status",
                "mime",
                "lineage_id",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "settings": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cover": {
                "type": "string"
              },
              "aspect": {
                "type": "string"
              },
              "resolution": {
                "type": "string"
              },
              "style": {
                "type": "string"
              },
              "style_prompt": {
                "type": "string"
              },
              "state": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "tags",
              "cover",
              "aspect",
              "resolution",
              "style",
              "style_prompt",
              "state"
            ],
            "additionalProperties": false
          },
          "script": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "logline": {
                "type": "string"
              },
              "synopsis": {
                "type": "string"
              }
            },
            "required": [
              "text",
              "logline",
              "synopsis"
            ],
            "additionalProperties": false
          },
          "episodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "scenes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "scene_designs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "design_id",
                "kind",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "takes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "scene_id",
                "asset_id",
                "position"
              ],
              "additionalProperties": false
            }
          },
          "cut_selections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scene_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "scene_id",
                "asset_id"
              ],
              "additionalProperties": false
            }
          },
          "design_assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "design_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "asset_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "position": {
                  "type": "integer"
                }
              },
              "required": [
                "design_id",
                "asset_id",
                "kind",
                "name",
                "position"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "api_runs",
          "work_id",
          "revision",
          "studio_url",
          "trash",
          "assets",
          "settings",
          "script",
          "episodes",
          "designs",
          "scenes",
          "scene_designs",
          "takes",
          "cut_selections",
          "design_assets"
        ],
        "additionalProperties": false
      },
      "PublicStudioMutation": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "changed_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "studio_url": {
            "type": "string"
          }
        },
        "required": [
          "work_id",
          "changed_id",
          "revision",
          "studio_url"
        ],
        "additionalProperties": false
      },
      "PublicStudioLibrary": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "media_type": {
                  "type": "string"
                },
                "mime": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "is_current_version": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "name",
                "kind",
                "media_type",
                "mime",
                "version",
                "is_current_version"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicStudioBuildProgress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "run_version": {
            "type": "integer"
          },
          "state": {
            "type": "string"
          },
          "wait_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "stage": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "assistant",
                    "system_note"
                  ]
                },
                "stage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "content": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "streaming",
                    "final"
                  ]
                },
                "seq": {
                  "type": "number"
                },
                "created_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "role",
                "stage",
                "content",
                "status",
                "seq",
                "created_at",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "filterMode": {
                  "type": "string",
                  "enum": [
                    "prompt_index",
                    "full_text"
                  ]
                },
                "sourceText": {
                  "type": "string"
                },
                "llmText": {
                  "type": "string"
                },
                "originalChars": {
                  "type": "number"
                },
                "preparedChars": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "name",
                "filterMode",
                "sourceText",
                "llmText",
                "originalChars",
                "preparedChars"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "state",
          "stage",
          "messages",
          "sources"
        ],
        "additionalProperties": false
      },
      "PublicReferencePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "character",
                    "scene",
                    "prop",
                    "grid"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "primary_asset_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "name",
                "description",
                "tags",
                "primary_asset_id"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "kind": {
            "type": "string",
            "enum": [
              "character",
              "scene",
              "prop",
              "grid"
            ]
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "primary_asset_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "description",
          "tags",
          "primary_asset_id"
        ],
        "additionalProperties": false
      },
      "PublicEpisodePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "title": {
                  "type": "string"
                },
                "raw_content": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "number",
                "title",
                "raw_content",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicEpisode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "title": {
            "type": "string"
          },
          "raw_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "number",
          "title",
          "raw_content",
          "description"
        ],
        "additionalProperties": false
      },
      "PublicScenePage": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "episode_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "exclusiveMinimum": 0
                },
                "heading": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "video_prompt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "episode_id",
                "number",
                "heading",
                "description",
                "video_prompt"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "work_id",
          "revision",
          "items",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PublicScene": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "episode_id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "exclusiveMinimum": 0
          },
          "heading": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "video_prompt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "episode_id",
          "number",
          "heading",
          "description",
          "video_prompt"
        ],
        "additionalProperties": false
      },
      "PublicArchiveImport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "deferred",
              "succeeded",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "phase": {
                    "type": "string",
                    "enum": [
                      "extracting",
                      "importing"
                    ]
                  },
                  "current": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "phase",
                  "current",
                  "total"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "imported": {
            "type": "integer",
            "minimum": 0
          },
          "failed": {
            "type": "integer",
            "minimum": 0
          },
          "asset_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "work_id",
          "state",
          "progress",
          "imported",
          "failed",
          "asset_ids",
          "error_code"
        ],
        "additionalProperties": false
      },
      "PublicUploadBatch": {
        "type": "object",
        "properties": {
          "work_id": {
            "type": "string",
            "format": "uuid"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "filename": {
                  "type": "string"
                },
                "ticket": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "asset_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "upload_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "PUT"
                      ]
                    },
                    "content_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  },
                  "required": [
                    "id",
                    "asset_id",
                    "upload_url",
                    "method",
                    "content_type",
                    "expires_at"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "filename",
                "ticket"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "work_id",
          "items"
        ],
        "additionalProperties": false
      }
    }
  },
  "x-documentation-language": "fr",
  "tags": [
    {
      "name": "Fonctionnalités",
      "description": "Fonctionnalités",
      "x-tag-id": "capabilities"
    },
    {
      "name": "Projets et ressources",
      "description": "Projets et ressources",
      "x-tag-id": "projects"
    },
    {
      "name": "Envois",
      "description": "Envois",
      "x-tag-id": "uploads"
    },
    {
      "name": "Fichiers et résultats",
      "description": "Fichiers et résultats",
      "x-tag-id": "assets"
    },
    {
      "name": "Exécutions",
      "description": "Exécutions",
      "x-tag-id": "runs"
    },
    {
      "name": "Fonctions du workflow",
      "description": "Fonctions du workflow",
      "x-tag-id": "jobs"
    },
    {
      "name": "Journaux",
      "description": "Journaux",
      "x-tag-id": "requests"
    },
    {
      "name": "Consommation",
      "description": "Consommation",
      "x-tag-id": "usage"
    },
    {
      "name": "Webhooks",
      "description": "Webhooks",
      "x-tag-id": "webhook-endpoints"
    },
    {
      "name": "Livraisons Webhook",
      "description": "Livraisons Webhook",
      "x-tag-id": "webhook-deliveries"
    },
    {
      "name": "Spécification",
      "description": "Spécification",
      "x-tag-id": "Documentation"
    }
  ]
}
