Skip to content

HTTP API

The core serves one HTTP API, on port 8801 by default. Every route is declared in app.py; there are no routers, and the only mount is /static. The web UI, the Chrome extension, the Android patch and the in-process trackers are all clients of it.

No stability guarantee. /v1 is a path prefix, not a versioned contract. Most routes exist for the web UI and change with it. What outside clients rely on are the two ingestion doors; their refusal reason codes are stable and appended to rather than renamed (producer admission). If you integrate with anything else, pin a commit.

FastAPI’s generated pages are on too: /docs, /redoc and /openapi.json. Most handlers read their JSON body themselves, so the generated schema lists query and path parameters but few request bodies. This page is the better reference for bodies.

The core has no user accounts. Who can reach port 8801 is decided by your network (LAN, Tailnet, or a proxy in front of it).

  • X-Preview-Token. If the secret AUTOMINER_PREVIEW_TOKEN is set, every request whose path starts with /v1 must carry it in X-Preview-Token, or the core answers 401 {"ok": false, "errors": ["unauthorized"]}. Pages, /static, /healthz and /docs are not checked. It is unset by default. The web UI adds it from localStorage (autominer_preview_token) and the extension from its settings. The in-process Stremio and Spotify trackers do not send it, so their posts are refused while it is set.
  • Producer admission. The two ingestion doors check who is posting before they record anything; see Watch ingestion.
  • The Android door also needs its shared secret in X-AutoMiner-Secret.
  • Bodies are JSON objects unless a route says it takes a file upload (multipart file, or the raw bytes as the body).
  • Most errors are FastAPI’s shape, {"detail": "..."}. A few 409s put an object in detail with a message. The ingestion routes and the /v1 token check answer {"ok": false, "errors": [...]} instead. Messages are written for the person using the UI, mostly in Japanese.
  • A database that stays locked past the 5 s busy timeout gives 503 with Retry-After: 5 and {"ok": false, "retryable": true, "errors": [...]}. Retry it.
  • Routes that queue work return the job they queued, usually as "job": {"job_id", "status", "held", "duplicate"} (some flatten it into job_id, job_kind, job_status). duplicate: true means a job of the same kind and key already existed (usually queued or running), and nothing new was added. During a deploy drain new work is stored but held ("held": true); the ingestion doors and the language change also add "maintenance": {"held": true, "message": "..."}. Do not retry a held request.
  • Many routes that change or delete things take dry_run (query or body) and answer with what would happen.
  • Identifiers: media_id is a source’s id (a UUID); candidate_id is a card’s id; segment_id is an integer subtitle line id.
  • day parameters are YYYY-MM-DD. tz is an IANA zone name, used only when Settings has no time zone; the zone in Settings always wins.

On the ingestion doors, X-AutoMiner-QA: 1 (or ?qa=1; also true, yes, on) marks the session, and a source it creates, as a test source. Test sources are left out of statistics and the verifier, and POST /v1/qa/purge removes them.

These are the routes outside clients post to. Everything else on this page is for the web UI.

One event envelope per request. The Chrome extension, the Stremio and Spotify trackers and the legacy Windows relay post here.

Headers

Header Required Meaning
Content-Type: application/json yes
X-AutoMiner-Client under enforce The producer’s name, such as extension, spotify-adapter, stremio-adapter.
X-AutoMiner-Durable under enforce The durability contract the client claims, a decimal integer; at least 2.
X-AutoMiner-Client-Version if the enrolment requires it The client’s build.
X-AutoMiner-QA no Mark as a test source.
X-Preview-Token if the token is set See Access.

The admission mode decides what a missing or unknown identity means. In permissive (the default) and observe it is recorded and accepted; in enforce it is refused before the watch is recorded. The policy, the reason codes and what a client must do with a refusal are in producer admission.

Envelope

Field Required Meaning
source yes The platform the client reports from, such as youtube.
device yes A name for the device, such as pc-chrome. Shown on Today.
session_id yes The client’s id for one watch session. Keep it stable for the session.
kind yes session.start, position, pause, resume, seek, session.end (also fetched, asr.done).
ts yes When it happened, ISO 8601 UTC.
media on the first event What is being watched; see below. Later events can leave it out.
position_s for timeline events The playback position in seconds.
from, to for seek Positions before and after the seek. to starts the next interval.

