Base44 + ReelSDK $0.02 per compute minute, first $0.50 free
Add video editing to a Base44 app
Base44 backend functions are Deno code that stops after 5 minutes, with no ffmpeg binary to call. ReelSDK runs the edit for $0.02 per compute minute: an 8-second clip comes back trimmed, titled and encoded to 720p in about 7 seconds, from one fetch in a function that reads your key from Base44 secrets.
- One backend function, the key in Base44 secrets
- Trim, title and encode with ffmpeg 8.1
- Billed by the second, failed jobs free
Warning Ignored build scripts for packages: npm:ffmpeg-static@5.2.0
error: Uncaught (in promise) NotFound: Failed to spawn '.../ffmpeg-static/5.2.0/ffmpeg': No such file or directory (os error 2)
Sources: Deno: npm lifecycle scripts, Base44 backend functions
The same job as one call to ReelSDK
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
-H "Authorization: Bearer $REELSDK_KEY" \
--json '{
"inputs": {
"in.mp4": "https://api.reelsdk.com/f/lib/demo/clip.mp4"
},
"args": [
"-i", "in.mp4", "-t", "8", "-vf",
"scale=720:-2,drawtext=fontfile=/usr/share/fonts/reelsdk/Anton-Regular.ttf:text='\''Seville'\'':fontsize=96:fontcolor=white:borderw=5:bordercolor=black:x=(w-text_w)/2:y=h*0.08",
"-c:a", "aac", "out.mp4"
],
"outputs": ["out.mp4"],
"timeout_s": 120
}'Why ffmpeg breaks here
Deno code, 5 minutes, no binaries
A Base44 backend function is a Deno handler in base44/functions/<name>/entry.ts. Base44 deploys the .js, .ts, .json and .jsonc files in that folder, so an ffmpeg binary has no way to ship with it. Packages that bring their own, like ffmpeg-static, fetch the binary in an npm install script, and Deno doesn't run those unless you approve them: the import works and the spawn fails with No such file or directory. Every call also ends after 5 minutes, and backend functions need the Builder plan or higher.
The function can still do the part it's good at. It checks the signed-in user, reads your key with secrets.get() and sends the ffmpeg arguments to POST /v1/ffmpeg, where ffmpeg 8.1 runs on a fresh machine per job with up to 50 inputs. The call waits up to 60 s by default and answers with the mp4 link. Here is an 8-second result.
Raw ffmpeg costs $0.02 per compute minute, billed by the second, so a job that keeps a machine busy for 6 s costs $0.002. Failed jobs are free and there is no subscription; pricing has the other job types.
Base44 functions next to ReelSDK
| Topic | Base44 backend function | ReelSDK |
|---|---|---|
| Running ffmpeg | No binary ships with the function | ffmpeg 8.1 through POST /v1/ffmpeg |
| Time per request | 5 minutes, then the request is terminated | Jobs up to 10 min, ?wait= up to 300 s |
| Function chains | 7 functions, the 8th gets a 403 | One HTTPS call per edit |
| Secrets | secrets.get() inside the handler | Authorization: Bearer with that value |
| Plan | Builder or higher for backend functions | Pay per use, $0.50 free to start |
Base44 limits from Base44 backend functions, checked November 2026.
Set it up
One prompt, one secret, one function
You need a Base44 app on the Builder plan or higher and a ReelSDK key. The page never sees the key: it uploads the clip, calls your function, and the function calls ReelSDK.
Paste the prompt into the Base44 chat
The prompt asks for an
editClipbackend function, aVideoentity and a page that lists each user's videos. It spells out the checks so the AI doesn't skip them.Prompt for Base44 Add a video editing feature. A signed-in user uploads a short video with the UploadFile integration and types a title. Create a backend function called editClip that: - returns 401 when base44.auth.me() has no user - returns 400 unless file_url is an https URL and the title has at least one letter or digit - keeps only letters, digits, spaces and . , ! ? - in the title, at most 40 characters - reads my ReelSDK key with secrets.get("REELSDK_KEY") inside the handler, never at the top of the file - POSTs to https://api.reelsdk.com/v1/ffmpeg?wait=60 with the header Authorization: Bearer <key> and a JSON body with: inputs { "in.mp4": file_url } args that trim to 8 seconds, scale to 720 px wide and draw the title near the top with drawtext and fontfile=/usr/share/fonts/reelsdk/Anton-Regular.ttf, then write out.mp4 outputs ["out.mp4"] and timeout_s 120 - returns { id, status, video } with video = job.outputs["out.mp4"] Save each result on a Video entity with the title, the job id and the video URL, and list the user's videos on the page. Never put the key in frontend code.Add the key as a secret
Create a key in the ReelSDK dashboard and add it as a secret named
REELSDK_KEYin your app's dashboard, or withbase44 secrets setfrom the CLI. Read it withsecrets.get()inside the handler: secrets resolve per request, so a read at module load returnsundefined.Base44 secret - Name
- REELSDK_KEY
- Value
- rsdk_live_...
Check the editClip function
Open it under Code,
base44,functions. It should turn away anonymous calls, clean the title before it goes into thedrawtextfilter, where a quote or a colon would break the arguments, and settimeout_sso one request can't hold a machine for long. A render still running after 60 s comes back as a 202 withstatus: "running".base44/functions/editClip/entry.tsTry it import { createClientFromRequest } from "npm:@base44/sdk"; import { secrets } from "base44:runtime"; const FONT = "/usr/share/fonts/reelsdk/Anton-Regular.ttf"; export default async function (req: Request): Promise<Response> { const base44 = createClientFromRequest(req); const user = await base44.auth.me(); if (!user) return Response.json({ error: "Unauthorized" }, { status: 401 }); const { file_url, title } = await req.json(); const label = String(title ?? "").replace(/[^\p{L}\p{N} .,!?-]/gu, "").slice(0, 40).trim(); const valid = typeof file_url === "string" && file_url.startsWith("https://"); if (!valid || !/[\p{L}\p{N}]/u.test(label)) { return Response.json({ error: "file_url and title are required" }, { status: 400 }); } const res = await fetch("https://api.reelsdk.com/v1/ffmpeg?wait=60", { method: "POST", headers: { Authorization: `Bearer ${secrets.get("REELSDK_KEY")}`, "Content-Type": "application/json", }, body: JSON.stringify({ inputs: { "in.mp4": file_url }, args: [ "-i", "in.mp4", "-t", "8", "-vf", `scale=720:-2,drawtext=fontfile=${FONT}:text='${label}':fontsize=96` + ":fontcolor=white:borderw=5:bordercolor=black:x=(w-text_w)/2:y=h*0.08", "-c:a", "aac", "out.mp4", ], outputs: ["out.mp4"], timeout_s: 120, }), }); const { job, error } = await res.json(); if (!res.ok) return Response.json({ error }, { status: res.status }); const video = job.outputs?.["out.mp4"] ?? null; return Response.json({ id: job.id, status: job.status, video }); }Upload the clip and call the function
UploadFileputs the clip in public storage and returnsfile_url, andfunctions.invokepasses the signed-in user's credentials along. Output links last 7 days, so copy the mp4 into your own storage if you keep it longer.src/lib/editClip.js import { base44 } from "@/api/base44Client"; export async function editClip(file, title) { const { file_url } = await base44.integrations.Core.UploadFile({ file }); const result = await base44.functions.invoke("editClip", { file_url, title }); return result.data; }
FAQ
Video on Base44, answered
Can a Base44 backend function run ffmpeg?
No. Functions run on Deno, Base44 deploys the .js, .ts, .json and .jsonc files in the function's folder, and Deno skips the install script that ffmpeg-static uses to fetch its binary. Send the same arguments to ReelSDK's POST /v1/ffmpeg instead: ffmpeg 8.1 on a fresh machine per job, $0.02 per compute minute.
Does a video edit fit in Base44's 5-minute function limit?
Short edits fit with room to spare: an 8-second trim and title comes back in about 7 seconds. The function waits up to 60 s by default and up to 300 s with ?wait=300. For longer renders, send ?wait=0, save job.id on the Video record and check GET /v1/jobs/{id} from a scheduled automation.
Where should the ReelSDK API key live in a Base44 app?
In your app's secrets, read with secrets.get() inside a backend function. Never in page code: anything the browser loads can be read, and an rsdk_live_ key renders on your bill. The function above also turns away anonymous users and caps each job with timeout_s.
How do users upload the video?
With Base44's UploadFile integration, which stores the file in public storage and returns file_url. Pass that URL to the function. ReelSDK downloads inputs up to 500 MB each and 1 GB per job, with media up to 15 minutes long.
What does it cost?
There is no subscription and the first $0.50 is free. Raw ffmpeg is $0.02 per compute minute billed by the second, slideshows and captions $0.03 per output minute, and faceless shorts $0.30 up to 60 s. Each key runs 3 jobs at once and 500 a day.
The same fix on other platforms
All integrationsReady to build?
Ship video from your app today
Your first $0.50 is free, and one key covers every endpoint.
