@mevdragon/vidfarm-devcli 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +37 -1
- package/README.md +27 -183
- package/SKILL.director.md +293 -0
- package/SKILL.platform.md +312 -0
- package/auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md +275 -0
- package/auto-create-hyperframe-templates/extractor-system-prompt.md +128 -0
- package/auto-create-hyperframe-templates/input-manifest.schema.json +56 -0
- package/auto-create-hyperframe-templates/lambda-memory-estimator.md +118 -0
- package/auto-create-hyperframe-templates/production-graph.schema.json +314 -0
- package/auto-create-hyperframe-templates/runbook.md +198 -0
- package/auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs +368 -0
- package/auto-create-hyperframe-templates/template-plan.schema.json +311 -0
- package/auto-create-hyperframe-templates/template-planner-prompt.md +144 -0
- package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +124 -0
- package/auto-create-templates/extractor-system-prompt.md +8 -2
- package/auto-create-templates/template-plan.schema.json +73 -2
- package/auto-create-templates/template-planner-prompt.md +63 -1
- package/dist/src/account-pages-legacy.js +361 -89
- package/dist/src/account-pages-legacy.js.map +1 -0
- package/dist/src/account-pages.js +13 -3
- package/dist/src/account-pages.js.map +1 -0
- package/dist/src/app.js +7060 -946
- package/dist/src/app.js.map +1 -0
- package/dist/src/cli.js +111 -29
- package/dist/src/cli.js.map +1 -0
- package/dist/src/composition-runtime.js +581 -0
- package/dist/src/composition-runtime.js.map +1 -0
- package/dist/src/config.js +69 -11
- package/dist/src/config.js.map +1 -0
- package/dist/src/context.js +280 -21
- package/dist/src/context.js.map +1 -0
- package/dist/src/dev-app-legacy.js +18 -17
- package/dist/src/dev-app-legacy.js.map +1 -0
- package/dist/src/dev-app.js +1 -0
- package/dist/src/dev-app.js.map +1 -0
- package/dist/src/domain.js +2 -1
- package/dist/src/domain.js.map +1 -0
- package/dist/src/editor-chat-history.js +10 -0
- package/dist/src/editor-chat-history.js.map +1 -0
- package/dist/src/editor-chat.js +133 -24
- package/dist/src/editor-chat.js.map +1 -0
- package/dist/src/frontend/flockposter-cache-store.js +10 -2
- package/dist/src/frontend/flockposter-cache-store.js.map +1 -0
- package/dist/src/frontend/homepage-client.js +6 -3
- package/dist/src/frontend/homepage-client.js.map +1 -0
- package/dist/src/frontend/homepage-shared.js +1 -0
- package/dist/src/frontend/homepage-shared.js.map +1 -0
- package/dist/src/frontend/homepage-store.js +1 -0
- package/dist/src/frontend/homepage-store.js.map +1 -0
- package/dist/src/frontend/homepage-view.js +131 -18
- package/dist/src/frontend/homepage-view.js.map +1 -0
- package/dist/src/frontend/page-runtime-client.js +5 -2
- package/dist/src/frontend/page-runtime-client.js.map +1 -0
- package/dist/src/frontend/page-runtime-store.js +1 -0
- package/dist/src/frontend/page-runtime-store.js.map +1 -0
- package/dist/src/frontend/sentry.js +42 -0
- package/dist/src/frontend/sentry.js.map +1 -0
- package/dist/src/frontend/template-editor-chat.js +1719 -213
- package/dist/src/frontend/template-editor-chat.js.map +1 -0
- package/dist/src/help-page.js +333 -0
- package/dist/src/help-page.js.map +1 -0
- package/dist/src/homepage.js +169 -47
- package/dist/src/homepage.js.map +1 -0
- package/dist/src/hyperframes/composition.js +180 -0
- package/dist/src/hyperframes/composition.js.map +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/instrument.js +30 -0
- package/dist/src/instrument.js.map +1 -0
- package/dist/src/lib/crypto.js +1 -0
- package/dist/src/lib/crypto.js.map +1 -0
- package/dist/src/lib/dev-log.js +54 -0
- package/dist/src/lib/dev-log.js.map +1 -0
- package/dist/src/lib/display-name.js +11 -0
- package/dist/src/lib/display-name.js.map +1 -0
- package/dist/src/lib/ids.js +21 -1
- package/dist/src/lib/ids.js.map +1 -0
- package/dist/src/lib/images.js +1 -0
- package/dist/src/lib/images.js.map +1 -0
- package/dist/src/lib/json.js +1 -0
- package/dist/src/lib/json.js.map +1 -0
- package/dist/src/lib/template-dna.js +1 -0
- package/dist/src/lib/template-dna.js.map +1 -0
- package/dist/src/lib/template-paths.js +1 -0
- package/dist/src/lib/template-paths.js.map +1 -0
- package/dist/src/lib/template-style-options.js +40 -2
- package/dist/src/lib/template-style-options.js.map +1 -0
- package/dist/src/lib/time.js +1 -0
- package/dist/src/lib/time.js.map +1 -0
- package/dist/src/lib/video-quality-harness.js +60 -0
- package/dist/src/lib/video-quality-harness.js.map +1 -0
- package/dist/src/page-runtime.js +1 -0
- package/dist/src/page-runtime.js.map +1 -0
- package/dist/src/page-shell.js +1501 -49
- package/dist/src/page-shell.js.map +1 -0
- package/dist/src/primitive-context.js +144 -8
- package/dist/src/primitive-context.js.map +1 -0
- package/dist/src/primitive-registry.js +1919 -78
- package/dist/src/primitive-registry.js.map +1 -0
- package/dist/src/primitive-sdk.js +1 -0
- package/dist/src/primitive-sdk.js.map +1 -0
- package/dist/src/primitives/remotion/html-image.js +3 -1
- package/dist/src/primitives/remotion/html-image.js.map +1 -0
- package/dist/src/primitives/remotion/media-slideshow.js +60 -0
- package/dist/src/primitives/remotion/media-slideshow.js.map +1 -0
- package/dist/src/react-page-shell.js +1 -0
- package/dist/src/react-page-shell.js.map +1 -0
- package/dist/src/ready-post-schedule-component.js +1 -0
- package/dist/src/ready-post-schedule-component.js.map +1 -0
- package/dist/src/registry.js +237 -24
- package/dist/src/registry.js.map +1 -0
- package/dist/src/runtime.js +3 -0
- package/dist/src/runtime.js.map +1 -0
- package/dist/src/services/api-call-history.js +4 -0
- package/dist/src/services/api-call-history.js.map +1 -0
- package/dist/src/services/auth.js +40 -50
- package/dist/src/services/auth.js.map +1 -0
- package/dist/src/services/billing.js +20 -44
- package/dist/src/services/billing.js.map +1 -0
- package/dist/src/services/chat-threads.js +10 -6
- package/dist/src/services/chat-threads.js.map +1 -0
- package/dist/src/services/fork-access.js +94 -0
- package/dist/src/services/fork-access.js.map +1 -0
- package/dist/src/services/ghostcut.js +132 -0
- package/dist/src/services/ghostcut.js.map +1 -0
- package/dist/src/services/hyperframes.js +1014 -0
- package/dist/src/services/hyperframes.js.map +1 -0
- package/dist/src/services/job-capacity.js +14 -0
- package/dist/src/services/job-capacity.js.map +1 -0
- package/dist/src/services/job-logs.js +4 -0
- package/dist/src/services/job-logs.js.map +1 -0
- package/dist/src/services/jobs.js +99 -91
- package/dist/src/services/jobs.js.map +1 -0
- package/dist/src/services/media-processing.js +743 -0
- package/dist/src/services/media-processing.js.map +1 -0
- package/dist/src/services/primitive-media-lambda.js +280 -0
- package/dist/src/services/primitive-media-lambda.js.map +1 -0
- package/dist/src/services/providers.js +1560 -178
- package/dist/src/services/providers.js.map +1 -0
- package/dist/src/services/rate-limits.js +3 -2
- package/dist/src/services/rate-limits.js.map +1 -0
- package/dist/src/services/remotion.js +495 -92
- package/dist/src/services/remotion.js.map +1 -0
- package/dist/src/services/serverless-auth.js +374 -0
- package/dist/src/services/serverless-auth.js.map +1 -0
- package/dist/src/services/serverless-jobs.js +1074 -0
- package/dist/src/services/serverless-jobs.js.map +1 -0
- package/dist/src/services/serverless-provider-keys.js +401 -0
- package/dist/src/services/serverless-provider-keys.js.map +1 -0
- package/dist/src/services/serverless-records.js +1086 -0
- package/dist/src/services/serverless-records.js.map +1 -0
- package/dist/src/services/serverless-template-configs.js +67 -0
- package/dist/src/services/serverless-template-configs.js.map +1 -0
- package/dist/src/services/storage.js +170 -35
- package/dist/src/services/storage.js.map +1 -0
- package/dist/src/services/template-certification.js +295 -3
- package/dist/src/services/template-certification.js.map +1 -0
- package/dist/src/services/template-loader.js +45 -1
- package/dist/src/services/template-loader.js.map +1 -0
- package/dist/src/services/template-runtime-bundles.js +217 -0
- package/dist/src/services/template-runtime-bundles.js.map +1 -0
- package/dist/src/services/template-sources.js +452 -87
- package/dist/src/services/template-sources.js.map +1 -0
- package/dist/src/services/video-normalization.js +2 -0
- package/dist/src/services/video-normalization.js.map +1 -0
- package/dist/src/services/webhooks.js +7 -6
- package/dist/src/services/webhooks.js.map +1 -0
- package/dist/src/template-editor-pages.js +5637 -1322
- package/dist/src/template-editor-pages.js.map +1 -0
- package/dist/src/template-editor-shell.js +1376 -170
- package/dist/src/template-editor-shell.js.map +1 -0
- package/dist/src/template-sdk.js +1 -0
- package/dist/src/template-sdk.js.map +1 -0
- package/dist/src/worker.js +11 -226
- package/dist/src/worker.js.map +1 -0
- package/package.json +47 -12
- package/public/assets/homepage-client-app.js +34 -8
- package/public/assets/page-runtime-client-app.js +44 -18
- package/readme.secret.md +89 -0
- package/templates/vidfarm_template_0000/README.md +106 -0
- package/templates/vidfarm_template_0000/SKILL.md +266 -0
- package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
- package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
- package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
- package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
- package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
- package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
- package/templates/vidfarm_template_0000/composition.json +11 -0
- package/templates/vidfarm_template_0000/src/lib/images.js +221 -0
- package/templates/vidfarm_template_0000/src/remotion/Root.js +33 -0
- package/templates/vidfarm_template_0000/src/remotion/index.js +3 -0
- package/templates/vidfarm_template_0000/src/sdk.js +3 -0
- package/templates/vidfarm_template_0000/src/style-options.js +200 -0
- package/templates/vidfarm_template_0000/src/template-dna.js +9 -0
- package/templates/vidfarm_template_0000/src/template.js +1566 -0
- package/templates/vidfarm_template_0000/template.config.json +21 -0
- package/GETTING_STARTED.developers.md +0 -87
- package/SKILL.developer.md +0 -1177
- package/dist/src/db.js +0 -2007
package/readme.secret.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Secret Admin Provisioning
|
|
2
|
+
|
|
3
|
+
This file contains the production `SUPERAGENCY_KEY` and an example admin provisioning request.
|
|
4
|
+
|
|
5
|
+
## Literal `SUPERAGENCY_KEY`
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
24084dsafjl428042454
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
PUBLIC_BASE_URL="https://vidfarm.cc"
|
|
12
|
+
|
|
13
|
+
## Provision A User
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -X POST "$PUBLIC_BASE_URL/api/v1/admin/auth/provision-user-account" \
|
|
17
|
+
-H "content-type: application/json" \
|
|
18
|
+
-H "x-superagency-key: 24084dsafjl428042454" \
|
|
19
|
+
--data '{
|
|
20
|
+
"email": "newuser@example.com",
|
|
21
|
+
"password": "StrongPassword123",
|
|
22
|
+
"name": "New User"
|
|
23
|
+
}'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Expected Response
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"customer": {
|
|
31
|
+
"id": "cus_01jvexample",
|
|
32
|
+
"email": "newuser@example.com",
|
|
33
|
+
"name": "New User",
|
|
34
|
+
"defaultWebhookUrl": null,
|
|
35
|
+
"isDeveloper": false,
|
|
36
|
+
"isPaidPlan": true,
|
|
37
|
+
"about": null,
|
|
38
|
+
"groupchatUrl": null,
|
|
39
|
+
"flockposterApiKey": null
|
|
40
|
+
},
|
|
41
|
+
"credentials": {
|
|
42
|
+
"email": "newuser@example.com",
|
|
43
|
+
"password": "StrongPassword123",
|
|
44
|
+
"api_key": "vf_key_01jvexample"
|
|
45
|
+
},
|
|
46
|
+
"action": "created"
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
If the email already exists, the same route returns `200` with `"action": "updated"`.
|
|
51
|
+
|
|
52
|
+
## Demo Account
|
|
53
|
+
|
|
54
|
+
Email: demo@vidfarm.cc
|
|
55
|
+
Password: VidfarmDemo-4102ff1f64be
|
|
56
|
+
|
|
57
|
+
## Filming Demo
|
|
58
|
+
|
|
59
|
+
## Filming VidFarm Tutorial
|
|
60
|
+
|
|
61
|
+
1. Explain VidFarm & how its Agentic Viral Content Creation (with built-in AI chat or Claude Code/Codex). built for marketing agencies to create content for their clients.
|
|
62
|
+
show /discover tab and how its always adding more viral templates
|
|
63
|
+
|
|
64
|
+
Login:
|
|
65
|
+
Email: demo@vidfarm.cc
|
|
66
|
+
Password: VidfarmDemo-4102ff1f64be
|
|
67
|
+
|
|
68
|
+
2. Setup AI API Key --> bring your own API key is great because it saves you money
|
|
69
|
+
3. Setup Flockposter --> 3rd party tool to automate posting
|
|
70
|
+
4. Establish Profile Settings --> save info about your company, upload logo
|
|
71
|
+
|
|
72
|
+
SuperLungs - Lung recovery & strengthening app for athletes & smokers
|
|
73
|
+
Practicing Winhoff Breathing Exercises
|
|
74
|
+
|
|
75
|
+
5. Demo templates:
|
|
76
|
+
|
|
77
|
+
vidfarm_template_funnychat --> mention how AI cant reliably do this, this is actually a video template. then bulk create 3 pieces of content
|
|
78
|
+
|
|
79
|
+
shock_reaction_question --> upload mp4 app demo
|
|
80
|
+
|
|
81
|
+
videogame_prizebox --> show inpaint editor, then bulk create content, slideshows
|
|
82
|
+
|
|
83
|
+
6. Approve post, share preview --> make sure you also mention we want to put captions and title and pinned comment. also show off the different features like download zip or editor, toggle video/slides
|
|
84
|
+
7. Schedule post --> show email channels, show flockposter channels
|
|
85
|
+
|
|
86
|
+
8. Show /calendar tab
|
|
87
|
+
9. Show /library tab --> can talk to AI to bulk schedule
|
|
88
|
+
10. Show /job-runs tab --> explain tracers
|
|
89
|
+
11. Show /settings wallet tab --> explain how this is way cheaper than any option out there
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# vidfarm_template_0000
|
|
2
|
+
|
|
3
|
+
Standalone GitHub-distributable package for the Vidfarm `template_0000` starter template.
|
|
4
|
+
|
|
5
|
+
This package exists to give third-party developers a concrete example of the Vidfarm template contract.
|
|
6
|
+
|
|
7
|
+
Developers should treat this repo as an authoring and review unit.
|
|
8
|
+
The canonical template implementation lives in `src/template.ts`; the build emits `src/template.js` for runtime loading.
|
|
9
|
+
|
|
10
|
+
When a template is ready, it is handed off for Vidfarm admin review and approval before it becomes available on the hosted platform.
|
|
11
|
+
|
|
12
|
+
Every new template should keep its source-format research checked in:
|
|
13
|
+
|
|
14
|
+
- `research/source_notes.md` for notes on the original winning format
|
|
15
|
+
- `research/preview/` for the screenshots or source video the DNA analyzers inspect
|
|
16
|
+
- `src/template-dna.ts` for the generated viral and visual DNA that feed the published template metadata
|
|
17
|
+
|
|
18
|
+
Production integration settings are checked into `template.config.json`. AI agents and developers should treat that file as the source of truth for:
|
|
19
|
+
|
|
20
|
+
- project identity
|
|
21
|
+
- `template_id` as the self-issued UUIDv4 platform identifier
|
|
22
|
+
- `slug_id` as the human-readable stable slug
|
|
23
|
+
- the template module path, which should be the TypeScript source entrypoint `src/template.ts`
|
|
24
|
+
- the local Remotion composition settings used by the starter template
|
|
25
|
+
|
|
26
|
+
## Required template contract
|
|
27
|
+
|
|
28
|
+
Every new template copied from `template_0000` should keep the current required `defineTemplate(...)` contract intact.
|
|
29
|
+
|
|
30
|
+
- `id`, `slugId`, and `version`
|
|
31
|
+
- `about.title` and `about.description`
|
|
32
|
+
- `about.viral_dna`, `about.visual_dna`, `about.preview_media`, and `about.link_to_original`
|
|
33
|
+
- `about.links_to_inspiration`, as a string array of source/inspiration URLs
|
|
34
|
+
- `about.sound`, with `sound_title` and `sound_url`
|
|
35
|
+
- `about.proposal_generator`, which teaches a director or agent how to turn business context into template-native post proposals
|
|
36
|
+
- `about.skeleton_prompt`, which gives directors and agents a template-native fill-in-the-blanks prompt scaffold
|
|
37
|
+
- `about.sample_prompts`, which shows multiple concrete high-signal prompts for the template
|
|
38
|
+
- `configSchema`
|
|
39
|
+
- at least one operation with a `smokeTestPayload`
|
|
40
|
+
- a matching workflow implementation in `jobs`
|
|
41
|
+
- a template-local `SKILL.md`
|
|
42
|
+
|
|
43
|
+
The starter already ships with example `proposal_generator`, `skeleton_prompt`, and `sample_prompts` values in `src/template.ts`. When you adapt this template, replace them with instructions and examples that fit the new format instead of leaving the starter language in place.
|
|
44
|
+
|
|
45
|
+
## Included
|
|
46
|
+
|
|
47
|
+
- `SKILL.md` for customer AI-agent usage
|
|
48
|
+
- `src/template.ts` for the Vidfarm platform contract
|
|
49
|
+
- `src/remotion/*` for local video rendering
|
|
50
|
+
- `src/lib/images.ts` for non-cropping portrait normalization
|
|
51
|
+
- `composition.json` sample props for local render tests
|
|
52
|
+
|
|
53
|
+
## Template behavior
|
|
54
|
+
|
|
55
|
+
`template_0000` is intentionally opinionated because later templates will likely start from it.
|
|
56
|
+
|
|
57
|
+
- stage 1 operation: `create_slideshow`
|
|
58
|
+
- stage 2 operation: `render_video`
|
|
59
|
+
- `create_slideshow` accepts either legacy `[imagePrompt, caption]` or `[imagePrompt, caption, durationMs]` slide tuples, or structured slide objects with optional `image_prompt_attachments` and `duration_ms`
|
|
60
|
+
- `create_slideshow` also accepts optional `meta_details_prompt` guidance and returns generated `title`, `description`, `pinned_comment`, `location`, and `song` metadata plus the normalized metadata input args
|
|
61
|
+
- slide generation is strict 9:16 with TikTok-safe reserved UI zones
|
|
62
|
+
- finished slide images already include the text overlay
|
|
63
|
+
- the video stage only accepts explicit `slides` input and sequences those finished slide images using per-slide `durationMs`
|
|
64
|
+
- caption placement is center-biased and image-aware, using provider layout analysis first with a local fallback
|
|
65
|
+
- caption styling defaults to the platform caption standard in `src/style-options.ts`, including TikTok Sans SemiBold, Montserrat SemiBold, Source Code Pro Bold, Yesteryear, Georgia-style Bold, Abel, and the canonical TikTok text background colors
|
|
66
|
+
- custom caption styling is supported with `captionFont: "custom"` plus custom font/color config fields when the user intentionally wants text outside the standard
|
|
67
|
+
|
|
68
|
+
The starter is optimized to:
|
|
69
|
+
|
|
70
|
+
- avoid subject cut-off during portrait normalization
|
|
71
|
+
- keep the right-side TikTok action rail clear
|
|
72
|
+
- keep the top tabs area clear
|
|
73
|
+
- keep the bottom caption/audio area clear
|
|
74
|
+
- avoid fake full-width caption panels; if a text background is used, it renders as a tight line chip behind the words only
|
|
75
|
+
- avoid web-style caption shadows; native white captions use centered black halo layers around the glyphs, not a heavy downward/rightward drop shadow
|
|
76
|
+
|
|
77
|
+
## Install
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm install
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Validate
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm run check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Analyze Template DNA
|
|
90
|
+
|
|
91
|
+
After you add source notes and preview media, run:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
vidfarm analyze-viral-dna --template-dir .
|
|
95
|
+
vidfarm analyze-visual-dna --template-dir .
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
If you scaffold a template with `vidfarm generate-template` and provide `--source-preview-dir`, the CLI will run both analyzers automatically unless `--skip-dna-analysis` is set.
|
|
99
|
+
|
|
100
|
+
After DNA analysis, review and customize the remaining human-authored metadata before calling the template ready:
|
|
101
|
+
|
|
102
|
+
- refresh `about.proposal_generator`
|
|
103
|
+
- refresh `about.skeleton_prompt`
|
|
104
|
+
- refresh `about.sample_prompts`
|
|
105
|
+
- update `SKILL.md` to match the actual operations and payload shapes
|
|
106
|
+
- run `vidfarm validate-template --template-id <slug-or-id>` and at least one real local job
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Template 0000 Skill
|
|
2
|
+
|
|
3
|
+
Use this template when the customer wants a fast vertical slideshow for TikTok-style distribution, built from a short list of scene prompts and exact overlay text.
|
|
4
|
+
|
|
5
|
+
Operational rule:
|
|
6
|
+
|
|
7
|
+
- template developers author and test this template locally
|
|
8
|
+
- the hosted platform later runs the approved template behind the standard Vidfarm API wrapper
|
|
9
|
+
- a Vidfarm admin reviews and approves the template before it is made available in production
|
|
10
|
+
|
|
11
|
+
Inputs:
|
|
12
|
+
|
|
13
|
+
- `slides`: either ordered tuples like `[imagePrompt, overlayText]` or `[imagePrompt, overlayText, durationMs]`, or objects like `{ image_prompt, image_prompt_attachments, caption, duration_ms }`
|
|
14
|
+
- `image_prompt_attachments`: optional public media URLs used as visual reference attachments during image generation
|
|
15
|
+
- `meta_details_prompt`: optional guidance for generated title, description, pinned comment, location, and song metadata
|
|
16
|
+
|
|
17
|
+
Behavior:
|
|
18
|
+
|
|
19
|
+
- `create_slideshow` generates exact 9:16 images, preserves the exact overlay text, and outputs finished slide frames plus a manifest
|
|
20
|
+
- `render_video` turns explicit finished slide frames into an auto-advancing vertical MP4
|
|
21
|
+
- when chaining operations, pass `result.renderVideoInput` from `create_slideshow` into `render_video` without re-encoding or HTML-escaping the slide URLs
|
|
22
|
+
- reserves space for TikTok UI chrome at the top, right edge, and bottom caption area
|
|
23
|
+
- keeps subjects away from edge crops and avoids cutting off faces, pets, hands, and products
|
|
24
|
+
- prefers centered native-caption placement using image analysis first, with local fallback scoring
|
|
25
|
+
- never uses a full paragraph wash behind captions; when enabled, text backgrounds render as tight chips around the words
|
|
26
|
+
- renders colored text backgrounds as per-line inline highlight chips measured from each wrapped line's glyph bounds, not from the caption block width
|
|
27
|
+
- renders native white caption contrast as a radial black halo/outline around the full multiline text block, not as a large one-direction web drop shadow
|
|
28
|
+
- restricts caption fonts and text background colors to the platform caption standard in `src/style-options.ts`
|
|
29
|
+
|
|
30
|
+
AI dependency contract for agents:
|
|
31
|
+
|
|
32
|
+
- the current Vidfarm template standard does not have a first-class `dependencies` field, so this section is the authoritative dependency declaration for this template
|
|
33
|
+
- `defaultProvider`, `textModel`, and `imageModel` are config values, not a validated provider-model matrix
|
|
34
|
+
- agents should keep provider and model choices inside the combinations listed below unless they are intentionally extending runtime support
|
|
35
|
+
|
|
36
|
+
Documented provider-model combinations for this template:
|
|
37
|
+
|
|
38
|
+
- `openai`
|
|
39
|
+
models:
|
|
40
|
+
`image`: `gpt-image-1`, `gpt-image-2`
|
|
41
|
+
`text` and `layout_analysis`: `gpt-5.4`
|
|
42
|
+
planned but not wired here: `sora-2`
|
|
43
|
+
- `gemini`
|
|
44
|
+
models:
|
|
45
|
+
`image`: `gemini-3.1-flash-image-preview`, `gemini-2.5-flash-image`
|
|
46
|
+
`text` and `layout_analysis`: `gemini-3.1-flash-lite`, `gemini-2.5-flash-lite`
|
|
47
|
+
planned but not wired here: `veo-3.0-generate-001`
|
|
48
|
+
- `openrouter`
|
|
49
|
+
models:
|
|
50
|
+
`text` and `layout_analysis`: `qwen/qwen3.6-flash`
|
|
51
|
+
aspirational image models: `bytedance/seedance-2.0`, `bytedance-seed/seedream-4.5`
|
|
52
|
+
|
|
53
|
+
Runtime caveats:
|
|
54
|
+
|
|
55
|
+
- `openrouter` text and layout-analysis calls work through the OpenRouter chat-completions path
|
|
56
|
+
- `openrouter` image generation is not a first-class adapter path in the current runtime, so do not assume `seedance-2.0` or `seedream-4.5` will work end to end without provider-runtime changes
|
|
57
|
+
- OpenAI image generation in the current runtime does not support `image_prompt_attachments`; Gemini is the safest path when reference-image attachments matter
|
|
58
|
+
- OpenAI image generation does not expose an exact native `9:16` output size in the current API. For `template_0000`, use portrait output plus explicit `9:16` framing instructions, then preserve composition with contain-plus-blur normalization instead of crop-zooming.
|
|
59
|
+
- this template does not expose a video-generation operation, so `sora-2` and `veo-3.0-generate-001` are documented here for future dependency planning only
|
|
60
|
+
|
|
61
|
+
Allowed caption fonts:
|
|
62
|
+
|
|
63
|
+
- `tiktok_sans_semibold`
|
|
64
|
+
- `montserrat_semibold`
|
|
65
|
+
- `source_code_pro_bold`
|
|
66
|
+
- `georgia_bold`
|
|
67
|
+
- `abel`
|
|
68
|
+
- `yesteryear`
|
|
69
|
+
- `custom`
|
|
70
|
+
- legacy alias: `montserrat`
|
|
71
|
+
- legacy alias: `source_code_pro`
|
|
72
|
+
|
|
73
|
+
Caption font labels:
|
|
74
|
+
|
|
75
|
+
- TikTok Sans SemiBold
|
|
76
|
+
- Montserrat SemiBold
|
|
77
|
+
- Source Code Pro Bold
|
|
78
|
+
- Yesteryear
|
|
79
|
+
- Georgia-style Bold, bundled as Libre Baskerville
|
|
80
|
+
- Abel
|
|
81
|
+
- Custom, using `customCaptionFontFamily`, optional `customCaptionFontWeight`, and optional `customCaptionFontAssetPath`
|
|
82
|
+
|
|
83
|
+
Deprecated starter-only font IDs:
|
|
84
|
+
|
|
85
|
+
- `source_code_pro`
|
|
86
|
+
- `montserrat`
|
|
87
|
+
- `dm_serif_display`
|
|
88
|
+
|
|
89
|
+
Allowed text background colors:
|
|
90
|
+
|
|
91
|
+
- `none`
|
|
92
|
+
- `black`
|
|
93
|
+
- `red`
|
|
94
|
+
- `orange`
|
|
95
|
+
- `yellow`
|
|
96
|
+
- `lime_green`
|
|
97
|
+
- `teal`
|
|
98
|
+
- `light_blue`
|
|
99
|
+
- `dark_blue`
|
|
100
|
+
- `violet`
|
|
101
|
+
- `pink`
|
|
102
|
+
- `brown`
|
|
103
|
+
- `dark_green`
|
|
104
|
+
- `blue_gray`
|
|
105
|
+
- `light_gray`
|
|
106
|
+
- `dark_gray`
|
|
107
|
+
|
|
108
|
+
Typical routes for this template:
|
|
109
|
+
|
|
110
|
+
- `GET /templates/template_0000`
|
|
111
|
+
- `GET /templates/template_0000/skill`
|
|
112
|
+
- `POST /templates/template_0000/config`
|
|
113
|
+
- `POST /templates/template_0000/operations/create_slideshow`
|
|
114
|
+
- `POST /templates/template_0000/operations/render_video`
|
|
115
|
+
- `GET /templates/template_0000/jobs`
|
|
116
|
+
- `GET /templates/template_0000/jobs/:jobId`
|
|
117
|
+
- `GET /templates/template_0000/jobs/:jobId/logs`
|
|
118
|
+
- `POST /templates/template_0000/jobs/:jobId/cancel`
|
|
119
|
+
|
|
120
|
+
Shared shell variables:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
BASE_URL="http://localhost:3000"
|
|
124
|
+
VIDFARM_USER_ID="replace-me"
|
|
125
|
+
VIDFARM_API_KEY="replace-me"
|
|
126
|
+
COMMON_HEADERS=(
|
|
127
|
+
-H "vidfarm-user-id: ${VIDFARM_USER_ID}"
|
|
128
|
+
-H "vidfarm-api-key: ${VIDFARM_API_KEY}"
|
|
129
|
+
)
|
|
130
|
+
JSON_HEADERS=(
|
|
131
|
+
"${COMMON_HEADERS[@]}"
|
|
132
|
+
-H "content-type: application/json"
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Get template metadata:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
curl "${BASE_URL}/templates/template_0000" \
|
|
140
|
+
"${COMMON_HEADERS[@]}"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
The metadata response includes free-form `price_lines`. For actual billed numbers, read the job status response, which returns totals under `billing`.
|
|
144
|
+
|
|
145
|
+
Get the published `SKILL.md` URL contents:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
curl "${BASE_URL}/templates/template_0000/skill" \
|
|
149
|
+
"${COMMON_HEADERS[@]}"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Save template config:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
curl -X POST "${BASE_URL}/templates/template_0000/config" \
|
|
156
|
+
"${JSON_HEADERS[@]}" \
|
|
157
|
+
-d '{
|
|
158
|
+
"config": {
|
|
159
|
+
"defaultProvider": "openrouter",
|
|
160
|
+
"textModel": "openai/gpt-4.1-mini",
|
|
161
|
+
"imageModel": "bytedance-seed/seedream-4.5",
|
|
162
|
+
"captionFont": "tiktok_sans_semibold",
|
|
163
|
+
"captionBackgroundColor": "none",
|
|
164
|
+
"renderCompositionId": "template-0000"
|
|
165
|
+
}
|
|
166
|
+
}'
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Custom caption styling:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"config": {
|
|
174
|
+
"captionFont": "custom",
|
|
175
|
+
"customCaptionFontFamily": "My Brand Font",
|
|
176
|
+
"customCaptionFontWeight": 700,
|
|
177
|
+
"customCaptionFontAssetPath": "assets/MyBrandFont-Bold.ttf",
|
|
178
|
+
"customCaptionTextColorHex": "#F7D7E9",
|
|
179
|
+
"customCaptionBackgroundColorHex": "#000000"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Use custom caption styling only when the user intentionally wants text outside the platform caption standard. Prefer bundled template assets for `customCaptionFontAssetPath`; if no asset path is provided or found, rendering falls back to the runtime text renderer for the declared family.
|
|
185
|
+
|
|
186
|
+
Create a slideshow:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
curl -X POST "${BASE_URL}/templates/template_0000/operations/create_slideshow" \
|
|
190
|
+
"${JSON_HEADERS[@]}" \
|
|
191
|
+
-d '{
|
|
192
|
+
"tracer": "launch-story-001",
|
|
193
|
+
"payload": {
|
|
194
|
+
"slides": [
|
|
195
|
+
["late night founder at laptop", "launching after hours", 2200],
|
|
196
|
+
{
|
|
197
|
+
"image_prompt": "skincare serum bottle on a clean bathroom counter near a window",
|
|
198
|
+
"caption": "the routine was simpler than i thought",
|
|
199
|
+
"duration_ms": 2800
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"meta_details_prompt": "Write native TikTok metadata for a US audience. Keep it curiosity-driven and casual."
|
|
203
|
+
}
|
|
204
|
+
}'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Render the final video:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
curl -X POST "${BASE_URL}/templates/template_0000/operations/render_video" \
|
|
211
|
+
"${JSON_HEADERS[@]}" \
|
|
212
|
+
-d '{
|
|
213
|
+
"tracer": "launch-story-001-render",
|
|
214
|
+
"payload": {
|
|
215
|
+
"slides": [
|
|
216
|
+
{
|
|
217
|
+
"imageUrl": "https://example.com/slide-1.png",
|
|
218
|
+
"durationMs": 2200
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"imageUrl": "https://example.com/slide-2.png",
|
|
222
|
+
"durationMs": 2800
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
List jobs for this template:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
curl "${BASE_URL}/templates/template_0000/jobs" \
|
|
233
|
+
"${COMMON_HEADERS[@]}"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
List jobs filtered by tracer and date range:
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
curl "${BASE_URL}/templates/template_0000/jobs?tracer=launch-story-001&start_time=2026-05-17T00:00:00.000Z&end_time=2026-05-18T00:00:00.000Z&limit=20" \
|
|
240
|
+
"${COMMON_HEADERS[@]}"
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Get one job:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
JOB_ID="job_replace_me"
|
|
247
|
+
|
|
248
|
+
curl "${BASE_URL}/templates/template_0000/jobs/${JOB_ID}" \
|
|
249
|
+
"${COMMON_HEADERS[@]}"
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Get one job's logs:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
curl "${BASE_URL}/templates/template_0000/jobs/${JOB_ID}/logs?start_time=2026-05-17T00:00:00.000Z&end_time=2026-05-18T00:00:00.000Z&limit=200" \
|
|
256
|
+
"${COMMON_HEADERS[@]}"
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Cancel one job:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
curl -X POST "${BASE_URL}/templates/template_0000/jobs/${JOB_ID}/cancel" \
|
|
263
|
+
"${COMMON_HEADERS[@]}"
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Use this template for short-form product explainers, founder clips, launch teasers, and simple storyboarding workflows where speed matters more than deep custom motion design.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slides": [
|
|
3
|
+
{
|
|
4
|
+
"imageUrl": "https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1080&q=80"
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
"imageUrl": "https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?auto=format&fit=crop&w=1080&q=80"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"secondsPerSlide": 2
|
|
11
|
+
}
|