media:

Field Required Meaning
kind yes What it is: the extension and trackers send video, podcast or music.
source yes The platform that names this media.
source_id yes Its id on that platform. Together with source it is the alias the core finds the source by.
title yes The title as shown.
duration_s no Length in seconds.
lang no The language, if the client knows it.
languages no Language tags the platform gives, a list.
series, episode, uri no Show, episode, and a link.

The Stremio tracker adds identity fields of its own for anime episodes.

Example. The extension, while a YouTube video plays:

POST /v1/events HTTP/1.1
Content-Type: application/json
X-AutoMiner-Client: extension
X-AutoMiner-Durable: 2
X-AutoMiner-Client-Version: extension 0.11.0
{
"source": "youtube",
"device": "pc-chrome",
"session_id": "s_3f0b6c1e-9a52-4d0e-b3b1-2c7d5e8f9a10",
"media": {
"kind": "video",
"source": "youtube",
"source_id": "abcDEF12345",
"title": "Example video title",
"duration_s": 612.4
},
"kind": "position",
"ts": "2026-11-24T09:15:30.000Z",
"position_s": 184.2
}

It sends session.start when playback begins, position every 10 s while playing, pause, resume and seek as they happen, and session.end when the video ends or changes, the page closes, or after a gap of more than 90 s.

Responses

Status Body Meaning
200 {"ok": true, "event_id", "duplicate": false, "media_id", "qa", "media_qa"} Recorded. On session.end it may add "job": the fetch or mining job it queued.
200 {"ok": true, "event_id", "duplicate": true} The exact same envelope was already recorded; nothing new was written. A repeated session.end may add "job" when it queues the source’s work again.
200 {"ok": true, "duplicate": false, "skipped": "not installed"} The platform is not installed; nothing was recorded.
200 adds "held": true, "maintenance": {...} Recorded during a deploy drain; its job runs after. Do not retry.
400 {"ok": false, "errors": ["invalid json"]} or ["envelope must be an object"] Not JSON, or not an object.
400, 403, 426 {"ok": false, "accepted": false, "error": {"scope": "producer", ...}} The producer was refused; see producer admission.
401 {"ok": false, "errors": ["unauthorized"]} Wrong or missing X-Preview-Token.
422 {"ok": false, "errors": ["missing field: ts", ...]} The envelope is invalid. Sending it again will not help.
503 {"ok": false, "retryable": true, ...} Database busy; retry.

What the core does with it. ingest.ingest (ingest.py) validates the envelope, finds the source by <source>:<source_id> or creates it, opens the session, and appends the envelope to events. The idempotency key is the SHA-256 of the envelope with its keys sorted, so a client that retries after a lost answer cannot record an event twice. A position, pause, resume, seek or session.end rebuilds the session’s watched intervals. A session.end queues the work for the source; see Architecture.

The door for the YouTube patch on Android (YouTube on Android). It takes a simpler report and builds the envelope itself.

Headers: X-AutoMiner-Secret (the shared secret from Settings), plus the producer headers above. The Android patch sends X-AutoMiner-Client: youtube-android-morphe.

Body

Field Required Meaning
video_id yes The YouTube video id.
state yes playing, paused or ended (become position, pause, session.end).
ts no When, ISO 8601 UTC; defaults to now.
position_s, duration_s no Seconds.
title, channel no The channel becomes the source’s series.
device no Defaults to phone-revanced.
{"video_id": "abcDEF12345", "state": "playing", "ts": "2026-11-24T09:15:30Z",
"position_s": 184.2, "duration_s": 612.4, "title": "Example video title",
"channel": "Example channel", "device": "pixel"}

The core picks the session: a report within the session gap (AUTOMINER_REVANCED_SESSION_GAP_S) of the last one for the same device and video continues that session. The answer is the /v1/events answer plus session_id. Before the body is read: 503 when no secret is configured, 401 when the secret is wrong; an unauthenticated caller is not told anything about admission.

