Skip to Content
GuidesMotion: Visual Code

Motion: create visuals with code

Open Studio → Motion in a brand. Describe the animation you want, or supply React source that exports a named VisualComposition. Motion generates preview frames in an isolated renderer, asks your selected model to inspect them, then saves accepted media to the brand Library.

The model selector uses your organization’s available text models and default. Models with unverified vision support are identified before you approve a quote. If a provider refuses image inspection, the revision fails with visual_check_unavailable; it never substitutes a textual claim of visual success.

Create and export

  1. Choose a name, prompt or source, model, dimensions, frame rate and duration.
  2. Optionally select owned Library images, videos or audio. Use staticFile('assets/<asset ID>') from Remotion in your component. External URLs and local file paths are not supported.
  3. Choose MP4, PNG, JPEG or a set of still frames. Review the cost estimate and approve its ceiling.
  4. Watch status, preview frames and diagnostics. Completed outputs appear in Library; video outputs can open in Editor as media.

Limits are 256–1920 even dimensions, at most 1920×1080 pixels, 24 or 30 fps, 900 frames and 30 seconds, 12 source assets and 8 outputs. One MP4 per request is supported. Prompts are bounded to 8 KiB, source to 256 KiB and props JSON to 16 KiB. Use frame-driven Remotion animation rather than wall-clock or CSS timing. Only the preinstalled React and Remotion packages are available.

Brand fonts

Motion loads the fonts your approved Brand OS revision owns. In the composition, name the family in fontFamily at the weight and style the typography rule declares, for example fontFamily: "'Brand Display', serif". Do not declare @font-face or staticFile for it: the renderer declares the face from the brand’s own file and waits for it to load. Authored revisions are told which families are available.

Only fonts that a typography rule of the approved revision owns are loaded, up to 8 files of 4 MiB each in WOFF2, WOFF, TTF or OTF, and only your own brand’s files. A file whose bytes do not match the hash the revision approved stops the render with visual_brand_font_hash_mismatch. A brand without an approved revision renders without brand fonts. The saved render evidence records which file drew each line of text, so a font check can pass for a still in an approved font.

Revisions and recovery

Every request creates an immutable numbered revision. Prompt changes amend retained source; source changes replace it; props changes reuse it. An empty props object is a valid change. Revisions retain settings, assets and output requests. Use a separate export request to change output formats without another authoring call.

Model-authored revisions may repair a failed compile or visual check at most twice. Direct source is preserved byte-for-byte and never automatically repaired. To request changes to supplied source, create a subsequent prompt revision.

History shows previews, diagnostics, requested and completed outputs, source availability and cost receipts. Download retained source as plain .tsx text or explicitly load it for editing. Generated code is never executed in the authenticated web page.

A stale expectedRevision returns a conflict instead of overwriting newer work. Review the latest history and submit a new request identity. Retry requires a failed or cancelled revision with retained source; it reuses that source without authoring or automatic repair. If no source survived, submit a new prompt or source revision.

Costs and cancellation

The quote separates authoring/repairs, visual inspection and sandbox rendering. Each possible render job includes a conservative 120-second bound. You approve a maximum, then only confirmed consumed work counts against it. Cancellation and failure release the unused part of the approved ceiling; already consumed work remains consumed. On a self-hosted instance Genfeed does not bill you: model calls are charged by the providers whose keys you configured, and rendering runs on your own infrastructure (see Visual Code Renderer).

A route, access, provider-key or pricing change stops the next paid stage and requires a fresh quote. Unexpected provider overrun cannot debit more than the approved ceiling. A provider call interrupted before its result is durably recorded is marked indeterminate and never automatically sent again. Unknown liability belongs to the operator; an explicit new retry is a new invocation.

API, agents and workflows

Authenticated API endpoints under /visual-projects expose catalog, quote, project creation/listing, history, revisions, exports, cancellation, retries and source download. Mutations require requestId; revisions, exports and retries also require expectedRevision. Replaying the same identity and payload returns the same revision; changed payloads conflict.

Workflow actions are visual-code.catalog, .quote, .generate, .status, .revise, .export, .cancel and .retry. Agent aliases are get_visual_code_catalog, quote_visual_code_generation, generate_visual_code, get_visual_code_project, revise_visual_code_project, export_visual_code_project, cancel_visual_code_project and retry_visual_code_project. MCP lists them on every connection, as generate_media, check_job and get_generation_catalog actions (visual_code*). They use the same authorization, schemas, quotes and revision ledger. Paid mutations require approval.

Retrying a request that did not receive a response

Keep the original inputs and request ID when retrying an uncertain submission. This resumes admission of the same revision and uses the same cost reservation. A revision permits at most 16 admission attempts. After visual_admission_attempt_limit, cancel that revision and let its pending bookkeeping finish before creating a new request. Cancellation remains available after this limit.

If cancellation overlaps a cost reservation, your approved hold may briefly be established before it is released or settled. Cancellation cannot start another model call or render. A pending provider call must return, or its workflow ownership must expire, before the remaining hold can be reconciled safely.

Holds expire after two hours, including time spent queued. Motion checks the existing hold before each paid stage and stops with visual_reservation_unavailable when it is no longer usable. Request a new explicit quoted retry after recovery; Motion never renews or duplicates the old hold. If the wallet releases an expired hold while an admitted call is pending, confirmed costs become operator liability, preserving actual usage without a second debit.

Last updated on