Developer Tools

Framegen MCP

Images, video, audio and 3D generation from your MCP client.

API Keys

Connection

OAuth or API key
Endpointhttps://framegen.studio/api/mcp

Claude and ChatGPT: add a custom connector and paste the endpoint above. In Claude use Settings → Connectors → Add custom connector. In ChatGPT turn on Developer mode, then add it under Settings → Apps. You'll be asked to sign in to Framegen and approve access, so no API key is needed.

For other clients, create a key under API Keys on your account page. Keys are shown once and do not expire hourly like login sessions. Replace YOUR_API_KEY in the configuration below.

01Remote HTTP

For clients with remote HTTP MCP and bearer authentication support, including compatible AnythingLLM or Cursor configurations.

mcp_config.json
{
  "mcpServers": {
    "framegen": {
      "type": "http",
      "url": "https://framegen.studio/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

02Stdio Bridge

For stdio-only clients, including compatible Claude Desktop configurations, connect through mcp-remote.

claude_desktop_config.json
{
  "mcpServers": {
    "framegen": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://framegen.studio/api/mcp",
        "--header",
        "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}

Generation uses your prepaid wallet. Use estimate_generation_cost and get_wallet_balance before submitting a job. Generation tools return a queue ID without waiting for completion. Call check_generation later with that ID to retrieve the finished asset and actual charge; do not resubmit or check in a tight loop.

Tool Reference

18 tools

Discover models with list_models before generating. Reference limits and supported inputs vary by model. Admin and account-management tools are not exposed here.

check_generation

Check the current status of an existing Framegen generation job by its queue ID. Use this when a previous generation returned queued=true or the user asks to check an existing job. This tool never starts a new generation. When the job is complete, it returns a fresh temporary URL for the generated asset. Also returns chargedCents (amount actually deducted from the wallet for this job), refundedCents when the job failed or was cancelled, and walletBalanceAfterCents (the user's current balance) — report the final cost to the user once the job is finished.

estimate_generation_cost

Get read-only price quotes for any generation model before spending. Use category and modelId from list_models: image, video, 3d, audio (music or sound effects), or speech. Video requires duration; speech requires text. Omit image variant or video resolution to compare all options. Image referenceCount includes reference-image charges. Uses the authenticated user or API key owner's live admin pricing, referral discount and eco setting; never queues, charges, or consumes free quota. Quotes are estimates in USD cents, not a price lock. Free-image eligibility is noted separately.

estimate_video_cost

Get a read-only video price quote before generation. Provide modelId and duration in seconds; optionally provide resolution, or omit it to compare all supported resolutions. Uses the authenticated user or API key owner's live admin pricing, referral discount and eco setting. Never queues a job or charges the wallet. Prices are estimates in USD cents, not a price lock.

get_generation_cost

Look up the stored billing record for a past generation job by its queue ID: model, duration, status, chargedCents, refundedCents, netChargedCents and timestamps, plus the individual charge/refund ledger entries. Read-only — never charges or refunds anything. Only returns jobs owned by the authenticated user.

get_wallet_balance

Get the authenticated user's current Framegen wallet balance (walletBalanceCents, in USD cents). Read-only. Use it before an expensive generation to check the user can afford it, or when the user asks how much credit they have left.

list_recent_generations

List the authenticated user's most recent billed generations (newest first) with queueId, type, model, status, chargedCents, refundedCents, costCents (net) and createdAt, plus totals across the returned jobs. Use it to total spend over a period or answer "how much have I spent". Read-only. Covers jobs billed since per-job cost tracking was introduced.

generate_image

Queue an AI image generation job. Use for single images, character portraits, scene illustrations, concept art, or any visual output. Supports optional reference images (style/character/composition guidance) — whether references are supported at all, and how many, depends entirely on the chosen model, so call list_models(category: "image") first and check each model's supportsReferences/maxReferenceImages fields before including referenceImages. The user will see a review card before generation begins. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).

generate_video

Queue an AI video generation job. Use for short video clips, cinematic footage, animations, or any motion content. Supports optional reference media (start/end frames, reference images, reference videos, reference audio) — which of these are supported, and how many, depends entirely on the chosen model, so call list_models(category: "video") first and check each model's supportsStartFrame/supportsEndFrame/supportsReferenceImages/supportsReferenceVideos/supportsReferenceAudios, max* fields, and promptCapability before including any prompt or reference args. Hard prompt limits are enforced; recommendations and provider-unspecified limits are informational. For character-replacement workflows (swap a person in an existing video) use animate_replace_video instead. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).

animate_replace_video

Queue a character-replacement video job using Wan 2.2 Animate Replace. Swaps the person in a reference video with a supplied character image while preserving the original motion, expressions, lighting, and background. Use when the user wants to: replace a character in existing footage, insert an illustrated character into a real video, animate a character portrait with copied movements, or recast a person in a scene. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).

generate_3d_model

Queue a text-to-3D or image-to-3D generation job. Hunyuan accepts either text or one image, not both. Rodin supports a prompt together with up to five reference images. TRELLIS is image-only and requires referenceImages; do not provide a prompt. Use list_models to inspect supportsPrompt, supportsPromptWithImage, maxReferenceImages, and pricingType. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).

quote_video_upscale

Quote a Topaz video upscale to 1080p for an owned, completed Framegen video below 1080p. Requires a video document ID, not a URL or queue ID. Use sourceCollection Videos for generated videos or LongFormSections for a long-form section. Preserves aspect ratio, timing, frame rate and audio. Returns quoteId, totalCents in USD cents and expiresAt; the quote expires after 15 minutes. Does not queue or charge an upscale. Show the price to the user and obtain approval before calling upscale_video.

upscale_video

Confirm a quote from quote_video_upscale and queue the paid 1080p video upscale. Call only after the user approves the quoted totalCents. Requires the quoteId, not a video ID or URL. Expired quotes or changed prices require a new quote and approval. Returns queueId and status; use check_generation to retrieve progress and the finished video. Reusing the same quote does not create another job.

stitch_videos

Combine multiple videos into a single video, joined end-to-end in the given order — the same stitching the Long Form editor uses to export a project. Accepts any public or presigned video URLs (e.g. results from generate_video, or files hosted via upload_reference) and returns one merged video URL.

create_upload_url

Get a presigned URL to directly upload a local file (image, video, or audio) to Framegen storage, plus the resulting public URL — without ever putting the file bytes in a tool call. Preferred over upload_reference for anything over ~200KB (screenshots, photos, video clips): PUT the raw file bytes yourself to `uploadUrl` (e.g. via curl/Invoke-WebRequest) with header Content-Type set to your mimeType — send NO Framegen authentication to that URL. Once the PUT succeeds, `publicUrl` is immediately usable in generate_image (referenceImages), generate_video (startImage/endImage/referenceImages/referenceVideos/referenceAudios), animate_replace_video, or generate_3d_model (referenceImageUrl) — no separate confirmation call needed. Same 24-hour expiry as upload_reference. Note: unlike upload_reference, files uploaded this way are NOT auto-downscaled server-side (the bytes never pass through Framegen), so pre-resize huge images client-side if that matters.

upload_reference

Upload a local file (image, video, or audio) to Framegen storage inline and get back a temporary public URL. Use this whenever you need to pass a reference that only exists on the client side (e.g. a file the user attached) into generate_image (referenceImages), generate_video (startImage/endImage/referenceImages/referenceVideos/referenceAudios), animate_replace_video, or generate_3d_model (referenceImageUrl) — those tools require a URL, not raw file data. Best for small files (roughly under 200KB) since the whole file is base64-encoded inline in this tool call; for larger screenshots/photos/videos, use create_upload_url instead to avoid bloating the request. Oversized images (over 2048px on the longest edge) are automatically downscaled and re-encoded as JPEG server-side. The returned URL is only valid for 24 hours, after which the file is permanently deleted, so upload it right before you need it and use it in the same session.

list_models

List the currently available models for image, video, 3D, music, or speech generation, with their capabilities and pricing. Call this before generation if you are unsure which model IDs are valid — the model catalog changes over time, so do not rely on memorized model names.

generate_music

Queue an AI music generation job. Use for background music, songs, soundtracks, themes, ambient tracks, or instrumental pieces. Call list_models(category: "audio") to choose a model and check supportsLyrics. Provide lyrics directly, or set autoWriteLyrics=true and optionally provide lyricsPrompt to have Framegen write them. Lyrics are routed to a lyrics-capable model automatically. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).

generate_tts

Queue a text-to-speech job. Use for voiceover, narration, spoken dialogue, announcements, or any audio that requires a human-sounding voice reading text. Generation returns immediately after queueing with queued=true and queueId; it does not wait or poll for completion. Use check_generation with that queueId later to retrieve the finished asset; do not resubmit or check in a tight loop. Cost reporting: the response includes estimatedCostCents, currency and pricingBreakdown (the price calculated before queueing). Report the estimate now, then report chargedCents (actually deducted from the wallet) and walletBalanceAfterCents from check_generation once the job is finished. Show dollars as cents / 100 (e.g. 45 -> $0.45).