Documentation
REST API
Access recordings, clips, billing and publishing through your Filmili account.
Start a session
Use the same origin as your Filmili workspace. Send JSON to POST /api/login.
Keep the returned filmili_session cookie in your HTTP client’s cookie jar.
For a write as a signed-in user, include X-CSRF-Token with the csrf_token
from login or GET /api/me. A browser on the Filmili origin sends its session cookie automatically.
Paid features use your account’s subscription and remaining allowance. Source minutes round up for each recording. A failed generation releases the minutes it reserved.
Friend-pilot invitations are single-use and expire 14 days after issue. Redeeming the invitation at signup starts a 14-day pilot with 60 source minutes. Pilot accounts can generate clips and ideas, use configured publishing features and submit feedback without a checkout.
Import a recording
Both upload and YouTube import accept an optional workflow query parameter.
Use highlights for standout moments (the default), series for consecutive parts,
recap for one representative excerpt or trailer for a short hook.
For workflow=topic, also send a topic query parameter with words spoken in the recording.
In a signed-in Filmili browser, provide your public YouTube video URL at the prompt. This queues real processing and uses the account’s source-minute allowance. If you retry a submission, reuse its original idempotency key.
const sourceUrl = window.prompt("Public YouTube URL");
const submissionId = crypto.randomUUID(); // Keep this value for a retry of this submission.
const profile = await fetch("/api/me").then(response => response.json());
const response = await fetch("/api/imports", {
method: "POST",
credentials: "same-origin",
headers: {
"Content-Type": "application/json",
"X-CSRF-Token": profile.csrf_token,
"Idempotency-Key": submissionId
},
body: JSON.stringify({url: sourceUrl})
});
const data = await response.json();
if (!response.ok) throw new Error(data.detail);
const jobId = data.job.id;
Poll GET /api/jobs/{job_id} for that ID every few seconds. Stop when the status is complete
or failed. Finished clips include a playback URL. The next_cursor of a library page is null at the end.
Accounts and subscriptions
- GET
/api/plans - List monthly plans, prices in US cents and source-minute allowances. The friends pilot offers a read-only catalog under pilot.preview_plans.
- POST
/api/register - Create an account with email and password (10–256 characters). An invited tester also provides invite from their Filmili invitation link. The response starts a session.
- POST
/api/login - Sign in with email and password. Save the session cookie and csrf_token.
- GET
/api/me - Read the current user, subscription usage and CSRF token. A guest receives null fields.
- POST
/api/logout - Revoke the current session.
- POST
/api/password/forgot - Request a reset link using email. Returns 202 for an accepted request.
- POST
/api/password/reset - Set a new password with token and password. Reset links expire after 30 minutes.
- POST
/api/checkout - Pass plan as pro or creator. Open the returned url to complete hosted checkout.
- POST
/api/portal - Get the existing subscriber’s hosted billing portal url.
Recordings and clips
- POST
/api/jobs - Upload one video in the multipart field file. Returns 202 and a job object. To auto-upload finished clips privately, pass youtube_private_channel (your connected channel ID) and youtube_audience (made_for_kids or not_made_for_kids) as query parameters.
- POST
/api/imports - Send a public YouTube video in the JSON field url. Returns 202 and a job object. Supports the same optional private YouTube upload parameters as POST /api/jobs.
- GET
/api/jobs - Read one page of your jobs, newest first. Use view=summary for a light listing, limit (1–100) for page size and cursor for the next page.
- GET
/api/jobs/{job_id} - Read one owned recording, including its status, error and clips. Clip times are source seconds.
- GET
/api/jobs/{job_id}/clips/{filename} - Play an owned MP4 or append ?download=true to download. Byte-range requests support seeking.
- POST
/api/jobs/{job_id}/clips/{filename}/trim - Send start and end in seconds relative to the original clip. A range of at least one second saves a new clip.
Video ideas
- POST
/api/ideas - Send a topic (3–500 characters) and language (English or Hindi). Returns 201 with three pitches.
- GET
/api/ideas - Read up to 50 of the current subscriber’s most recent saved idea sets.
Publishing
- GET
/api/publishing - Read provider readiness, connected channels and scheduled posts. Use job_id and filename to filter the post history for a clip.
- POST
/api/publishing/{provider}/connect - Start connecting YouTube, TikTok or Instagram. The response includes an authorization url. The optional job_id selects the return page.
- GET
/api/publishing/{provider}/callback - The provider returns here with its authorization code and state to finish connecting the account.
- GET
/api/publishing/channels/{channel_id}/settings - Read the channel’s available visibility settings and provider-specific publishing options.
- POST
/api/publishing/channels/{channel_id}/verify - Verify an owned connection by reading its channel information from the provider. Returns provider, label and verified_at in Unix seconds.
- POST
/api/publishing/channels/{channel_id}/disconnect - Disconnect the owned channel and cancel queued posts for it.
- POST
/api/publishing/posts - After user confirmation, submit channel_id, job_id, filename, title, privacy, confirmed=true and the provider’s audience settings. Optional due is a Unix timestamp in seconds. Supply a unique Idempotency-Key (12–128 letters, digits, hyphens or underscores). Returns 202 with id and status.
- POST
/api/publishing/posts/{post_id}/cancel - Cancel an owned post while it is queued.
Preview feedback
- POST
/api/feedback - Invited pilot accounts can submit a message of 10–2,000 characters with their session and CSRF token. Returns 201 after saving feedback.
Billing webhook
- POST
/api/webhooks/dodo - Dodo Payments delivers signed billing events here. Events are verified before Filmili changes subscription access.
Errors
Read the JSON detail field for a user-facing error. A 401 calls for sign-in,
402 indicates a plan or quota issue, and 403 can indicate an expired CSRF token or an origin mismatch.
A 404 can indicate unavailable or unowned content. A 422 calls for a change to the request.
On 429, wait before retrying.