Route Does Returns
GET /v1/phone/youtube The Android door’s state for Settings. whether a secret is set and where from, admission mode and approval, last seen, build, devices, links to setup docs
POST /v1/phone/youtube/secret Makes a new shared secret and saves it. A phone patched with the old one can no longer post. 409 if the secret comes from the environment. the state plus secret, sent with Cache-Control: no-store
GET /v1/producers Read-only view of admission. No route can approve a producer; that is autominer producers approve. policy, enrolled, admitted, rejected

The rest of the routes, grouped by area. {id} in a path is the id named in the group. Input lists the query parameters and body fields that matter.

These return HTML or files, not JSON.

Route Does
GET / Today. A fresh install with no sources and no Anki URL redirects to /setup?first=1.
GET /setup, /today, /sources, /queue, /audit, /spend, /settings, /verifier The pages (the pages). HEAD works too.
GET /audit/clips, GET /audit/lines The Clips and Lines tables of Audit.
GET /media Redirects to /sources.
GET /editor Redirects to /sources, keeping the query string.
GET /static/{path} The UI’s scripts, styles and images, from core/static/.
GET /favicon.ico The icon.
Route Does Returns
GET /healthz Liveness and state for monitors and the deploy gate. Not under /v1. ok, version, db, tables, events, jobs_queued, maintenance (barrier and live work), producer_admission (mode, since, min_contract, doors, enforced_doors), ingest_doors, trackers, and the running revision
GET /v1/config/status The autominer doctor report. per-feature state
Route Does Input Returns
GET /v1/stats/today Today page totals. day, tz the day’s totals, plus no_platform (true when no platform is installed)
GET /v1/stats/dashboard Today page cards in the saved layout. day, tz
GET /v1/stats/day One day’s watch statistics. day, tz
GET /v1/stats/days One row per day. from, to (default: this month to today), tz {"days": [...]}
GET /v1/stats/media/{media_id} One source’s watch statistics.
GET /v1/devices Devices seen and their colors. devices, palette
GET /v1/media Every source with a summary. list
GET /v1/media/{media_id}/timeline Watched spans and card positions on a source’s timeline. duration, watched, cards
GET /v1/sessions/stale Sessions still open with no recent event (always a dry run). older_than_h what a sweep would close
POST /v1/sessions/sweep Closes those sessions. older_than_h, end_at_policy (default last_event), dry_run (default true) what was closed
Route Does Input Returns
GET /v1/jobs/active Live jobs and the most recent settled ones. The UI polls it. media_id, done (how many settled jobs, default 5) active, current_job, jobs (each: id, kind, key, status, attempt, stage, done, total, pct, message, held, hold_reason, retry_at, title fields); worker_stopped: true when the worker thread died
POST /v1/jobs/{job_id}/cancel Cancels a queued job, or asks a running one to stop. 404 when gone. status cancelled or cancelling
POST /v1/jobs/cancel Stops every live job of a source, or of a kind not tied to a source. media_id or kind cancelled, cancelling counts
POST /v1/fix Presses Fix for sources: records intent; the worker runs stages until each is fresh or held. media_ids (list), keep_edited (default true) pressed count
GET /v1/fix/graph The input-to-result graph the UI draws for Fix. nodes, edges, job_nodes
GET /v1/queue/sources/active Sources a Fix is still working on, or with trim checks pending. active ids

How Fix decides: Architecture.

{media_id} is a source.

