🎥 Videography & Film · tension scoring

Horror Stinger Mapper

Lovable AI maps tension curves for horror shorts so filmmakers perfect the scare; FLock generates the SFX.

FLock Video Generation· motion generation
Section · FLock.io

The kernel.

full primer →

Videographers describe the moment and FLock's video-capable models stitch a short reel for tension scoring — motion sketch, loop, or scene block — playable on the page.

Why this primitiveGenerative SFX creates abrupt, dissonant stingers and unsettling drones that precisely match the mapped jump-scare moments.

Kernel
the FLock video-capable models (Kimi K2.5) called on https://api.flock.io/v1 — async task with polling, returns an MP4 URL the client renders as a short reel
Drives the UI as
a prompt → progress bar → playable MP4 surface for short motion sketches, loops, or scene reels
Appendix · Secrets

Required key.

FLOCK_API_KEY
Single API key for FLock's OpenAI-compatible endpoint — text, image, video and tool-calling agents across the whole model marketplace. Sign up at platform.flock.io, create a team, generate a key starting with sk-.
open ↗

Add this in your Lovable project under Settings → Secrets before pasting the prompt below.

Appendix · Mega-prompt

The build prompt.

Paste into a fresh Lovable project. Make sure the key above is set first. read the build strategy →

Build "Horror Stinger Mapper" as a ONE-SHOT Lovable build. The participant has only
5 credits — this single message must produce a working demo with no follow-ups.
Single-page TanStack Start app. Cut scope ruthlessly.

CONCEPT
Lovable AI maps tension curves for horror shorts so filmmakers perfect the scare; FLock generates the SFX.
Discipline: Videography & Film (tension scoring).
Recipe: FLock Video Generation (motion generation) as the single creative surface.
Why this kernel: Generative SFX creates abrupt, dissonant stingers and unsettling drones that precisely match the mapped jump-scare moments.

LOVABLE BUDGET (HARD CAP: ONE-SHOT, ~5 CREDITS TOTAL):
The participant has FIVE Lovable credits for the whole build. This prompt MUST
ship a working demo on the FIRST message with zero follow-ups. Engineer for that.
- ONE TanStack Start app, ONE route (`src/routes/index.tsx`). No extra pages, no auth, no nav.
- ONE TanStack server function in `src/lib/flock.functions.ts` that proxies the FLock call.
- ONE client surface (a textarea + button, or chat box, or prompt-to-canvas) wired to it.
- NO database, NO Lovable Cloud, NO auth, NO file uploads, NO extra integrations.
- NO tests, NO docs pages, NO settings screens, NO theming toggles.
- Libraries: template defaults + `zod`. Nothing else.
- Keep the diff small enough to land in one build pass. If a feature is not on
  screen in the user flow below, do not build it. Cut scope before adding scope.

STACK
- TanStack Start app, the index route only.
- FLock.io is the only AI dependency. All API calls live inside a `createServerFn`
  handler so `FLOCK_API_KEY` stays on the server.
- Client surface fits the kernel: a prompt box that returns the result.
- Tailwind + shadcn. Editorial look: gold accent on a dark or warm-cream
  background, generous type, one strong headline, one primary action.
- Footer renders: "Built during the FLock.io Creative Hackathon organised by StreetKode Fam during Indian Krump Festival 14".

SERVER FUNCTION (src/lib/flock.functions.ts) — FLock video generation:
```ts
import { createServerFn } from "@tanstack/react-start";
import { z } from "zod";

/** Built during the FLock.io Creative Hackathon organised by StreetKode Fam during Indian Krump Festival 14 */
export const animate = createServerFn({ method: "POST" })
  .inputValidator((d) => z.object({ brief: z.string().min(1).max(800) }).parse(d))
  .handler(async ({ data }) => {
    // FLock video-capable models (Kimi K2.5) accept a chat completion with
    // the video modality; the response contains an MP4 URL when done.
    const r = await fetch("https://api.flock.io/v1/chat/completions", {
      method: "POST",
      headers: {
        "x-litellm-api-key": process.env.FLOCK_API_KEY!,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        model: "kimi-k2.5",
        modalities: ["video", "text"],
        messages: [{
          role: "user",
          content: `Short tension scoring reel: ${data.brief}. 6 seconds, cinematic, no dialogue.`,
        }],
      }),
    });
    if (r.status === 401) throw new Error("FLock rejected the API key — check FLOCK_API_KEY.");
    if (r.status === 402) throw new Error("FLock balance exhausted — top up at platform.flock.io.");
    if (r.status === 429) throw new Error("FLock rate limited — try again in a moment.");
    if (!r.ok) throw new Error(`FLock video failed: ${r.status}`);
    const j = await r.json();
    const msg = j.choices?.[0]?.message;
    const url = msg?.videos?.[0]?.video_url?.url
             ?? msg?.content?.match?.(/https?:\/\/\S+\.mp4/i)?.[0];
    if (!url) throw new Error("FLock returned no video URL.");
    return { url: url as string };
  });
```

CLIENT: textarea + "Render reel". While the server fn awaits (20–40s), show a
soft "Rendering…" pulse. On success, render `<video src={url} controls autoPlay loop />`.

Video generation is slow and pricey — one render at a time keeps it inside the
5-credit budget. Browse video-capable models at https://platform.flock.io/models
(filter by Type: Video).

USER FLOW (the entire app — nothing else exists)
1. Land on the page; the headline previews what the demo does for tension scoring.
2. The primary action (a prompt → progress bar → playable MP4 surface for short motion sketches, loops, or scene reels) is one tap away; the rest of the layout supports it.
3. FLock runs the kernel server-side, the result lands on screen, the user can retry or copy.

KEY — only ONE secret is required:
1. `FLOCK_API_KEY`. Sign up at https://platform.flock.io, create a team,
   generate an API key (starts with `sk-...`). Add it to Project Settings ->
   Secrets. Read it only on the server via `process.env.FLOCK_API_KEY`.
   Never prefix with `VITE_`, never expose to the client. One key unlocks
   the entire FLock model marketplace — text, image, video, tools.

CREDIT (must appear in UI footer AND as JSDoc on the server function):
Built during the FLock.io Creative Hackathon organised by StreetKode Fam during Indian Krump Festival 14
Appendix · Market

Market sizing.

TAM
$1.1B
global video editing software market
SAM
$120M
genre-specific film audio post-production
SOM
$15M
indie horror filmmaker sound design assets

Indicative figures for hackathon pitches — refine with your own research before raising.

See also

Adjacent entries.