Quickstart
Generate your first video in under five minutes.
You need an account with credits, an API key, and either Node.js 20.3+, Python 3.11+, or curl and jq.
Get an API key
Sign in to the dashboard with your email address. Your first sign-in creates
an organization. Add credits on the Billing page, then open API keys, choose Create key, and
copy the key. It starts with rf_live_ and is shown only once.
Keep the key on your server: anyone with it can spend your credits. Put it in an environment variable:
export RAWFRAME_API_KEY="rf_live_..."Install an SDK
npm install @rawframe/sdkGenerate a video
Save this as quickstart.ts, quickstart.py or quickstart.sh:
import { writeFile } from "node:fs/promises";
import { RawFrame } from "@rawframe/sdk";
const rf = new RawFrame(); // reads RAWFRAME_API_KEY
const video = await rf.generations.createAndWait({
model: "bytedance/seedance-2.5",
prompt: "A paper boat drifting down a rain-soaked city gutter, macro lens, golden hour",
params: { duration_seconds: 5, aspect_ratio: "16:9", resolution: "720p" },
});
const output = video.outputs?.[0];
if (!output) throw new Error("No output");
const file = await fetch(output.url);
await writeFile("paper-boat.mp4", Buffer.from(await file.arrayBuffer()));
console.log(`Saved paper-boat.mp4 (${video.id}, charged $${(video.charge_micros ?? 0) / 1_000_000})`);Then run it:
npx tsx quickstart.tsA 5-second 720p video usually takes one to three minutes. When it's done, paper-boat.mp4 is in the
current directory.
What just happened
POST /v1/generationschecked the request against Seedance 2.5's capabilities, reserved its maximum price from your credits, and queued it. It returned at once with statusqueuedand agen_...id.- The generation moved through
submittingandrunningwhile the provider rendered it, thensucceeded. The SDKs'createAndWait/create_and_waitpolls every two seconds until then. - You were charged for the seconds of video produced, and any unused reservation went back to your
balance. The charge is in
charge_micros(micro-USD). - The output was copied to our storage.
outputs[0].urlis a signed link that works for an hour.