Route Does Input Returns
GET /v1/queue/sources The Sources list rows: counts, state, fix, hand-edited counts. media_id list
POST /v1/media/{media_id}/mine Queues the source’s fetch job, which ends in mining. fresh=true fetches the video again and re-mines (409 when the video is already here). Without fresh it answers instead of queuing when the source is already mined, its language must be chosen, or the same title is mined as another source. fresh, keep_edited (query) status (queued, already, already_mined, ask_lang, already_mined_title), job_kind, job_id
POST /v1/media/{media_id}/recalc Queues candidates.recalc: rebuilds the source’s candidates from its current lines (recalculation). keep_edited status (queued or already), job_kind, job_id, job_status, held
POST /v1/media/{media_id}/video Fetches the source’s video (a podcast’s audio) again. 422 for a source with nothing to fetch. job state
POST /v1/media/{media_id}/enrich Queues dictionary, translation and asset work. With dry_run, previews it. aggregate, yomitan, translate, assets (all default true), asset_limit, translate_limit, force, dry_run {media_id, job} or the preview
POST /v1/media/{media_id}/recut Cuts the source’s clips again. limit {media_id, job}
PUT /v1/media/{media_id}/lang Changes the source’s language (media.lang job), retiring or restoring its cards. body lang; dry_run (query) lang, lang_name, mines, retired, restored, job
DELETE /v1/media/{media_id} Deletes the source’s video only, or the whole source. 409 when it is busy or has no video. mode (video or all, required unless dry_run), dry_run the plan or the result
POST /v1/media/revive Brings back a deleted source by alias. alias media_id
GET /v1/media/{media_id}/card Finds the card on a line. segment_id, sentence, word (repeatable) {"id": ...}; id is null when there is none
GET /v1/media/{media_id}/series Series details for the source’s header. name, year, runtime, description, background, logo, or {"series": false}
GET /v1/media/{media_id}/channel The source’s channel card. channel fields or {"channel": false}
GET /v1/channels/{channel_id} A YouTube channel’s card.
GET /v1/media/{media_id}/clip_audit Clip audit summary for the source.
POST /v1/media/{media_id}/qa, DELETE /v1/media/{media_id}/qa Marks or unmarks the source as a test source.

The 判定 and its routes are explained in subtitle sync.

Route Does Input Returns
GET /v1/media/{media_id}/subtitles The source’s cues as WebVTT. Headers X-Subtitle-Source and X-Subtitle-Offset. format=vtt, offset_s, and one of track, name, source, judged to pick which subtitles text/vtt
GET /v1/media/{media_id}/subtitles/search Searches those cues. q, limit, and the same pickers matching cues
GET /v1/media/{media_id}/subtitle_sources Every subtitle source the media holds or could use. refresh
GET /v1/media/{media_id}/subtitle_files Subtitle files on disk for the source. refresh
POST /v1/media/{media_id}/subtitle_pool Gathers subtitle candidates for the 判定 (subtitles.pool). sources (list) job_kind, job, pool
POST /v1/media/{media_id}/subtitle_preview Prepares one candidate for preview without adopting it. key status ready, queued, already or produce
POST /v1/media/{media_id}/subtitle_source Switches to a subtitle source. Does not re-mine; answers how many rows it left stale. key
PUT /v1/media/{media_id}/subtitle_track Selects a subtitle track or file, optionally pulling it again. index or name, repull subtitle_file, index, job
POST /v1/media/{media_id}/subtitles/repull Reads the selected subtitle file again. name, index job
POST /v1/media/{media_id}/subtitle_file Adopts a subtitle file, or a 判定 candidate (judged, with run_id). Re-mines only with recalc. name, index, judged, run_id, recalc, keep_edited candidates_stale and the result
POST /v1/media/{media_id}/subtitle_file/upload Uploads a subtitle file. file; filename, recalc, keep_edited (query)
DELETE /v1/media/{media_id}/subtitle_file Deletes a stored subtitle file. name
POST /v1/media/{media_id}/subtitles/generate Makes lines from the selected file, or queues transcription when there is none. name, index
POST /v1/media/{media_id}/subtitles/update Reloads the lines from their original file. keep_edited
GET /v1/media/{media_id}/sub_offset, PUT Reads or sets the manual subtitle offset. Setting it queues nothing. sub_offset_s
GET /v1/media/{media_id}/sync The source’s timing state. offset, state, last, runs, revertible, revert_run, judge_mode, judge, services, picks
POST /v1/media/{media_id}/sync/judge Starts a 判定 pass. 409 when 判定 mode is off, or (without reuse) a service it needs is missing. mode (sampled or full, default full), reuse (re-judge stored evidence) mode, reuse and the pass result
POST /v1/media/{media_id}/sync/words Measures where each word is spoken (sync.words). remeasure
POST /v1/media/{media_id}/sync/revert Undoes the last applied timing run. 409 when there is nothing it may undo. file
POST /v1/media/{media_id}/reads/refresh Drops the cached transcriptions of the source’s audio windows. dropped, reads
GET /v1/media/{media_id}/cue_scores How well each line was heard. cues
GET /v1/sync/prerequisites The services the 判定 needs, with live status. kind (a platform) services
GET /v1/sync/reference-filters, GET /v1/subtitles/speaker-marks, GET /v1/subtitles/continuation-marks A regex-list setting: which patterns compile and which were refused. key, configured, value, defaults, patterns, refused
GET /v1/segments/search Full-text search over all lines. q (required), limit (max 200) list
GET /v1/segments/count Counts matching lines. q (required) {"q", "count"}

