@telepat/rilo 0.1.0

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.
Files changed (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +209 -0
  3. package/index.js +1 -0
  4. package/models/black-forest-labs__flux-2-pro.json +78 -0
  5. package/models/black-forest-labs__flux-schnell.json +95 -0
  6. package/models/bytedance__seedream-4.json +71 -0
  7. package/models/deepseek-ai__deepseek-v3.json +61 -0
  8. package/models/google__nano-banana-pro.json +92 -0
  9. package/models/google__veo-3.1-fast.json +93 -0
  10. package/models/google__veo-3.1.json +93 -0
  11. package/models/jaaari__kokoro-82m.json +86 -0
  12. package/models/kwaivgi__kling-v3-video.json +101 -0
  13. package/models/minimax__speech-02-turbo.json +141 -0
  14. package/models/pixverse__pixverse-v5.6.json +113 -0
  15. package/models/prunaai__z-image-turbo.json +107 -0
  16. package/models/resemble-ai__chatterbox-turbo.json +102 -0
  17. package/models/wan-video__wan-2.2-i2v-fast.json +139 -0
  18. package/package.json +67 -0
  19. package/src/api/firebaseFunction.js +46 -0
  20. package/src/api/middleware/auth.js +70 -0
  21. package/src/api/openapi/generateOpenApi.js +21 -0
  22. package/src/api/openapi/spec.js +831 -0
  23. package/src/api/routes/jobs.js +45 -0
  24. package/src/api/routes/projectAssets.js +63 -0
  25. package/src/api/routes/projects.js +647 -0
  26. package/src/api/routes/webhooks.js +13 -0
  27. package/src/api/server.js +88 -0
  28. package/src/backends/firebaseClient.js +57 -0
  29. package/src/backends/outputBackend.js +186 -0
  30. package/src/backends/projectMetadataBackend.js +550 -0
  31. package/src/cli/commands/openHome.js +70 -0
  32. package/src/cli/commands/settingsFlow.js +196 -0
  33. package/src/cli/index.js +192 -0
  34. package/src/config/env.js +158 -0
  35. package/src/config/keystore.js +175 -0
  36. package/src/config/models.js +281 -0
  37. package/src/config/settingsSchema.js +214 -0
  38. package/src/media/ffmpeg.js +144 -0
  39. package/src/media/files.js +77 -0
  40. package/src/media/subtitles.js +444 -0
  41. package/src/observability/apiTrace.js +17 -0
  42. package/src/observability/logger.js +7 -0
  43. package/src/observability/metrics.js +10 -0
  44. package/src/pipeline/inputSanitizer.js +6 -0
  45. package/src/pipeline/orchestrator.js +1669 -0
  46. package/src/policy/contentGuardrails.js +30 -0
  47. package/src/providers/predictions.js +188 -0
  48. package/src/providers/replicateClient.js +12 -0
  49. package/src/steps/alignSubtitles.js +156 -0
  50. package/src/steps/burnInSubtitles.js +22 -0
  51. package/src/steps/composeFinalVideo.js +57 -0
  52. package/src/steps/generateKeyframes.js +70 -0
  53. package/src/steps/generateVideoSegments.js +95 -0
  54. package/src/steps/generateVoiceover.js +128 -0
  55. package/src/steps/imageToVideoAdapters.js +100 -0
  56. package/src/steps/script.js +177 -0
  57. package/src/steps/textToImageAdapters.js +87 -0
  58. package/src/store/assetStore.js +5 -0
  59. package/src/store/jobStore.js +102 -0
  60. package/src/store/projectAnalyticsStore.js +625 -0
  61. package/src/store/projectStore.js +684 -0
  62. package/src/store/settingsStore.js +155 -0
  63. package/src/store/staleAssetStore.js +63 -0
  64. package/src/types/job.js +28 -0
  65. package/src/types/media.js +28 -0
  66. package/src/worker/processor.js +24 -0
@@ -0,0 +1,93 @@
1
+ {
2
+ "modelId": "google/veo-3.1-fast",
3
+ "provider": "replicate",
4
+ "displayName": "Veo 3.1 Fast",
5
+ "category": "video-generation",
6
+ "pricingSourceUrl": "https://replicate.com/google/veo-3.1-fast",
7
+ "pricingNotes": "Replicate pricing depends on native audio. without_audio=$0.10/s, with_audio=$0.15/s. Current pipeline keeps audio disabled.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": null,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "pricingRules": {
14
+ "basis": "output_video",
15
+ "assumptions": {
16
+ "defaultDurationSec": 5
17
+ },
18
+ "tiers": [
19
+ {
20
+ "generateAudio": false,
21
+ "usdPerSecond": 0.1
22
+ },
23
+ {
24
+ "generateAudio": true,
25
+ "usdPerSecond": 0.15
26
+ }
27
+ ]
28
+ },
29
+ "inputOptions": {
30
+ "userConfigurable": [
31
+ "resolution",
32
+ "negative_prompt",
33
+ "seed"
34
+ ],
35
+ "pipelineManaged": [
36
+ "prompt",
37
+ "image",
38
+ "last_frame",
39
+ "duration",
40
+ "aspect_ratio",
41
+ "generate_audio"
42
+ ],
43
+ "fields": {
44
+ "resolution": {
45
+ "type": "string",
46
+ "default": "1080p",
47
+ "enum": [
48
+ "720p",
49
+ "1080p"
50
+ ]
51
+ },
52
+ "negative_prompt": {
53
+ "type": "string",
54
+ "nullable": true
55
+ },
56
+ "seed": {
57
+ "type": "integer",
58
+ "nullable": true
59
+ },
60
+ "prompt": {
61
+ "type": "string",
62
+ "required": true
63
+ },
64
+ "image": {
65
+ "type": "string",
66
+ "required": true
67
+ },
68
+ "last_frame": {
69
+ "type": "string",
70
+ "required": true
71
+ },
72
+ "duration": {
73
+ "type": "integer",
74
+ "required": true,
75
+ "default": 5,
76
+ "minimum": 4,
77
+ "maximum": 8
78
+ },
79
+ "aspect_ratio": {
80
+ "type": "string",
81
+ "required": true,
82
+ "enum": [
83
+ "16:9",
84
+ "9:16"
85
+ ]
86
+ },
87
+ "generate_audio": {
88
+ "type": "boolean",
89
+ "default": false
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "modelId": "google/veo-3.1",
3
+ "provider": "replicate",
4
+ "displayName": "Veo 3.1",
5
+ "category": "video-generation",
6
+ "pricingSourceUrl": "https://replicate.com/google/veo-3.1",
7
+ "pricingNotes": "Replicate pricing depends on native audio. without_audio=$0.20/s, with_audio=$0.40/s. Current pipeline keeps audio disabled.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": null,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "pricingRules": {
14
+ "basis": "output_video",
15
+ "assumptions": {
16
+ "defaultDurationSec": 5
17
+ },
18
+ "tiers": [
19
+ {
20
+ "generateAudio": false,
21
+ "usdPerSecond": 0.2
22
+ },
23
+ {
24
+ "generateAudio": true,
25
+ "usdPerSecond": 0.4
26
+ }
27
+ ]
28
+ },
29
+ "inputOptions": {
30
+ "userConfigurable": [
31
+ "resolution",
32
+ "negative_prompt",
33
+ "seed"
34
+ ],
35
+ "pipelineManaged": [
36
+ "prompt",
37
+ "image",
38
+ "last_frame",
39
+ "duration",
40
+ "aspect_ratio",
41
+ "generate_audio"
42
+ ],
43
+ "fields": {
44
+ "resolution": {
45
+ "type": "string",
46
+ "default": "1080p",
47
+ "enum": [
48
+ "720p",
49
+ "1080p"
50
+ ]
51
+ },
52
+ "negative_prompt": {
53
+ "type": "string",
54
+ "nullable": true
55
+ },
56
+ "seed": {
57
+ "type": "integer",
58
+ "nullable": true
59
+ },
60
+ "prompt": {
61
+ "type": "string",
62
+ "required": true
63
+ },
64
+ "image": {
65
+ "type": "string",
66
+ "required": true
67
+ },
68
+ "last_frame": {
69
+ "type": "string",
70
+ "required": true
71
+ },
72
+ "duration": {
73
+ "type": "integer",
74
+ "required": true,
75
+ "default": 5,
76
+ "minimum": 4,
77
+ "maximum": 8
78
+ },
79
+ "aspect_ratio": {
80
+ "type": "string",
81
+ "required": true,
82
+ "enum": [
83
+ "16:9",
84
+ "9:16"
85
+ ]
86
+ },
87
+ "generate_audio": {
88
+ "type": "boolean",
89
+ "default": false
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "modelId": "jaaari/kokoro-82m",
3
+ "provider": "replicate",
4
+ "displayName": "Kokoro 82M",
5
+ "category": "text-to-speech",
6
+ "pricingSourceUrl": "https://replicate.com/jaaari/kokoro-82m",
7
+ "pricingNotes": "Replicate lists this model as approximately $0.00022 per run; runtime depends on input length.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": null,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "inputOptions": {
14
+ "userConfigurable": [
15
+ "voice",
16
+ "speed"
17
+ ],
18
+ "pipelineManaged": [
19
+ "text"
20
+ ],
21
+ "fields": {
22
+ "voice": {
23
+ "type": "string",
24
+ "default": "af_bella",
25
+ "enum": [
26
+ "af_alloy",
27
+ "af_aoede",
28
+ "af_bella",
29
+ "af_jessica",
30
+ "af_kore",
31
+ "af_nicole",
32
+ "af_nova",
33
+ "af_river",
34
+ "af_sarah",
35
+ "af_sky",
36
+ "am_adam",
37
+ "am_echo",
38
+ "am_eric",
39
+ "am_fenrir",
40
+ "am_liam",
41
+ "am_michael",
42
+ "am_onyx",
43
+ "am_puck",
44
+ "bf_alice",
45
+ "bf_emma",
46
+ "bf_isabella",
47
+ "bf_lily",
48
+ "bm_daniel",
49
+ "bm_fable",
50
+ "bm_george",
51
+ "bm_lewis",
52
+ "ff_siwis",
53
+ "hf_alpha",
54
+ "hf_beta",
55
+ "hm_omega",
56
+ "hm_psi",
57
+ "if_sara",
58
+ "im_nicola",
59
+ "jf_alpha",
60
+ "jf_gongitsune",
61
+ "jf_nezumi",
62
+ "jf_tebukuro",
63
+ "jm_kumo",
64
+ "zf_xiaobei",
65
+ "zf_xiaoni",
66
+ "zf_xiaoxiao",
67
+ "zf_xiaoyi",
68
+ "zm_yunjian",
69
+ "zm_yunxi",
70
+ "zm_yunxia",
71
+ "zm_yunyang"
72
+ ]
73
+ },
74
+ "speed": {
75
+ "type": "number",
76
+ "default": 1,
77
+ "minimum": 0.1,
78
+ "maximum": 5
79
+ },
80
+ "text": {
81
+ "type": "string",
82
+ "required": true
83
+ }
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "modelId": "kwaivgi/kling-v3-video",
3
+ "provider": "replicate",
4
+ "displayName": "Kling Video 3.0",
5
+ "category": "video-generation",
6
+ "pricingSourceUrl": "https://replicate.com/kwaivgi/kling-v3-video",
7
+ "pricingNotes": "Replicate pricing depends on mode and native audio. standard=$0.168/s, standard+audio=$0.252/s, pro=$0.224/s, pro+audio=$0.336/s.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": null,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "pricingRules": {
14
+ "basis": "output_video",
15
+ "assumptions": {
16
+ "defaultDurationSec": 5
17
+ },
18
+ "tiers": [
19
+ {
20
+ "mode": "standard",
21
+ "generateAudio": false,
22
+ "usdPerSecond": 0.168
23
+ },
24
+ {
25
+ "mode": "standard",
26
+ "generateAudio": true,
27
+ "usdPerSecond": 0.252
28
+ },
29
+ {
30
+ "mode": "pro",
31
+ "generateAudio": false,
32
+ "usdPerSecond": 0.224
33
+ },
34
+ {
35
+ "mode": "pro",
36
+ "generateAudio": true,
37
+ "usdPerSecond": 0.336
38
+ }
39
+ ]
40
+ },
41
+ "inputOptions": {
42
+ "userConfigurable": [
43
+ "negative_prompt",
44
+ "mode",
45
+ "generate_audio"
46
+ ],
47
+ "pipelineManaged": [
48
+ "prompt",
49
+ "start_image",
50
+ "end_image",
51
+ "duration",
52
+ "aspect_ratio"
53
+ ],
54
+ "fields": {
55
+ "negative_prompt": {
56
+ "type": "string",
57
+ "nullable": true
58
+ },
59
+ "mode": {
60
+ "type": "string",
61
+ "default": "pro",
62
+ "enum": [
63
+ "standard",
64
+ "pro"
65
+ ]
66
+ },
67
+ "generate_audio": {
68
+ "type": "boolean",
69
+ "default": false
70
+ },
71
+ "prompt": {
72
+ "type": "string",
73
+ "required": true
74
+ },
75
+ "start_image": {
76
+ "type": "string",
77
+ "required": true
78
+ },
79
+ "end_image": {
80
+ "type": "string",
81
+ "required": true
82
+ },
83
+ "duration": {
84
+ "type": "integer",
85
+ "required": true,
86
+ "default": 5,
87
+ "minimum": 3,
88
+ "maximum": 15
89
+ },
90
+ "aspect_ratio": {
91
+ "type": "string",
92
+ "required": true,
93
+ "enum": [
94
+ "1:1",
95
+ "16:9",
96
+ "9:16"
97
+ ]
98
+ }
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,141 @@
1
+ {
2
+ "modelId": "minimax/speech-02-turbo",
3
+ "provider": "replicate",
4
+ "displayName": "Minimax Speech 02 Turbo",
5
+ "category": "text-to-speech",
6
+ "pricingSourceUrl": "https://replicate.com/minimax/speech-02-turbo",
7
+ "pricingNotes": "Replicate page lists $0.06 per thousand input tokens; output-token price is not shown.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": 0.06,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "inputOptions": {
14
+ "userConfigurable": [
15
+ "emotion",
16
+ "pitch",
17
+ "speed",
18
+ "volume",
19
+ "voice_id",
20
+ "audio_format",
21
+ "sample_rate",
22
+ "bitrate",
23
+ "channel",
24
+ "language_boost",
25
+ "subtitle_enable",
26
+ "english_normalization"
27
+ ],
28
+ "pipelineManaged": [
29
+ "text"
30
+ ],
31
+ "fields": {
32
+ "emotion": {
33
+ "type": "string",
34
+ "default": "auto",
35
+ "enum": [
36
+ "auto",
37
+ "neutral",
38
+ "happy",
39
+ "sad",
40
+ "angry",
41
+ "fearful",
42
+ "disgusted",
43
+ "surprised",
44
+ "calm",
45
+ "fluent"
46
+ ]
47
+ },
48
+ "pitch": {
49
+ "type": "integer",
50
+ "default": 0,
51
+ "minimum": -12,
52
+ "maximum": 12
53
+ },
54
+ "speed": {
55
+ "type": "number",
56
+ "default": 1,
57
+ "minimum": 0.5,
58
+ "maximum": 2
59
+ },
60
+ "volume": {
61
+ "type": "number",
62
+ "default": 1,
63
+ "minimum": 0,
64
+ "maximum": 10
65
+ },
66
+ "voice_id": {
67
+ "type": "string",
68
+ "default": "Wise_Woman",
69
+ "allowAnyString": true,
70
+ "recommendedValues": [
71
+ "Wise_Woman",
72
+ "Deep_Voice_Man",
73
+ "Imposing_Manner",
74
+ "Friendly_Person",
75
+ "Lively_Girl",
76
+ "Young_Knight"
77
+ ]
78
+ },
79
+ "audio_format": {
80
+ "type": "string",
81
+ "default": "mp3",
82
+ "enum": [
83
+ "mp3",
84
+ "wav",
85
+ "flac",
86
+ "pcm"
87
+ ]
88
+ },
89
+ "sample_rate": {
90
+ "type": "integer",
91
+ "default": 32000,
92
+ "minimum": 8000,
93
+ "maximum": 44100
94
+ },
95
+ "bitrate": {
96
+ "type": "integer",
97
+ "default": 128000,
98
+ "minimum": 32000,
99
+ "maximum": 256000
100
+ },
101
+ "channel": {
102
+ "type": "string",
103
+ "default": "mono",
104
+ "enum": [
105
+ "mono",
106
+ "stereo"
107
+ ]
108
+ },
109
+ "language_boost": {
110
+ "type": "string",
111
+ "default": "None",
112
+ "allowAnyString": true,
113
+ "recommendedValues": [
114
+ "None",
115
+ "Automatic",
116
+ "en",
117
+ "zh",
118
+ "ja",
119
+ "ko",
120
+ "es",
121
+ "fr",
122
+ "de",
123
+ "pt"
124
+ ]
125
+ },
126
+ "subtitle_enable": {
127
+ "type": "boolean",
128
+ "default": false
129
+ },
130
+ "english_normalization": {
131
+ "type": "boolean",
132
+ "default": false
133
+ },
134
+ "text": {
135
+ "type": "string",
136
+ "required": true,
137
+ "maxLength": 10000
138
+ }
139
+ }
140
+ }
141
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "modelId": "pixverse/pixverse-v5.6",
3
+ "provider": "replicate",
4
+ "displayName": "PixVerse v5.6",
5
+ "category": "video-generation",
6
+ "pricingSourceUrl": "https://replicate.com/pixverse/pixverse-v5.6",
7
+ "pricingNotes": "Replicate pricing by target quality: 360p=$0.07/s, 540p=$0.07/s, 720p=$0.09/s, 1080p=$0.15/s.",
8
+ "pricing": {
9
+ "usdPerSecond": null,
10
+ "usdPer1kInputTokens": null,
11
+ "usdPer1kOutputTokens": null
12
+ },
13
+ "pricingRules": {
14
+ "basis": "output_video",
15
+ "assumptions": {
16
+ "defaultDurationSec": 5
17
+ },
18
+ "tiers": [
19
+ {
20
+ "quality": "360p",
21
+ "usdPerSecond": 0.07
22
+ },
23
+ {
24
+ "quality": "540p",
25
+ "usdPerSecond": 0.07
26
+ },
27
+ {
28
+ "quality": "720p",
29
+ "usdPerSecond": 0.09
30
+ },
31
+ {
32
+ "quality": "1080p",
33
+ "usdPerSecond": 0.15
34
+ }
35
+ ]
36
+ },
37
+ "inputOptions": {
38
+ "userConfigurable": [
39
+ "quality",
40
+ "negative_prompt",
41
+ "seed",
42
+ "generate_audio_switch",
43
+ "thinking_type"
44
+ ],
45
+ "pipelineManaged": [
46
+ "prompt",
47
+ "image",
48
+ "last_frame_image",
49
+ "duration",
50
+ "aspect_ratio"
51
+ ],
52
+ "fields": {
53
+ "quality": {
54
+ "type": "string",
55
+ "default": "540p",
56
+ "enum": [
57
+ "360p",
58
+ "540p",
59
+ "720p",
60
+ "1080p"
61
+ ]
62
+ },
63
+ "negative_prompt": {
64
+ "type": "string",
65
+ "nullable": true
66
+ },
67
+ "seed": {
68
+ "type": "integer",
69
+ "nullable": true
70
+ },
71
+ "generate_audio_switch": {
72
+ "type": "boolean",
73
+ "default": false
74
+ },
75
+ "thinking_type": {
76
+ "type": "string",
77
+ "default": "auto",
78
+ "allowAnyString": true,
79
+ "recommendedValues": [
80
+ "auto"
81
+ ]
82
+ },
83
+ "prompt": {
84
+ "type": "string",
85
+ "required": true
86
+ },
87
+ "image": {
88
+ "type": "string",
89
+ "required": true
90
+ },
91
+ "last_frame_image": {
92
+ "type": "string",
93
+ "required": true
94
+ },
95
+ "duration": {
96
+ "type": "integer",
97
+ "required": true,
98
+ "default": 5,
99
+ "minimum": 5,
100
+ "maximum": 5
101
+ },
102
+ "aspect_ratio": {
103
+ "type": "string",
104
+ "required": true,
105
+ "enum": [
106
+ "1:1",
107
+ "16:9",
108
+ "9:16"
109
+ ]
110
+ }
111
+ }
112
+ }
113
+ }