The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Turnaround routes go through handler() (acc-2 meets n7-6)
Claude4e8359fef0f5
diff --git a/src/app/api/turnaround/estimate/route.ts b/src/app/api/turnaround/estimate/route.tsindex aab9869a..96c562a0 100644--- a/src/app/api/turnaround/estimate/route.ts+++ b/src/app/api/turnaround/estimate/route.ts@@ -1,12 +1,13 @@import { recordExists } from "@/server/records";import { body, handle } from "@/server/shorts-schemas";import { previewTurnaround, TurnaroundBodySchema, turnaroundRun } from "@/server/turnaround";+import { handler } from "@/server/access/route";/*** A turnaround's price and plan, as the studio routes' estimates answer it (the evaluation harness prices a job here* before running it): the model the film runs on, what it costs, whether it would be a demo, the notes.*/-export async function POST(request: Request) {+export const POST = handler({ access: "signed-in" }, async (request: Request) => {return handle(async () => {const input = await body(request, TurnaroundBodySchema, "Pick the engine and the character's pictures");delete input.requestId;@@ -14,4 +15,4 @@ export async function POST(request: Request) {const p = previewTurnaround(turnaroundRun(input));return Response.json({ ...p, modelId: p.model.id, modelName: p.model.name });});-}+});diff --git a/src/app/api/turnaround/route.ts b/src/app/api/turnaround/route.tsindex ba18c5ce..df611e4e 100644--- a/src/app/api/turnaround/route.ts+++ b/src/app/api/turnaround/route.ts@@ -1,12 +1,13 @@import { recordExists } from "@/server/records";import { body, handle, once } from "@/server/shorts-schemas";import { createTurnaround, previewTurnaround, TurnaroundBodySchema, turnaroundRun } from "@/server/turnaround";+import { handler } from "@/server/access/route";/*** Turnaround video (build plan N7-6): a 360° turnaround of a cast sheet or a character, on either engine. `?preview=1` plans* and prices it (the route, the pictures drawn first, the film's frames, the GPU it needs) without running it.*/-export async function POST(request: Request) {+export const POST = handler({ access: "signed-in" }, async (request: Request) => {return handle(async () => {const { requestId, ...input } = await body(request, TurnaroundBodySchema, "Pick the engine and the character's pictures");if (input.elementId && !recordExists({ kind: "element", ids: [input.elementId] })) return Response.json({ error: "Character not found" }, { status: 404 });@@ -15,4 +16,4 @@ export async function POST(request: Request) {const result = await once("turnaround", requestId, () => createTurnaround(run));return Response.json(result, { status: 201 });});-}+});