Video and audio support HTTP Range.

Route Does Input
GET /v1/media/{media_id}/video The local video file. 404 when it is remote or removed.
GET /v1/media/{media_id}/audio The analysis audio track (audio/mp4).
GET /v1/media/{media_id}/frame A kept frame as JPEG. t (seconds)
GET /v1/media/{media_id}/thumbnail The source’s thumbnail. w (width)
GET /v1/media/{media_id}/series/{which} Series art, background or logo. w
GET /v1/channels/{channel_id}/{which} Channel art, avatar or banner. w

A candidate is one sentence for one target word; it becomes a note. {id} is a candidate_id.

Route Does Input Returns
GET /v1/candidates Lists candidates. With page or per_page, a page; otherwise up to limit rows (max 5000). status, source, media_id, light, limit, page, per_page, max_unknown, min_clip list, or {rows, ...}
GET /v1/candidates/groups Candidates grouped by word, with the one to send. media_id, status, limit, page, per_page, light, sort, hide_proper, max_unknown, min_clip list, or {groups, ...}
POST /v1/candidates Creates a card by hand. media_id, segment_id, target, reading, meaning, sentence, prev_text, next_text, clip_path, shot_path, score, score_json, source (default manual), note_id the row
GET /v1/candidates/{id} One candidate. the row
PATCH /v1/candidates/{id} Edits it. 409 while it is being sent or once it is in Anki. any of target, reading, meaning, sentence, prev_text, next_text, translation; fields (note field edits) the row plus edited
POST /v1/candidates/{id}/decision Accepts or rejects it. decision: accepted, rejected or null the row
POST /v1/candidates/decisions The same for up to 1000 cards. ids, decision decided, refused
DELETE /v1/candidates/{id} Deletes it. 409 while it is being sent. {"ok": true}
POST /v1/candidates/{id}/primary Makes this sentence the one sent for its word. the word’s candidates, status, group, note
GET /v1/candidates/{id}/preview The note as it would be sent. Cuts a deferred clip first. fields plus language details
GET /v1/candidates/{id}/media What the editor needs to play and trim the card. all_sources clip (window, pads, score, gate), context, neighbors, busy, source state
GET /v1/candidates/{id}/neighbor The line before or after. side (prev, next), distance segment, has_more
GET /v1/candidates/{id}/clip, /shot The clip and screenshot files. file
GET /v1/candidates/{id}/peaks Waveform peaks of the clip. buckets
GET /v1/candidates/{id}/context The longer audio around the clip (Range supported). file
GET /v1/candidates/{id}/context-peaks Its waveform. buckets
POST /v1/candidates/{id}/context Extends the context audio. extend_start_s, extend_end_s
POST /v1/candidates/{id}/regenerate Cuts the clip again with new edges. adjust_s (shift), pad_start_s, pad_end_s, reset the cut, cumulative_adjust_s, deferred, score
POST /v1/candidates/{id}/judge Scores the current clip with the clip model. clip_score
POST /v1/candidates/{id}/feedback Records an OK or a play of the clip. check_bad is refused: fix the cut in the editor. 409 when the clip changed since it was heard. event (played, check_ok), t0, t1 (the window heard) {"ok": true}
POST /v1/candidates/{id}/exclude_line Excludes the card’s line from mining. kind (audio or sentence), reason, t0, t1
POST /v1/candidates/{id}/bring_back Brings a turned-down card back: clears its NG labels, releases its excluded line, forgets that it was deleted in Anki, clears a rejection, and queues it to send if it qualifies. status, labels, released
POST /v1/candidates/{id}/translate Translates the sentence. 409 at the spend limit. sentence (optional, to translate an edit) translation, stored, …
GET /v1/furigana Furigana for a sentence and a word. sentence, expression, reading, candidate or lang SentenceFurigana, ExpressionFurigana
POST /v1/candidates/{id}/push Sends the card to Anki now. See below. see below the note
GET /v1/candidates/{id}/anki What Anki already holds for this card’s word. reachable, notes, preferred, unlinked, restored, gone, status, duplicate settings

