---
title: "Finalize a desktop recording session"
method: POST
path: "/v1/desktop/sessions/:id/finalize"
tags: ["Desktop"]
---

# Finalize a desktop recording session

`POST /v1/desktop/sessions/:id/finalize`

## Request

- Base URL: `https://api.quillhub.ai`
- URL: `https://api.quillhub.ai/v1/desktop/sessions/:id/finalize`
- Auth: HTTP bearer

Signals recording is complete. The backend writes a manifest of all chunk S3 keys as `audio_url` and transitions the `request` row to `TO_TRANSCRIBE` so the existing transcriber worker picks it up. Returns `409` if already finalized.

## Path parameters

- `id` string, required

## Request body

- object
  - `chunk_count` integer, required: Total number of WAV chunks uploaded by the client.
  - `duration_ms` integer, required: Total recording duration in milliseconds (client-side measurement).

## Response `200`

Session finalized.

- object
  - `request_id` string, required
  - `status` 'TO_TRANSCRIBE', required

## Other responses

- `400`: chunk_count mismatch.
- `401`: Unauthenticated.
- `404`: Session not found.
- `409`: Session already finalized.
- `410`: Session marked FAILED.

---

[API](https://skmtc.dev/quillhub/apis/quillhub-public-api.md) · [All operations](https://skmtc.dev/quillhub/apis/quillhub-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quillhub/apis/quillhub-public-api/revisions/5bd42ee9d967?raw)
