Correcting a sentence and replacing the master
Fix one sentence: only it is re-voiced and charged, and a new revision with a new master is published.
PATCH /narrations/{narration_id}/sentences/{sentence_id} with the new text and the base_revision you corrected. Only that sentence is generated again (with the neighbouring sentences as context, so the join sounds natural) and charged; the master is rebuilt from the original takes and published as a new revision. Unchanged sentences keep their files.
If the narration moved on since your base_revision (another correction, or an edit on the website), the request is refused with 409 revision_conflict - fetch the narration and retry. Only one edit runs at a time (409 narration_busy). POST …/regenerations re-voices a sentence with unchanged text.
The previous revision stays downloadable for 30 days after it is replaced (retained_until in its manifest).
curl -s -X PATCH "https://kolimina.com/api/public/v1/narrations/nar_…/sentences/sent_…" \
-H "Authorization: Bearer $KOLIMINA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: fix-1" \
-d '{"base_revision": 1, "text": "זה המשפט המתוקן."}'curl -s -X POST "https://kolimina.com/api/public/v1/narrations/nar_…/sentences/sent_…/regenerations" \
-H "Authorization: Bearer $KOLIMINA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: regen-1" \
-d '{"base_revision": 2}'