POST /v1/candidates/{id}/push takes:

Field Meaning
duplicate When the word already has a note: merge, overwrite or new.
note_id The note to merge into or overwrite.
resend true to send a card again as a new note.
fields Field values that override the built ones.
deck, model, series_tag Override the deck, note type and series tag.
mode The duplicates mode the editor showed. If the setting changed since, or the notes it would write no longer match, the send is refused.
anki_edits replace or keep edits made in Anki since the last write.

It answers 409 when the card is already in Anki, rejected, its source deleted, or the note was edited in Anki (then detail is an object with code, anki and words); 502 when Anki is unreachable or errors; 503 when Anki is not configured; 422 for a field mapping that clashes.

A line is a segment; {segment_id} is its id. These back Audit › Lines.

Route Does Input Returns
GET /v1/lines Lists lines. 422 for a bad query. q, sort, desc, page, per_page page
GET /v1/lines/{segment_id}/open The line’s words, each with its card if it has one. words, info
POST /v1/lines/{segment_id}/card Makes a card for a word on the line. word id, made, word
POST /v1/lines/{segment_id}/clip Cuts a clip for the line. pad_start_s, pad_end_s
GET /v1/lines/{segment_id}/context, /context-peaks The audio around the line and its waveform. buckets
Route Does Input Returns
GET /v1/automine/status Automatic sending’s state. gate
GET /v1/automine/next The next cards to send. With held, also why others are held. held list, or cards, held_stale, held_sources, held_reasons, below_bar, in-transit counts
POST /v1/automine/send_now Sends the due cards now and waits up to 60 s for the send. 409 when it cannot. the outcome
GET /v1/automine/send_now The last send-now outcome.
GET /v1/automine/recent Recently sent cards. limit (max 200), before list
GET /v1/automine/rejected Cards turned down: an NG, or deleted in Anki after sending. list
POST /v1/automine/check_anki Checks the links to sent notes against Anki. checked, state, unlinked, restored, error
GET /v1/verifier/report How the clip model agrees with OK and NG.
GET /v1/verifier/feedback Clip feedback events, for export. since_id, limit (max 20000) events, next_since_id
GET /v1/verifier/exclusions Excluded lines. exclusions
DELETE /v1/verifier/exclusions/{exclusion_id} Releases one; re-mine the source to use the line again. ok, message
GET /v1/music/preview How many clips a music threshold would hold back. percent (required)
Route Does Input Returns
GET /v1/services Anki and Yomitan reachability for the shell. May queue a read of Anki when one is due. anki, yomitan
GET /v1/anki/decks, GET /v1/anki/models Deck and note type names. 503 not configured, 502 unreachable. decks / models
GET /v1/anki/model/{model_name}/fields A note type’s fields and the current role mapping. model, fields, names
GET /v1/anki/card_format The note type’s field mapping and Yomitan’s card format. refresh model, format, roles, defaults, clash
GET /v1/anki/duplicates The duplicates mode and Anki sync state.
POST /v1/anki/browse Opens a note in Anki’s browser. 409 when that note’s profile is not open. note_id, profile opened
GET /v1/known/status Known-word counts and the CSV’s state.
POST /v1/known/refresh Reads known words from Anki again (known.refresh). full, yomitan job
POST /v1/known/csv Uploads a CSV of known words. file the import result
GET /v1/known/csv, DELETE /v1/known/csv Downloads or deletes the saved CSV.

An audit finding is a candidate with source audit; {id} is its id.

