Skip to main content
Framesail AI
API

Framesail for agents

Framesail is the workflow and state layer for producing long-form video with AI: it owns the project database, asset continuity, voiceover timing, storyboard planning, and the render pipeline. Your agent drives the workflow; Framesail guarantees that minute 7 of the video is consistent with minute 1.

API & MCP access is included on the Pro and BYOK plans — see pricing.

Surfaces

Two equivalent surfaces, one auth scheme. The MCP tools are thin wrappers over the same REST endpoints — pick one surface per pipeline run.

SurfaceURLBest for
REST APIapi.framesail.comScripts, SDKs, custom backends (OpenAPI at /openapi.json)
MCP serverapi.framesail.com/mcpClaude Code, Claude Desktop, claude.ai, Cursor, any MCP client

Connecting

Claude Code / Agent SDK (MCP)

terminal
claude mcp add --transport http framesail \
  https://api.framesail.com/mcp \
  --header "Authorization: Bearer fsk_..."

claude.ai / Claude Desktop

Settings → Connectors → Add custom connector → URL https://api.framesail.com/mcp, and supply the same Authorization header.

REST

Any HTTP client; the machine-readable spec lives at /openapi.json.

Authentication

Create an API key on your account page (/app/account → API Keys). Send it as a Bearer token — the same header works for both REST and MCP:

Authorization: Bearer fsk_...

Keys are shown once at creation and can be revoked anytime. For security, key management itself requires a signed-in browser session — an API key cannot mint or revoke API keys. Creating keys requires a Pro or BYOK subscription.

BYOK — bring your own model keys

On the BYOK plan, any job whose model provider you supply a key for runs on your key and bills 0 credits. Two modes, usable together:

1. Stored (recommended): PUT /provider-keys/{provider} with {"key": "..."} — encrypted at rest (AES-256-GCM), never returned or logged, removable anytime.

2. Per-request: send X-Provider-Key-<provider> headers (e.g. X-Provider-Key-Openai: sk-...) on any request, including the MCP connection. For async jobs the key travels encrypted on the job row and is wiped the moment the job finishes.

Providers: openai, gemini, anthropic, fal (all video models), elevenlabs, minimax. Coverage is per-job: with only an OpenAI key, GPT script jobs are free (BYOK) while a Gemini storyboard bills credits. Each job's record notes which mode billed it.

The workflow

Every generation call returns 202 {"job_id": ...} immediately. Poll GET /jobs/status?project_id=... every 5–15s (jobs flow pending → running → complete | error). MCP clients should prefer the await_jobs tool — it long-polls server-side (~50s per call) so the agent doesn't burn turns. Long steps are normal: storyboard generation takes minutes, not seconds, and a full segment render longer — don't treat a slow job as a failed one.

Resuming / orientation: GET /projects/{id}/pipeline (MCP: get_pipeline_progress) returns every step's state plus a single next_action — call it when picking up an existing project or after any step, instead of inferring progress. State lives server-side; sessions can stop and resume freely.

StepRESTMCP tool
0 · Pick a channelGET /channels (create: POST /channels)list_channels / create_channel
1 · Create projectPOST /projectscreate_project
2 · ScriptPOST /generate/script (or POST /script/save for your own); review via GET /scriptgenerate_script / save_script / get_script / revise_script
3 · Scan scriptPOST /generate/script_scan — extracts characters/environments/objects + voice blocksscan_script / rescan_voice_blocks
4 · Review assetsGET /assets, PATCH /assets/{id}, then POST /assets/{id}/generate-reference for recurring characterslist_assets / update_asset / generate_asset_reference
5 · VoiceoverBind voices (PATCH /projects/{id}/voice, PATCH /assets/{id}/voice), then POST /generate/voice_block_batchlist_voices / set_narrator_voice / set_character_voice / generate_voiceover
6 · Style templatesPOST /generate/art_style_character_template + …_environment_template (required before storyboard)generate_style_template
7 · StoryboardPOST /generate/storyboard — needs voiceover timinggenerate_storyboard
8 · Render assetsPOST /segments/generate-all?dry_run=true first (check credits), then for realgenerate_segments / get_credit_balance
9 · Polish (optional)Music, SFX, captionsbrowse_audio_library / add_music_track / add_segment_sfx / update_caption_config
10 · Build timelinePOST /scenes/buildbuild_scenes
11 · Export MP4POST /projects/{id}/exportexport_video
12 · DownloadGET /projects/{id}/export/download-urlget_video_url

Steps are stateful — never fire step N+1 before step N's jobs are complete. Re-running scan_script deletes and recreates assets; after editing the script once assets are curated, use rescan_voice_blocks instead. After editing segments, regenerating assets, or changing music/captions, re-run build_scenes before export_video.

Styles & prompt overrides

Styles (channel-scoped) carry the creative identity: art_style, narrative_style, director_style, script_prompt, plus custom fields referenced as @field_name in prompts and resolved at generation time. Create styles from reference media (YouTube URLs, text, uploaded files) via POST /styles, then bind one to a project with PATCH /projects/{id}/defaults.

Per-call prompt overrides: every generate endpoint accepts editable_sections: {section_id: content} — the same expert surface the web UI exposes. GET /jobs/{job}/template lists each job's sections, defaults, and which are locked. Don't rebuild prompts from scratch; override the one section you need.

Models: GET /models?job=... lists allowed models per job; the first entry is the default. Model choice matters — flash-tier models flatten storyboard pacing, so the defaults are the validated tier.

Etiquette & limits

Ready to connect? Generate a key on your account page, or review the Pro and BYOK plans.