aboutsummaryrefslogtreecommitdiff
path: root/castle-search/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'castle-search/README.md')
-rw-r--r--castle-search/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/castle-search/README.md b/castle-search/README.md
index cf15aa1..accdc24 100644
--- a/castle-search/README.md
+++ b/castle-search/README.md
@@ -85,6 +85,34 @@ again, once. It tries at most once every 30 minutes, never sends the password
twice in one try, and stops at any step it does not recognise, such as a
captcha, saying a person has to sign in. A sign-in takes about 6 s.
+### YouTube transcripts
+
+`POST /youtube-transcript` `{"url": "https://youtu.be/...", "language": "en"}`
+files a YouTube video's transcript as plain text in `CCS_TRANSCRIPT_DIR`, named
+`<upload date>-<Title-With-Dashes>.txt`, and returns it with the title,
+channel, upload date and length (`src/youtube.ts`). Captions only, never the
+video: human-written when the video has them, YouTube's automatic ones
+otherwise, with the rolling repeats of automatic captions taken out. A video
+filed before is read back from the folder. yt-dlp (`CCS_YTDLP`) updates
+itself at most daily, and again when a fetch fails; when YouTube rate-limits
+captions (HTTP 429), the text comes from youtube-transcript-api
+(`CCS_YT_PYTHON`) instead. `GET /youtube/openapi.json` describes it apart from
+X.com, as "YouTube". The recipe is Hermes's, from bambos.
+
+### Video clips
+
+`POST /video` `{"prompt": "...", "kind": "fast"}` has one of DeepInfra's video
+models make a clip and files the `.mp4` in `CCS_VIDEO_DIR`, named by the time
+and the prompt's first words (`src/video.ts`). `kind` picks the model:
+`fast` (FastWan 2.2 5B, 5 s, no sound, about $0.02; the default), `quality`
+(Wan 2.2 14B, 5 s, about $0.17), `long` (LTX 2.3 Fast, 6 to 20 s with sound,
+can start from `image_url`, $0.03 a second) and `sound` (Veo 3.1 Fast, 8 s,
+with realistic sound and speech, about $1.20). `orientation` is landscape or
+portrait. Paid per clip, so at most 10 a day (counted in `CCS_VIDEO_STATE`),
+one at a time; a clip whose caller hangs up is still finished and filed,
+since it is billed anyway. The key is read from `CCS_DEEPINFRA_KEY_FILE`.
+`GET /video/openapi.json` describes it as "Video".
+
## Engines
Four, with independent indexes and independent rate limits. That last part is