Route Does Input Returns
GET /v1/audit/summary Counts for Audit. include_closed
GET /v1/audit/findings Notes in Anki missing a sentence or clip. q, page, per_page, include_closed, alternatives page
GET /v1/audit/options Anki tags and the last scan. tags, anki, last_scan
GET /v1/audit/config, PUT /v1/audit/config The audit scan’s settings. object
POST /v1/audit/scan Scans Anki now (audit.scan), or dry_run. dry_run
GET /v1/audit/findings/{id}/alternatives Mined sentences that could fill a finding. poll
GET /v1/audit/findings/{id}/note_audio The note’s current audio from Anki. file
POST /v1/audit/findings/{id}/lines/{segment_id}/cut Cuts a card from a line for a finding.
POST /v1/audit/findings/{id}/substitute Writes an alternative into the note. candidate_id or segment_id, how (overwrite (default), merge, new), and the push’s mode and fields
POST /v1/audit/findings/{id}/action Resolves a finding. action: replace, dismiss, browse, keep
GET /v1/clips The Clips table. 422 for a bad query. q, sort, desc, page, per_page page
POST /v1/clips/delete Deletes cards: their files move to the trash and the card is marked deleted. dry_run plans it. ids (candidate ids, up to 1000), dry_run deleted, busy, errors
POST /v1/clips/restore Restores clips from the trash. ids
GET /v1/clips/loudness Clip loudness leveling state.
POST /v1/clips/loudness/measure Queues loudness measurement. queued and the state
POST /v1/clips/loudness/apply Queues leveling existing clips. queued and the state
Route Does Input Returns
GET /v1/settings Reads several settings rows. key (repeatable, up to 500) {"settings": {key: value}}
GET /v1/settings/{key} Reads one. {"key", "value"}
PUT /v1/settings/{key} Writes one. See below. value; sometimes limits, fields, timezone; dry_run only for mine.lang {"key", "value", ...}
GET /v1/settings/dependencies The rules that tie settings together and the pipeline they produce. rules, facts, pipeline, kinds
GET /v1/settings/keys/{name} Whether a UI-managed secret is set. Never returns it. present, masked, source, env_override, error
POST /v1/settings/keys/{name} Saves a secret; an empty value deletes it. value the same status
GET /v1/settings/openai_key, POST The same for OPENAI_API_KEY. value
GET /v1/service_urls/{key} Probes a service URL setting. key such as anki.url configured, source, host, reachable, status, detail, env_override, profile
GET /v1/languages Languages offered and studied. languages, studied

PUT /v1/settings/{key} validates the value for the keys it knows (400 or 422 for a bad value) and refuses a value another setting depends on (422 with the reason). It refuses keys the app writes for itself with 403. A few keys take a per-platform value as key:<platform>, such as automine.threshold:youtube. Secrets are not settings rows; use /v1/settings/keys/{name}, which accepts OPENAI_API_KEY, ELEVENLABS_API_KEY, GEMINI_API_KEY, INDEXER_API_KEY, DELUGE_PASSWORD, JIMAKU_API_KEY, OPENSUBTITLES_API_KEY, TYPESAFE_API_KEY and STREMIO_AUTH_KEY. The setting keys themselves are described in configuration and, as the Settings page shows them, in settings.

There is no separate setup API: the setup page uses these routes and the settings and service routes above. What a platform declares is in platforms.

Route Does Input Returns
GET /v1/source-kinds Every platform with its settings, cards and whether it is installed. {name: {...}}
POST /v1/platforms/{name}/install Installs a platform and downloads its programs. 502 when a download fails. {"name", "installed": true}
POST /v1/platforms/{name}/uninstall Uninstalls it, cancels its jobs and deletes its sources’ videos. installed: false, deleting
POST /v1/settings/packs Reads an uploaded pack and says what it would install. Nothing installs. 403 without the X-AutoMiner header; 413 when its Content-Length is over 9 MB. file (multipart) the offer: sha256, manifest, replaces, older, limits, dependencies, to_fill, refusals
GET /v1/podcasts/feeds Podcast shows and their RSS feeds. feeds
PUT /v1/podcasts/feeds Saves or clears a show’s feed; retries failed episodes. show, url queued
POST /v1/podcasts/feeds/check Reads a feed once without saving. show, url
POST /v1/podcasts/feeds/find Looks the show up in a podcast directory. show
GET /v1/spotify/status, GET /v1/spotify/paces The Spotify tracker’s state and polling paces.
GET /v1/selfhost/{name}/download A zip of a self-hosted service with its installers: separator, or whisper (the probe transcriber). application/zip
GET /v1/selfhost/torrent 204 when the torrent bundle is offered, 409 with the reason when not.
POST /v1/selfhost/torrent Builds a Docker Compose bundle for torrents (VPN container, Deluge, Prowlarr) and creates the Deluge password and indexer key secrets if missing. 422 for a bad VPN entry; 409 on Windows. provider, private_key (WireGuard), addresses, countries application/zip
Route Does Returns
GET /v1/judge Which judge is chosen and the local judge’s state. backend, name, available, reason, problem, jev_key, local
POST /v1/judge/local/fetch Downloads the local judge (judge.fetch). judge status
POST /v1/judge/local/cancel Cancels that download. judge status
DELETE /v1/judge/local Deletes the local judge’s files. 409 while downloading. judge status

Choosing the judge is the setting judge.backend (jev or local); Jev’s key is TYPESAFE_API_KEY. The local judge and choosing between the two are described in the judge and subtitle sync.

How these fit together: dictionaries.

Route Does Input Returns
GET /v1/yomitan/status Whether Yomitan is enabled, configured and reachable, and which URL is used. heartbeat enabled, configured, url, source, reachable, local, builtin
POST /v1/yomitan/builtin/import Asks the built-in Yomitan to import the dictionary zips in its folder; with download, it first downloads the recommended dictionaries. Runs in the background. 409 when it is not running. download its status
GET /v1/yomitan/builtin/dictionaries The built-in Yomitan’s dictionaries. dictionaries
POST /v1/yomitan/builtin/dictionaries Uploads a dictionary zip to it. 413 when too large. multipart file
PUT /v1/yomitan/builtin/dictionaries Orders and enables them. dictionaries: list of {title, enabled}
DELETE /v1/yomitan/builtin/dictionaries Deletes one. title
GET /v1/dictionaries Dictionaries imported into AutoMiner, and the order per language. dictionaries, order
POST /v1/dictionaries Imports a Yomitan-format dictionary zip. file; lang, filename
PUT /v1/dictionaries/order Sets a language’s dictionary order (Yomitan is one entry). lang, ids dictionaries
DELETE /v1/dictionaries/{dictionary_id} Deletes one. deleted
Route Does Input Returns
GET /v1/acquire/status The search, Deluge and VPN setup state.
GET /v1/acquire/indexers Indexers in the search service. indexers, or null with why
GET /v1/acquire/indexers/definitions Indexers that can be added. q definitions
POST /v1/acquire/indexers Adds one. name, fields indexer
PUT /v1/acquire/indexers/{indexer_id} Turns one on or off. enable indexer
DELETE /v1/acquire/indexers/{indexer_id} Removes one. removed

Errors map the search service’s answer: 409 not set up, 404 gone, 422 refused, 502 unreachable. Setting these up: Stremio.

Route Does Input Returns
GET /v1/costs/summary Paid API spend against the limits. period (month, 30d, 12m), day, tz
GET /v1/asr/costs Transcription spend. days (default 30)

Spend limits are settings written with PUT /v1/settings/{key}, which accepts the related limits together in limits. What is paid and the limits: costs.

Route Does Input Returns
GET /v1/retention/status Which source videos the retention sweep would delete. retention_days, delete_after_assets, verdicts, storage
POST /v1/maintenance/wipe Erases all data. Needs confirm set to the phrase the UI shows. confirm, dry_run the plan and job
GET /v1/qa/status Test sources and what they hold.
POST /v1/qa/purge Deletes test sources. dry_run (query) purged
POST /v1/candidates/cleanup Removes junk candidates. media_id, dry_run
POST /v1/candidates/wordkey-scan Finds damaged word keys. media_id
POST /v1/candidates/wordkey-repair Repairs them. media_id, dry_run (default true), enrich
POST /v1/candidates/target-scan Finds bad target word forms. media_id

The deploy barrier (drain, reopen) and producer enrolment have no HTTP routes on purpose; they are autominer maintenance and autominer producers commands. See the command line.