# Scriptivox — full documentation

> Scriptivox is the most accurate and reliable transcription service for 119+ languages.
>
> Every Scriptivox API documentation page, concatenated. This is the companion to
> https://platform.scriptivox.com/llms.txt, which is an index; this file is the content itself, so an
> agent can read the whole surface in one request instead of ten.
>
> Each page is also available on its own: append `.md` to its path, or send
> `Accept: text/markdown` to the HTML URL.

Base URL for the API: `https://api.scriptivox.com/v1`
Machine-readable description: https://platform.scriptivox.com/openapi.json
MCP server manifest: https://platform.scriptivox.com/.well-known/mcp
Support: Any feedback or issue sent to support@scriptivox.com, or through any other channel, is resolved within 24 hours. This is our founders' personal guarantee. What to include in the message is under "Support" in the overview below.

---
<!-- source: https://platform.scriptivox.com/docs -->
<!-- updated: 2026-10-18 -->

# Scriptivox API

Transcribe audio and video at **$0.20/hour**, billed per second. Speaker diarization, word-level timestamps, and automatic language detection across **119 languages**, all included.

Powered by Scriptivox's own speech recognition model. Pay-as-you-go, no minimums, no subscriptions.

## Developer quickstart

Transcribe audio and video files with word-level timestamps, speaker diarization, and language detection. Build transcription into your product in minutes.

```python
import requests
import time

API_KEY = "sk_live_YOUR_KEY"
BASE = "https://api.scriptivox.com/v1"

# 1. Transcribe from a URL
resp = requests.post(f"{BASE}/transcribe",
    headers={"Authorization": API_KEY},
    json={"url": "https://example.com/audio.mp3"})
job = resp.json()

# 2. Get result
while True:
    result = requests.get(
        f"{BASE}/transcribe/{job['id']}",
        headers={"Authorization": API_KEY}
    ).json()
    if result["status"] == "completed":
        print(result["result"]["full_transcript"])
        break
    time.sleep(5)
```

```javascript
const API_KEY = "sk_live_YOUR_KEY";
const BASE = "https://api.scriptivox.com/v1";

// 1. Transcribe from a URL
const job = await fetch(`${BASE}/transcribe`, {
  method: "POST",
  headers: {
    Authorization: API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ url: "https://example.com/audio.mp3" }),
}).then((r) => r.json());

// 2. Get result
while (true) {
  const result = await fetch(
    `${BASE}/transcribe/${job.id}`,
    { headers: { Authorization: API_KEY } }
  ).then((r) => r.json());

  if (result.status === "completed") {
    console.log(result.result.full_transcript);
    break;
  }
  await new Promise((r) => setTimeout(r, 5000));
}
```

```bash
API_KEY="sk_live_YOUR_KEY"
BASE="https://api.scriptivox.com/v1"

# 1. Transcribe from a URL
JOB=$(curl -s -X POST "$BASE/transcribe" \
  -H "Authorization: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/audio.mp3"}')

# 2. Get result
JOB_ID=$(echo $JOB | jq -r '.id')
while true; do
  RESULT=$(curl -s "$BASE/transcribe/$JOB_ID" \
    -H "Authorization: $API_KEY")
  STATUS=$(echo $RESULT | jq -r '.status')
  if [ "$STATUS" = "completed" ]; then
    echo $RESULT | jq -r '.result.full_transcript'
    break
  fi
  sleep 5
done
```

[Get started](/docs/quickstart)

## What the API does

Send a recorded audio or video file (by public URL, or by uploading it to a presigned URL we hand you) and get back a structured transcript. Every response carries the full text, an array of utterances with start and end times, and, unless you opt out, a timestamp for every individual word. Speaker labels are added when you ask for diarization. The same transcript can be exported as SRT or WebVTT subtitles, or as plain text, by adding a query parameter to the fetch.

Jobs are asynchronous. `POST /v1/transcribe` accepts the work and returns immediately with `status: "created"`; the file is downloaded and validated afterwards. That ordering matters more than anything else on this page: **a bad URL, an unreadable file or an unsupported codec surfaces on the poll, as `status: "failed"`, not as an error on the submit call.** Clients that only check the response to `POST` will believe every job succeeded.

This is not a streaming or real-time dictation API. Every job takes a complete file, between 1 second and 10 hours long and at most 5 GB.

## Authentication

Every request needs an API key from the [dashboard](/keys), passed as either `Authorization: sk_live_…` (a `Bearer` prefix is accepted) or `X-Api-Key: sk_live_…`. See [Authentication](/docs/authentication) for rotation, the key limit, and what each `401` means.

## Endpoints

Base URL: `https://api.scriptivox.com/v1`

| Method | Path | What it does |
| --- | --- | --- |
| GET | `/v1` | Describe the API. No API key needed. |
| GET | `/v1/status` | Check whether the API is taking new jobs. No API key needed. |
| POST | `/v1/upload` | Create a presigned upload URL. |
| POST | `/v1/transcribe` | Start a transcription. |
| GET | `/v1/transcribe/{id}` | Get a transcription. |
| DELETE | `/v1/transcribe/{id}` | Delete a transcription. |
| POST | `/v1/transcribe/{id}/cancel` | Cancel a transcription before it starts transcribing. |
| POST | `/v1/transcribe/{id}/webhook/resend` | Send a finished job's final webhook again. |
| POST | `/v1/transcribe/{id}/feedback` | Rate a job, report a problem with it, or report that "no speech" was wrong. |
| POST | `/v1/webhooks/test` | Send a test webhook to your URL. |
| GET | `/v1/transcriptions` | List transcriptions. |
| GET | `/v1/balance` | Get account balance. |

Every operation, with typed parameters and response schemas, is described in the [API reference](/docs/api-reference) and in the OpenAPI 3.1 document at [/openapi.json](/openapi.json) (YAML at [/openapi.yaml](/openapi.yaml)).

## Errors

Errors are always JSON, always the same shape, and always carry a stable machine-readable `code` you can branch on. The `message` is for humans and may be reworded; the `code` will not be. `docs_url` is the page that explains that exact error and what to do, and `help_id` is its id ([Help pages](/docs/api-reference#help-pages)).

```json
{
  "error": {
    "code": "ZERO_BALANCE",
    "message": "No balance found. Please deposit funds first.",
    "deposit_url": "https://platform.scriptivox.com/billing",
    "docs_url": "https://www.scriptivox.com/errors/api-no-balance",
    "help_id": "api-no-balance",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

Two failure paths exist, and they need different handling. Synchronous errors (a bad key, a malformed body, no balance) come back on the call you just made. Asynchronous errors come back later on `GET /v1/transcribe/{id}` with `status: "failed"` and a `error` object describing why. The full code list for both is in the [API reference](/docs/api-reference#error-codes).

## Rate limits

Limits are per endpoint and per IP, and every response advertises them, including responses you get before authenticating:

```http
RateLimit-Policy: "endpoint";q=100;w=60, "ip";q=300;w=60
RateLimit: "endpoint";r=94;t=41
```

A `429` carries `Retry-After` in seconds. Back off on it rather than retrying immediately; the counters are per-minute windows, so a short wait clears them.

## Formats and languages

26 file formats are accepted, covering everything common in audio and video: MP3, WAV, FLAC, M4A, AAC, OGG, Opus, MP4, MOV, MKV, WebM and the rest. 119 languages are supported with automatic detection.

**Pass `language` when you know it.** Auto-detection usually works, but it can misclassify short clips, code-switched audio, or files that open with music. An explicit ISO code is both faster and more accurate.

## Billing

$0.20 per hour of audio, charged per second of actual duration, with no subscription and no minimum. Cost is reserved once the file's duration is known and settled when the job finishes. **Failed and cancelled jobs are free**: the reservation is released. See [Pricing](/docs/pricing).

## Service health

Real-time status, uptime history, and incident reports for every part of the API are published at **[status.scriptivox.com](https://status.scriptivox.com)**. Subscribe there to get notified about incidents and scheduled maintenance.

To check from code whether the API is taking new jobs right now, call [`GET /v1/status`](/docs/api-reference#service-status). It needs no API key and says what is paused, what still works, how long to wait (or when we expect it back, if we set a time) and what maintenance is planned. A job sent while new jobs are paused gets `503 MAINTENANCE` with a `Retry-After` header; nothing is created or charged, and jobs already accepted always finish. While link imports are paused, only a `url` to a video site gets it (`scope` `link`); uploads and file addresses carry on. During a short full pause (for example a planned upgrade) every request gets that answer, reads included.

## Support

Email **support@scriptivox.com**, or use the chat on [scriptivox.com](https://www.scriptivox.com). Any feedback or issue sent to support@scriptivox.com, or through any other channel, is resolved within 24 hours. This is our [founders'](https://www.scriptivox.com/founders) personal guarantee.

So we can find the issue, include:

- the email address of the Scriptivox account
- the job id (the `id` returned by `POST /v1/transcribe`)
- for a failed call, include the `X-Request-Id` response header (also in the error body as `error.request_id`); a refused submit has no job id, and this finds the exact request
- when it happened, with the time zone
- what was done, what was expected, and the exact error code and message

Never include an API key, a password or a sign-in code.

## Start building

- [Quickstart](/docs/quickstart): Get your first transcription running in under 5 minutes
- [API Reference](/docs/api-reference): Upload, transcribe, and retrieve results via REST endpoints
- [Webhooks](/docs/webhooks): Receive real-time notifications when transcriptions complete
- [Pricing](/docs/pricing): Simple pay-as-you-go at $0.20/hour of audio processed

## Capabilities

- **Fast Transcription**: High-accuracy transcription powered by Scriptivox's own speech recognition model. Supports 119 languages with automatic detection.
- **Speaker Diarization**: Identify who said what. Detect and label multiple speakers in your audio automatically.
- **Word-level Timestamps**: Precise start and end times for every word, plus confidence scores where the alignment model supports them. On by default; pass align: false to opt out.
- **Webhook Notifications**: Get notified when transcriptions complete. HMAC-signed payloads for security.
- **URL Transcription**: Transcribe from any public URL: Google Drive, Dropbox, OneDrive or Yandex Disk sharing links, public YouTube, TikTok, Instagram, Facebook, X, Snapchat or Douyin posts, or direct file links. No upload step needed.
- **119 Languages**: Automatic language detection across 119 languages. Just send your audio. No configuration needed.

## Every page in these docs

- [Quickstart](/docs/quickstart): first transcription in five minutes, in Python, JavaScript and curl.
- [API reference](/docs/api-reference): every endpoint, parameter, error code, rate limit, format and language.
- [Authentication](/docs/authentication): API keys, the two accepted headers, rotation, and what a 401 means.
- [Webhooks](/docs/webhooks): HMAC-signed completion callbacks instead of polling.
- [Pricing](/docs/pricing): pay-as-you-go rates and how reservations settle.
- [Versioning](/docs/versioning): what can change in `/v1` without notice, and how deprecations are announced.
- [Use cases](/docs/use-cases): folder watchers, batch pipelines and other worked examples.
- [MCP server](/docs/mcp): transcription as native tool calls from Claude, ChatGPT and other MCP clients.
- [CLI](/docs/cli): `npx @scriptivox-api/cli`, for shells and scripts.

## For AI agents

Every page here has a markdown twin: append `.md` to its path, or request the same URL with `Accept: text/markdown`. [/llms.txt](/llms.txt) describes what this service is for and when not to reach for it, and [/llms-full.txt](/llms-full.txt) is all of this documentation in a single fetch.

---

<!-- source: https://platform.scriptivox.com/docs/quickstart -->
<!-- updated: 2026-08-25 -->

# Quickstart

Get your first transcription running in under 5 minutes.

---

### Step 1: Create an API key
Go to the [API Keys page](/platform/keys) in your dashboard and create a new key. Copy it, because you'll only see it once.

Your key looks like: `sk_live_12ab34cd...`

### Step 2: Add balance
Transcription costs $0.20/hour of audio, billed per second. Add funds on the [Billing page](/platform/billing). Minimum deposit is $5.00 (~25 hours of audio).

### Step 3: Transcribe
Send a URL and we'll download, validate, and transcribe it. Supports direct file links, Google Drive, Dropbox, OneDrive and Yandex Disk sharing links, and public YouTube, TikTok, Instagram, Facebook, X, Snapchat and Douyin posts. A post that can't be transcribed (private, deleted, no video) is refused at once with a 400, and nothing is charged.

```python
resp = requests.post(f"{BASE}/transcribe",
    headers={"Authorization": API_KEY},
    json={
        "url": "https://example.com/podcast.mp3",
        "diarize": True
    })
job = resp.json()
print(f"Transcription ID: {job['id']}")
```

```javascript
const jobResp = await fetch(`${BASE}/transcribe`, {
  method: "POST",
  headers: {
    Authorization: API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/podcast.mp3",
    diarize: true,
  }),
});
const job = await jobResp.json();
console.log("Transcription ID:", job.id);
```

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/podcast.mp3",
    "diarize": true
  }'
```

```javascript
// npm install scriptivox
import Scriptivox from "scriptivox";

const client = new Scriptivox({ apiKey: "sk_live_YOUR_KEY" });

const job = await client.transcribe({
  url: "https://example.com/podcast.mp3",
  diarize: true,
});
console.log("Transcription ID:", job.id);

// A local file instead of a URL: the SDK uploads it for you
// await client.transcribe({ file: "./meeting.mp3", language: "en" });
```

```python
# pip install scriptivox
from scriptivox import Scriptivox

client = Scriptivox(api_key="sk_live_YOUR_KEY")

job = client.transcribe(url="https://example.com/podcast.mp3", diarize=True)
print(f"Transcription ID: {job['id']}")

# A local file instead of a URL: the SDK uploads it for you
# client.transcribe(file="meeting.mp3", language="en")
```

You'll get back a transcription ID immediately. The file downloads and processes in the background.

Optionally enable speaker diarization with `diarize: true`, and wire up automatic [webhooks](/docs/webhooks) via `webhook_url`. If you know how many speakers are on the recording, pass `speaker_count` along with `diarize`; providing it noticeably improves accuracy versus letting the model auto-detect. Word-level timestamps (`align`) are on by default; pass `align: false` to opt out. When `diarize: true`, alignment is always enabled (it's required for speaker assignment) regardless of what you pass.

**Pass `language` when you know it.** If you omit it, the model auto-detects, which usually works but can misclassify short clips, code-switched audio, or files that start with music. Passing the ISO code (e.g. `"language": "en"`) is both faster and more accurate. See the [language parameter notes](/docs/api-reference#important-notes) for details.

### Step 4: Get the result
Poll until the status is `completed` or `failed`. Typical transcriptions complete in under a minute.

```python
import time

while True:
    resp = requests.get(f"{BASE}/transcribe/{job['id']}",
        headers={"Authorization": API_KEY})
    result = resp.json()

    if result["status"] == "completed":
        print(result["result"]["full_transcript"])
        break
    elif result["status"] == "failed":
        print("Error:", result["error"])
        break

    time.sleep(5)
```

```javascript
// Poll until complete
let result;
while (true) {
  const res = await fetch(
    `${BASE}/transcribe/${job.id}`,
    { headers: { Authorization: API_KEY } }
  );
  result = await res.json();

  if (result.status === "completed") break;
  if (result.status === "failed") throw new Error(result.error.message);

  await new Promise((r) => setTimeout(r, 5000));
}

console.log(result.result.full_transcript);
```

```bash
curl "https://api.scriptivox.com/v1/transcribe/txn-456" \
  -H "Authorization: sk_live_YOUR_KEY"
```

```javascript
// Checks every few seconds until the job ends; throws TranscriptionFailedError if it failed
const done = await client.wait(job.id);
console.log(done.result.full_transcript);

// Captions straight from the API
const srt = await client.get(job.id, { format: "srt" });
```

```python
# Checks every few seconds until the job ends; raises TranscriptionFailedError if it failed
done = client.wait(job["id"])
print(done["result"]["full_transcript"])

# Captions straight from the API
srt = client.get(job["id"], format="srt")
```

The response includes the full transcript, timestamped utterances, word-level timestamps (alignment is on by default), and speaker labels when diarization is enabled:

```json
{
  "id": "txn-456",
  "status": "completed",
  "audio_duration_seconds": 120,
  "cost_cents": 0.666667,
  "result": {
    "full_transcript": "Hello, thanks for joining the call today...",
    "language": "en",
    "duration_seconds": 120,
    "speakers": ["SPEAKER 1", "SPEAKER 2"],
    "utterances": [
      {
        "start": 0.5,
        "end": 3.2,
        "text": "Hello, thanks for joining the call today.",
        "speaker": "SPEAKER 1",
        "confidence": 0.95,
        "words": [
          { "word": "Hello,", "start": 0.5, "end": 0.9, "confidence": 0.98, "speaker": "SPEAKER 1" },
          { "word": "thanks", "start": 1.0, "end": 1.3, "confidence": 0.97, "speaker": "SPEAKER 1" },
          { "word": "for", "start": 1.3, "end": 1.5, "confidence": 0.99, "speaker": "SPEAKER 1" },
          { "word": "joining", "start": 1.5, "end": 1.9, "confidence": 0.96, "speaker": "SPEAKER 1" },
          { "word": "the", "start": 2.0, "end": 2.1, "confidence": 0.99, "speaker": "SPEAKER 1" },
          { "word": "call", "start": 2.1, "end": 2.5, "confidence": 0.95, "speaker": "SPEAKER 1" },
          { "word": "today.", "start": 2.6, "end": 3.2, "confidence": 0.94, "speaker": "SPEAKER 1" }
        ]
      }
    ]
  }
}
```

---

> **Need to upload your own files?:** 
> If you don't have a public URL, you can upload files directly using the [file upload flow](/docs/api-reference#upload) in the API Reference.

## When something goes wrong

Failures arrive on two different paths, and a client that only handles one of them will silently lose jobs.

**Synchronous** errors come back on the call you just made, as JSON with a stable `code`:

```json
{
  "error": {
    "code": "ZERO_BALANCE",
    "message": "No balance found. Please deposit funds first.",
    "deposit_url": "https://platform.scriptivox.com/billing",
    "docs_url": "https://www.scriptivox.com/errors/api-no-balance",
    "help_id": "api-no-balance",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

`docs_url` opens the page that explains that exact error and what to do; `help_id` is its id ([Help pages](/docs/api-reference#help-pages)).

The ones worth handling by name on submit are `INVALID_API_KEY` (401: the key is missing, malformed or revoked), `INSUFFICIENT_BALANCE` and `ZERO_BALANCE` (402: top up on the [Billing page](/platform/billing)), `INVALID_REQUEST` (400: the body is wrong; the message says how), and `RATE_LIMIT_EXCEEDED` (429: wait for the seconds in `Retry-After`, then retry).

**Asynchronous** errors do not appear on submit at all. `POST /v1/transcribe` returns `status: "created"` before the file has been fetched, so anything about the file itself (an unreachable URL, a permission-gated Drive link, a corrupt container, a codec we cannot decode, a file over 5 GB or longer than 10 hours, or a recording with no audible speech) surfaces later on the poll:

```json
{
  "id": "txn-456",
  "status": "failed",
  "error": {
    "code": "URL_NOT_ACCESSIBLE",
    "message": "Google Drive could not find this file, or it is not shared with \"Anyone with the link\". Share it with \"Anyone with the link\" and try again, or upload the file.",
    "docs_url": "https://www.scriptivox.com/errors/drive-not-shared",
    "help_id": "drive-not-shared"
  }
}
```

The `docs_url` of a failed job is found from that job's own failure, so it is often finer than the code: here the page for a Google Drive file that is not shared, not the general page of `URL_NOT_ACCESSIBLE`.

Treat `status: "failed"` as a first-class outcome next to `"completed"`. Both are terminal; neither will change if you keep polling. Failed and cancelled jobs cost nothing (the reserved balance is released), so a retry after fixing the input is free.

## Retrying safely

Pass `Idempotency-Key` on `POST /v1/transcribe` and `POST /v1/upload`. If the same key arrives again within 24 hours you get the original job back instead of a second one, which makes a network timeout safe to retry. Without it, a retried submit is a second billable job.

## Polling without hammering

Poll no faster than once every few seconds: `GET /v1/transcribe/{id}` allows 200 requests per minute per key, and every response tells you where you stand:

```http
RateLimit-Policy: "endpoint";q=200;w=60, "ip";q=300;w=60
RateLimit: "endpoint";r=194;t=41
```

If you would rather not poll at all, register a `webhook_url` on the submit call and we will POST the finished transcription to you, HMAC-signed. See [Webhooks](/docs/webhooks).

## Supported input

26 file formats are accepted (MP3, WAV, FLAC, M4A, AAC, OGG, Opus, MP4, MOV, MKV, WebM among them), from 1 second to 10 hours long and at most 5 GB. Public URLs work, including Google Drive, Dropbox and OneDrive share links, as long as the link does not require a sign-in. 119 languages are supported; pass `language` whenever you know it.

## Next steps

- [API Reference](/docs/api-reference): Full endpoint documentation
- [Authentication](/docs/authentication): Keys, headers, rotation and what each 401 means
- [Webhooks](/docs/webhooks): Real-time completion notifications
- [CLI](/docs/cli): npx @scriptivox-api/cli for shells and scripts

---

<!-- source: https://platform.scriptivox.com/docs/api-reference -->
<!-- updated: 2026-08-25 -->

# API Reference

Complete reference for the Scriptivox transcription API. Every endpoint except `GET /v1` and [`GET /v1/status`](#service-status) requires an API key, passed in one of:

- `Authorization: sk_live_…` (the `Bearer` prefix is accepted but not required)
- `X-Api-Key: sk_live_…`

Header names are case-insensitive. Each account can have at most **5 active API keys** at a time. Revoke an unused key in the dashboard before creating a new one if you hit this ceiling.

**Base URL:** `https://api.scriptivox.com/v1`

**Service status:** whether the API is taking new jobs right now, with no key: [`GET /v1/status`](#service-status). Uptime and incident history at **[status.scriptivox.com](https://status.scriptivox.com)**.

---

## Transcribe

Send audio for transcription. You can either pass a URL (we download it) or upload your own file.

### From a URL

The simplest path: one POST request. We download the file, validate it, and start transcription automatically. Supports Google Drive, Dropbox, OneDrive and Yandex Disk sharing links, public YouTube, TikTok, Instagram, Facebook, X, Snapchat and Douyin posts, and podcast episodes: an Apple Podcasts episode link, or the episode's page on Buzzsprout, Acast, Transistor, Libsyn, Podbean or Spreaker. A podcast link is turned into the episode's audio file when you send it, so a show link, or an episode that is not in the show's public feed, is refused at once with `400 URL_NOT_ACCESSIBLE` and nothing is created or charged. Spotify links are refused the same way: Spotify does not let anyone download its audio.

### POST `/v1/transcribe`

Start a transcription from a public URL. The file is downloaded and validated in the background. Poll GET /v1/transcribe/{id} for status updates. Duration and cost are determined after download.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | Anonymously accessible http or https URL. An anonymous GET must return the raw file bytes, not an HTML preview, login form or password page. Direct and presigned URLs (S3, GCS, Azure SAS) always work. Share links work only when set to "anyone with the link can view": Google Drive, Dropbox files (not /scl/fo/ folder links), and OneDrive personal /redir or onedrive.live.com links. OneDrive 1drv.ms/v/c/ and /p/c/ photo shares cannot be used — Microsoft routes them through SharePoint Photos, which requires sign-in. A public post on YouTube, TikTok, Instagram, Facebook, X, Snapchat and Douyin also works: send the post's own link (a video or a reel). It is checked when you send it, and a post that is private, deleted or has no video is refused at once with 400 URL_NOT_ACCESSIBLE (see `error.reason`), with nothing created or charged. Maximum 2048 characters. |
| `language` | string | No | ISO 639-1 language code (with BCP-47 fallbacks such as `yue` and `kea`), e.g. "en", "es", "fr". Omit or pass null for auto-detection. Passing the language explicitly is recommended: it is faster (the model skips its detection pass) and avoids known auto-detect failure modes on short clips, code-switched audio, and files that open with music. Forcing a language the audio is not in can produce a translation rather than a transcription. Invalid codes return 400 INVALID_REQUEST. |
| `diarize` | boolean | No | Identify who said what and attach a speaker label to every utterance. Implies align: true, because speaker assignment needs word-level alignment. Default: false. |
| `speaker_count` | integer | No | Expected number of speakers. Requires diarize: true; passing it without diarize returns 400 INVALID_REQUEST. This is a soft prior, not a hard ceiling — the result may contain slightly more or fewer labels. Strongly recommended whenever the count is known: it measurably reduces over- and under-segmentation. Range: 1–50. |
| `align` | boolean | No | Produce word-level start/end timestamps plus per-word confidence where the alignment model supports it. Confidence is language-dependent and may be null. Ignored (treated as true) when diarize is true. Default: true. |
| `webhook_url` | string | No | URL to receive the job's webhooks (processing, then completed or failed). Must be https://. Signed with the key's webhook signing secret and retried with backoff until your server answers 2xx — see https://platform.scriptivox.com/docs/webhooks. |
| `speech_threshold` | number | No | The share of the audio, from 0 to 1, that must be speech. Below it the job fails with SPEECH_BELOW_THRESHOLD and is not charged. Without it, a file with no speech (silence, music or noise only) completes with an empty transcript and `result.no_speech: true`, and is charged on its length. The share is measured reliably from about 30 seconds of audio. 0 is the same as not setting it. Range: 0–1. |

**Response:**

```json
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "created",
  "message": "Transcription created. The file will be downloaded and processed. Poll GET /v1/transcribe/{id} for status updates."
}
```

**Code Examples:**

```python
resp = requests.post("https://api.scriptivox.com/v1/transcribe",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={
        "url": "https://example.com/podcast-episode.mp3",
        "diarize": True,
        "language": "en"
    })
job = resp.json()

# Poll for status
import time
while True:
    result = requests.get(
        f"https://api.scriptivox.com/v1/transcribe/{job['id']}",
        headers={"Authorization": "sk_live_YOUR_KEY"}).json()
    if result["status"] in ("completed", "failed"):
        break
    time.sleep(5)
```

```javascript
const resp = await fetch("https://api.scriptivox.com/v1/transcribe", {
  method: "POST",
  headers: {
    Authorization: "sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/podcast-episode.mp3",
    diarize: true,
    language: "en",
  }),
});
const job = await resp.json();
```

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/podcast-episode.mp3",
    "diarize": true,
    "language": "en"
  }'
```

### Social posts

Send the post's own link (a video or a reel) from YouTube, TikTok, Instagram, Facebook, X, Snapchat or Douyin. The post is checked when you send it, the same check the Scriptivox website runs, so this call takes a few seconds. A good post is answered `200` with `status: "created"` like any other link, and its video is downloaded in the background.

A post that can't be transcribed is refused at once: nothing is created or charged, `error.reason` says why and `error.platform` names the site. Sending the same link again gives the same answer.

```json
HTTP/1.1 400 Bad Request

{
  "error": {
    "code": "URL_NOT_ACCESSIBLE",
    "message": "This link could not be checked. It may be private, deleted or not available in your region.",
    "reason": "link_not_verifiable",
    "platform": "instagram",
    "request_id": "req_6fe725fffa7d9b98",
    "docs_url": "https://www.scriptivox.com/errors/social-post-unavailable",
    "help_id": "social-post-unavailable"
  }
}
```

| `error.reason` | Meaning |
| --- | --- |
| `link_not_verifiable` | The post is private, deleted or not available in your region. |
| `link_not_found` | The video can't be opened. Check that it plays in a browser. |
| `link_unsupported` | The link is not a video, for example a Facebook Page or a profile. Open the video itself and send its own link. |
| `link_no_media` | The post has no audio or video, for example a photo post. |

If the link check is busy or does not answer, the answer is `503 LINK_CHECK_UNAVAILABLE` with a `Retry-After` header: send the same request again after that many seconds. All the codes are in [error codes](#error-codes).

### From a file upload

Upload your own file when you need full control or don't have a public URL.

### POST `/v1/upload`

Get a presigned URL to upload an audio or video file. The URL expires in 1 hour. Upload your file to the returned URL with a PUT request, then pass the upload_id to POST /v1/transcribe.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `filename` | string | Yes | Name of the file being uploaded, e.g. "meeting.mp3". ASCII only, no path separators, and it must carry a supported extension. Maximum 255 characters. |

**Response:**

```json
{
  "upload_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "upload_url": "https://uploads.example/presigned-url",
  "expires_in": 3600,
  "method": "PUT",
  "headers": {
    "Content-Type": "audio/mpeg"
  }
}
```

**Code Examples:**

```python
import requests

resp = requests.post("https://api.scriptivox.com/v1/upload",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={"filename": "meeting.mp3"})
upload = resp.json()

with open("meeting.mp3", "rb") as f:
    requests.put(upload["upload_url"],
        headers=upload["headers"], data=f)
```

```javascript
const resp = await fetch("https://api.scriptivox.com/v1/upload", {
  method: "POST",
  headers: {
    Authorization: "sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ filename: "meeting.mp3" }),
});
const upload = await resp.json();

await fetch(upload.upload_url, {
  method: "PUT",
  headers: upload.headers,
  body: fileBuffer,
});
```

```bash
curl -X POST https://api.scriptivox.com/v1/upload \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename": "meeting.mp3"}'

# Then upload the file:
curl -X PUT "<upload_url>" \
  -H "Content-Type: audio/mpeg" \
  --data-binary @meeting.mp3
```

### POST `/v1/transcribe`

Start a transcription from an uploaded file. Pass the upload_id from POST /v1/upload. The file is validated in the background. Poll GET /v1/transcribe/{id} for status updates. Duration and cost are determined after validation.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `upload_id` | string | Yes | The upload_id returned by POST /v1/upload. |
| `language` | string | No | ISO 639-1 language code (with BCP-47 fallbacks such as `yue` and `kea`), e.g. "en", "es", "fr". Omit or pass null for auto-detection. Passing the language explicitly is recommended: it is faster (the model skips its detection pass) and avoids known auto-detect failure modes on short clips, code-switched audio, and files that open with music. Forcing a language the audio is not in can produce a translation rather than a transcription. Invalid codes return 400 INVALID_REQUEST. |
| `diarize` | boolean | No | Identify who said what and attach a speaker label to every utterance. Implies align: true, because speaker assignment needs word-level alignment. Default: false. |
| `speaker_count` | integer | No | Expected number of speakers. Requires diarize: true; passing it without diarize returns 400 INVALID_REQUEST. This is a soft prior, not a hard ceiling — the result may contain slightly more or fewer labels. Strongly recommended whenever the count is known: it measurably reduces over- and under-segmentation. Range: 1–50. |
| `align` | boolean | No | Produce word-level start/end timestamps plus per-word confidence where the alignment model supports it. Confidence is language-dependent and may be null. Ignored (treated as true) when diarize is true. Default: true. |
| `webhook_url` | string | No | URL to receive the job's webhooks (processing, then completed or failed). Must be https://. Signed with the key's webhook signing secret and retried with backoff until your server answers 2xx — see https://platform.scriptivox.com/docs/webhooks. |
| `speech_threshold` | number | No | The share of the audio, from 0 to 1, that must be speech. Below it the job fails with SPEECH_BELOW_THRESHOLD and is not charged. Without it, a file with no speech (silence, music or noise only) completes with an empty transcript and `result.no_speech: true`, and is charged on its length. The share is measured reliably from about 30 seconds of audio. 0 is the same as not setting it. Range: 0–1. |

**Response:**

```json
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "created",
  "message": "Transcription created. The file will be validated and processed. Poll GET /v1/transcribe/{id} for status updates."
}
```

**Code Examples:**

```python
resp = requests.post("https://api.scriptivox.com/v1/transcribe",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={
        "upload_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "diarize": True,
        "speaker_count": 2,
        "language": "en"
    })
job = resp.json()

# Poll for status
import time
while True:
    result = requests.get(
        f"https://api.scriptivox.com/v1/transcribe/{job['id']}",
        headers={"Authorization": "sk_live_YOUR_KEY"}).json()
    if result["status"] in ("completed", "failed"):
        break
    time.sleep(5)
```

```javascript
const resp = await fetch("https://api.scriptivox.com/v1/transcribe", {
  method: "POST",
  headers: {
    Authorization: "sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    upload_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    diarize: true,
    speaker_count: 2,
    language: "en",
  }),
});
const job = await resp.json();
// Poll GET /v1/transcribe/{job.id} for status updates
```

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "upload_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "diarize": true,
    "speaker_count": 2
  }'
```

### Again, from an earlier job

Transcribe a finished job again with other options, such as another `language` or speaker labels, from the audio Scriptivox still holds: no upload and no download. A job's audio is kept for 24 hours after the job ends. Within that time, pass the job's id as `source_transcription_id`. The new job is a new transcription, charged like any other, and the earlier job and its transcript stay as they are.

### POST `/v1/transcribe`

Start a transcription from the audio of an earlier completed job of yours. Pass its id as source_transcription_id, with this request's own options. Poll GET /v1/transcribe/{id} for status updates. Duration and cost are determined after validation.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `source_transcription_id` | string | Yes | The id of a completed transcription of yours that ended less than 24 hours ago. A job not completed: 400 INVALID_REQUEST with `error.current_status`; not yours or deleted: 404 TRANSCRIPTION_NOT_FOUND; its audio deleted: 409 SOURCE_EXPIRED. |
| `language` | string | No | ISO 639-1 language code (with BCP-47 fallbacks such as `yue` and `kea`), e.g. "en", "es", "fr". Omit or pass null for auto-detection. Passing the language explicitly is recommended: it is faster (the model skips its detection pass) and avoids known auto-detect failure modes on short clips, code-switched audio, and files that open with music. Forcing a language the audio is not in can produce a translation rather than a transcription. Invalid codes return 400 INVALID_REQUEST. |
| `diarize` | boolean | No | Identify who said what and attach a speaker label to every utterance. Implies align: true, because speaker assignment needs word-level alignment. Default: false. |
| `speaker_count` | integer | No | Expected number of speakers. Requires diarize: true; passing it without diarize returns 400 INVALID_REQUEST. This is a soft prior, not a hard ceiling — the result may contain slightly more or fewer labels. Strongly recommended whenever the count is known: it measurably reduces over- and under-segmentation. Range: 1–50. |
| `align` | boolean | No | Produce word-level start/end timestamps plus per-word confidence where the alignment model supports it. Confidence is language-dependent and may be null. Ignored (treated as true) when diarize is true. Default: true. |
| `webhook_url` | string | No | URL to receive the job's webhooks (processing, then completed or failed). Must be https://. Signed with the key's webhook signing secret and retried with backoff until your server answers 2xx — see https://platform.scriptivox.com/docs/webhooks. |
| `speech_threshold` | number | No | The share of the audio, from 0 to 1, that must be speech. Below it the job fails with SPEECH_BELOW_THRESHOLD and is not charged. Without it, a file with no speech (silence, music or noise only) completes with an empty transcript and `result.no_speech: true`, and is charged on its length. The share is measured reliably from about 30 seconds of audio. 0 is the same as not setting it. Range: 0–1. |

**Response:**

```json
{
  "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
  "status": "created",
  "message": "Transcription created from the audio of transcription b2c3d4e5-f6a7-8901-bcde-f12345678901. It will be validated and processed. Poll GET /v1/transcribe/{id} for status updates."
}
```

**Code Examples:**

```python
# The same recording again, in Spanish with speaker labels: no upload, no download.
resp = requests.post("https://api.scriptivox.com/v1/transcribe",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={
        "source_transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "language": "es",
        "diarize": True
    })
job = resp.json()
if resp.status_code == 409 and job["error"]["code"] == "SOURCE_EXPIRED":
    pass  # the audio is gone: send the file again with upload_id or url
```

```javascript
// The same recording again, in Spanish with speaker labels: no upload, no download.
const resp = await fetch("https://api.scriptivox.com/v1/transcribe", {
  method: "POST",
  headers: {
    Authorization: "sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    source_transcription_id: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    language: "es",
    diarize: true,
  }),
});
const job = await resp.json();
// 409 SOURCE_EXPIRED: the audio is gone; send the file again with upload_id or url
```

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "language": "es",
    "diarize": true
  }'
```

- **The options are this request's own.** Nothing is copied from the earlier job: leave out `language` and the language is detected again.
- **After 24 hours** the answer is `409 SOURCE_EXPIRED` and nothing is created or charged: send the file again with `upload_id` or `url`.
- **Only a `completed` job.** A job in another status answers `400 INVALID_REQUEST` with `error.current_status`; an id that is not one of yours answers `404 TRANSCRIPTION_NOT_FOUND`.
- **`Idempotency-Key`** works as on any start: the same key and body give the same job.

---

## Get result

### GET `/v1/transcribe/{id}`

Get the status and result of a transcription. Poll this endpoint until status is completed or failed, or use webhooks for real-time notifications. Pass ?format=srt|vtt|text to export the transcript directly as captions or plain text instead of JSON.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Transcription ID returned by POST /v1/transcribe. |
| `format` | string | No | Output format. `json` (default) returns the full structured response and works at any status. `srt`, `vtt` and `text` return the transcript directly with the matching Content-Type and require status=completed; otherwise they return 400 INVALID_REQUEST with the job's status in `error.current_status`. |
| `max_words` | integer | No | Caption segmentation: maximum words per cue. Only applies to format=srt\|vtt (format=text is built from whole utterances and ignores the segmentation options). Whichever of max_words, max_chars and max_duration is exceeded first ends the cue. Range: 1–50. Default: 4. |
| `max_chars` | integer | No | Caption segmentation: maximum characters per cue. The subtitle convention is about 80 (roughly 37 characters across two lines). Range: 10–500. Default: 80. |
| `max_duration` | integer | No | Caption segmentation: maximum seconds a single cue stays on screen. Range: 1–60. Default: 10. |
| `sentence_aware` | boolean | No | Caption segmentation: end a cue at sentence-ending punctuation (. ! ?). Produces more natural breaks at the cost of more variable cue lengths. Default: true. |
| `include_speakers` | string | No | Whether cues are prefixed with the speaker label. `auto` includes labels only when the job has more than one distinct speaker. Only meaningful for jobs created with diarize: true. One of: "true", "false", "auto". Default: auto. |
| `strip_chars` | string | No | Characters to remove from cue text before output, e.g. `strip_chars=,.` drops all commas and periods. Maximum 32 characters. |
| `include_timestamps` | boolean | No | format=text only: return one paragraph per utterance, each starting with its start time, e.g. `[02:14] Speaker 1: …` (`[01:02:14]` once the transcript reaches an hour). srt and vtt always include timestamps; json carries them as fields. Default: false. |

**Response:**

```json
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "completed",
  "audio_duration_seconds": 120,
  "file_size_bytes": 1920000,
  "language": "en",
  "diarize": true,
  "speaker_count": 2,
  "align": true,
  "cost_cents": 0.666667,
  "source_url": "https://example.com/podcast.mp3",
  "progress": "Transcription completed successfully.",
  "created_at": "2025-01-15T10:30:00Z",
  "started_at": "2025-01-15T10:30:01Z",
  "completed_at": "2025-01-15T10:30:45Z",
  "result": {
    "full_transcript": "Hello, thanks for joining...",
    "language": "en",
    "duration_seconds": 120,
    "speakers": ["SPEAKER 1", "SPEAKER 2"],
    "utterances": [
      {
        "start": 0.5,
        "end": 3.2,
        "text": "Hello, thanks for joining the call today.",
        "speaker": "SPEAKER 1",
        "confidence": 0.95,
        "words": [
          {
            "word": "Hello,",
            "start": 0.5,
            "end": 0.9,
            "confidence": 0.98,
            "speaker": "SPEAKER 1"
          }
        ]
      }
    ]
  }
}
```

**Code Examples:**

```python
resp = requests.get(
    f"https://api.scriptivox.com/v1/transcribe/{job['id']}",
    headers={"Authorization": "sk_live_YOUR_KEY"})
result = resp.json()

if result["status"] == "completed":
    print(result["result"]["full_transcript"])
```

```javascript
const resp = await fetch(
  `https://api.scriptivox.com/v1/transcribe/${job.id}`,
  { headers: { Authorization: "sk_live_YOUR_KEY" } }
);
const result = await resp.json();

if (result.status === "completed") {
  console.log(result.result.full_transcript);
}
```

```bash
curl "https://api.scriptivox.com/v1/transcribe/b2c3d4e5-f6a7-8901-bcde-f12345678901" \
  -H "Authorization: sk_live_YOUR_KEY"
```

### Status values

The status lifecycle is `created → downloading` (URL flow only) `→ processing → completed | failed`.

| Status | Description |
| --- | --- |
| `created` | Job accepted. Download (URL flow) or validation (upload flow) is about to start. |
| `downloading` | URL flow only: the file is being fetched from the provided URL. |
| `pending` | Job accepted, not being transcribed yet. Rarely seen: treat it as in progress, like `created`. |
| `processing` | The file has been validated and is being transcribed. |
| `completed` | Transcription finished successfully. The `result` object is now populated. |
| `failed` | The job failed. Inspect `error.code` and `error.message`. |

When the service is busy, a job can stay `created` for a few minutes before it starts. It starts by itself: keep polling (or wait for the webhook), and do not send it again.

### Why a job is waiting

While a job waits for its turn, or for a later try at a Google Drive link, `GET /v1/transcribe/{id}` and each item of `GET /v1/transcriptions` add `waiting`, and `progress` gives the reason in a sentence you can show as it is. The `status` keeps its value (`created` or `downloading`), and `waiting` is gone once the job starts. It starts by itself: nothing needs to be sent again.

- `waiting.reason`: why it waits (below). New values may be added: show `progress` for a value you do not know.
- `waiting.since`: when it began to wait (UTC). For `drive_retry`, when Google Drive did not send the file; otherwise when the job first had to wait for its turn.
- `waiting.retry_at`: for `drive_retry`, when the next try is planned (UTC); `null` otherwise.

| `waiting.reason` | Why the job waits |
| --- | --- |
| `account_drive_limit` | This account's Google Drive links download 3 at a time, and this one starts when one of them finishes. |
| `account_download_limit` | This account already has as many files being fetched and prepared at once as it can; this one starts when one of them finishes. |
| `busy` | Many jobs are running for everyone; this one starts in a few minutes. |
| `drive_retry` | Google Drive did not send the file just now, and it is tried again at `retry_at`. Nothing is charged while it waits. |

### Checking efficiently

- **`Retry-After` while a job runs.** The answer for a job that has not finished may carry a `Retry-After` header: check again after that many seconds. It is a few seconds just after the job is sent or starts to be transcribed, then about 10 seconds, more for a long file. The official SDKs' `wait()` follows it (Node and Python 0.5.0 and later).
- **`ETag` once it is finished.** The answer for a `completed` or `failed` job may carry an `ETag` header. Send it back in an `If-None-Match` header and, as long as the job is unchanged, the answer is `304 Not Modified` with no body, so a long transcript is not sent to you again. Each `format` and set of export options has its own `ETag`.

Both are optional: a client that ignores them gets the same answers as before.

### Caption / text export

`GET /v1/transcribe/{id}?format=srt|vtt|text` returns the transcript in the requested format with the appropriate `Content-Type`:

| `format` | Content-Type | Body |
| --- | --- | --- |
| `json` (default) | `application/json` | Full structured response with `result.utterances[]` |
| `srt` | `text/plain; charset=utf-8` | SubRip Text |
| `vtt` | `text/vtt; charset=utf-8` | WebVTT, with `<v Speaker>` voice tags when speaker labels are shown |
| `text` | `text/plain; charset=utf-8` | Plain text. Diarized jobs get a `Speaker:` prefix per turn with blank lines between turns. |

`srt`, `vtt`, and `text` require `status=completed`; otherwise returns `400 INVALID_REQUEST`, with the job's status in `error.current_status` (for example `processing` or `failed`). JSON format works at any status.

#### Segmentation controls

The caption formats (`srt` and `vtt`) accept the same segmentation knobs as the dashboard's Advanced Export modal. Pass them as query params alongside `format`. `format=text` is built from whole utterances: it uses `include_speakers`, `strip_chars` and `include_timestamps`, and ignores the four segmentation knobs.

| Param | Default | Range | Effect |
| --- | --- | --- | --- |
| `max_words` | 4 | 1–50 | Maximum words per cue. Only applies to format=srt/vtt (format=text is built from whole utterances and ignores the segmentation options). Whichever of max_words, max_chars and max_duration is exceeded first ends the cue. |
| `max_chars` | 80 | 10–500 | Maximum characters per cue. The subtitle convention is about 80 (roughly 37 characters across two lines). |
| `max_duration` | 10 | 1–60 | Maximum seconds a single cue stays on screen. |
| `sentence_aware` | `true` | `true` / `false` | End a cue at sentence-ending punctuation (. ! ?). Produces more natural breaks at the cost of more variable cue lengths. |
| `include_speakers` | `auto` | `true` / `false` / `auto` | Whether cues are prefixed with the speaker label. `auto` includes labels only when the job has more than one distinct speaker. Only meaningful for jobs created with diarize: true. |
| `strip_chars` | (empty) | up to 32 chars | Characters to remove from cue text before output, e.g. `strip_chars=,.` drops all commas and periods. |
| `include_timestamps` | `false` | `true` / `false` | format=text only: return one paragraph per utterance, each starting with its start time, e.g. `[02:14] Speaker 1: …` (`[01:02:14]` once the transcript reaches an hour). srt and vtt always include timestamps; json carries them as fields. |

Whichever of `max_words`, `max_chars`, `max_duration` is exceeded **first** ends the current cue. `sentence_aware` adds a sentence-ending punctuation rule on top of those.

**Examples:**

```bash
# Short cues (TikTok-style, max 3 words, 2.5s each, no sentence-awareness)
curl "https://api.scriptivox.com/v1/transcribe/{id}?format=srt&max_words=3&max_duration=3&sentence_aware=false" \
  -H "Authorization: sk_live_YOUR_KEY"

# Standard SRT with default settings
curl "https://api.scriptivox.com/v1/transcribe/{id}?format=srt" \
  -H "Authorization: sk_live_YOUR_KEY"

# WebVTT, always show speaker tags, strip filler punctuation
curl "https://api.scriptivox.com/v1/transcribe/{id}?format=vtt&include_speakers=true&strip_chars=,." \
  -H "Authorization: sk_live_YOUR_KEY"

# Plain text without speaker prefixes
curl "https://api.scriptivox.com/v1/transcribe/{id}?format=text&include_speakers=false" \
  -H "Authorization: sk_live_YOUR_KEY"

# Plain text with a timestamp at the start of every paragraph
curl "https://api.scriptivox.com/v1/transcribe/{id}?format=text&include_timestamps=true" \
  -H "Authorization: sk_live_YOUR_KEY"
```

When the job was made with `align: false` (no per-word timestamps), the segmentation falls back to utterance-level: `max_words`/`max_chars`/`max_duration` still cap each cue but cuts can only happen at utterance boundaries. For best segmentation control, keep `align` on (the default).

---

## List transcriptions

### GET `/v1/transcriptions`

List your transcriptions with optional filters and cursor-based pagination. Newest first by default. Soft-deleted transcriptions are excluded.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | No | Only return jobs in this status. One of: "created", "downloading", "pending", "processing", "completed", "failed". |
| `from` | string | No | Inclusive lower bound on created_at. An ISO 8601 timestamp. |
| `to` | string | No | Exclusive upper bound on created_at. An ISO 8601 timestamp. |
| `limit` | integer | No | Page size. Range: 1–200. Default: 50. |
| `order` | string | No | Sort direction on created_at. One of: "desc", "asc". Default: desc. |
| `cursor` | string | No | Opaque cursor from the next_cursor field of a previous response. |

**Response:**

```json
{
  "items": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "status": "completed",
      "audio_duration_seconds": 120,
      "file_size_bytes": 1920000,
      "language": "en",
      "diarize": true,
      "speaker_count": 2,
      "align": true,
      "cost_cents": 0.666667,
      "created_at": "2026-05-18T10:30:00Z",
      "started_at": "2026-05-18T10:30:01Z",
      "completed_at": "2026-05-18T10:30:45Z",
      "source_url": "https://example.com/podcast.mp3"
    }
  ],
  "next_cursor": "eyJ0IjoiMjAyNi0wNS0xOFQxMDozMDowMFoiLCJpIjoiYjJjM2Q0ZTUtZjZhNy04OTAxLWJjZGUtZjEyMzQ1Njc4OTAxIn0="
}
```

**Code Examples:**

```python
resp = requests.get(
    "https://api.scriptivox.com/v1/transcriptions",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    params={"status": "completed", "limit": 20})
page = resp.json()

for item in page["items"]:
    print(item["id"], item["status"])

if page["next_cursor"]:
    # fetch the next page
    resp = requests.get(
        "https://api.scriptivox.com/v1/transcriptions",
        headers={"Authorization": "sk_live_YOUR_KEY"},
        params={"cursor": page["next_cursor"]})
```

```javascript
const url = new URL("https://api.scriptivox.com/v1/transcriptions");
url.searchParams.set("status", "completed");
url.searchParams.set("limit", "20");

const resp = await fetch(url, {
  headers: { Authorization: "sk_live_YOUR_KEY" },
});
const page = await resp.json();

for (const item of page.items) {
  console.log(item.id, item.status);
}
```

```bash
curl "https://api.scriptivox.com/v1/transcriptions?status=completed&limit=20" \
  -H "Authorization: sk_live_YOUR_KEY"
```

Each `item` matches the shape of `GET /v1/transcribe/{id}` **except** that the heavy `result` object is omitted; fetch individual transcriptions for the full transcript. Pagination is stable across new inserts: pass the `next_cursor` value from the response into the `cursor` query param to get the next page. `next_cursor` is `null` when there are no more pages.

---

## Cancel transcription

### POST `/v1/transcribe/{id}/cancel`

Stop a transcription before it starts transcribing. Fires the transcription.failed webhook (if configured) with error.code=CANCELLED. You are not charged. Idempotent: calling cancel on an already-cancelled job returns the same response.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Transcription ID returned by POST /v1/transcribe. |

**Response:**

```json
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "failed",
  "error": {
    "code": "CANCELLED",
    "message": "Cancelled by customer"
  },
  "released_cents": 0
}
```

**Code Examples:**

```python
requests.post(
    f"https://api.scriptivox.com/v1/transcribe/{transcription_id}/cancel",
    headers={"Authorization": "sk_live_YOUR_KEY"})
```

```javascript
await fetch(`https://api.scriptivox.com/v1/transcribe/${id}/cancel`, {
  method: "POST",
  headers: { Authorization: "sk_live_YOUR_KEY" },
});
```

```bash
curl -X POST "https://api.scriptivox.com/v1/transcribe/<id>/cancel" \
  -H "Authorization: sk_live_YOUR_KEY"
```

Cancel is allowed while the job is in `created`, `downloading` or `pending` state, before transcription starts; you are not charged. Once the job is `processing`, it is already being transcribed: cancel returns `409 CONFLICT`, and the job finishes on its own and is charged only if it completes (delete it afterwards if you don't need it). Cancelling a `completed` or `failed` job also returns `409 CONFLICT`.

---

## Resend a webhook

### POST `/v1/transcribe/{id}/webhook/resend`

Send a finished job's final webhook (transcription.completed or transcription.failed) again now, with the same X-Scriptivox-Delivery id. One try; automatic retries still left carry on as scheduled. Answers 200 when the try was made; delivered says whether your server answered 2xx.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Transcription ID returned by POST /v1/transcribe. |

**Response:**

```json
{
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "delivery_id": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
  "event": "transcription.completed",
  "attempt": 4,
  "delivered": true,
  "response_code": 200,
  "error": null,
  "duration_ms": 231,
  "status": "succeeded",
  "next_attempt_at": null
}
```

**Code Examples:**

```python
requests.post(
    f"https://api.scriptivox.com/v1/transcribe/{transcription_id}/webhook/resend",
    headers={"Authorization": "sk_live_YOUR_KEY"})
```

```javascript
await fetch(`https://api.scriptivox.com/v1/transcribe/${id}/webhook/resend`, {
  method: "POST",
  headers: { Authorization: "sk_live_YOUR_KEY" },
});
```

```bash
curl -X POST "https://api.scriptivox.com/v1/transcribe/<id>/webhook/resend" \
  -H "Authorization: sk_live_YOUR_KEY"
```

A job that finished without a webhook URL is sent to your account's default webhook URL; with neither, the call returns `400 INVALID_REQUEST`. A job still in progress returns `409 CONFLICT`: its final event is sent when it finishes. See [Webhooks: delivery behavior](/docs/webhooks#delivery-behavior).

---

## Send a test webhook

### POST `/v1/webhooks/test`

Send a signed webhook.test event to url (or, without one, to your account's default webhook URL) now, with the same headers as real events. One try. Use it to check your endpoint and your signature check before going live.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | No | Where to send the test event (https:// only). Without it, your account's default webhook URL is used. |

**Response:**

```json
{
  "url": "https://example.com/webhooks/scriptivox",
  "delivery_id": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d",
  "event": "webhook.test",
  "attempt": 1,
  "delivered": false,
  "response_code": 401,
  "error": "HTTP 401",
  "duration_ms": 118,
  "status": "failed",
  "next_attempt_at": null
}
```

**Code Examples:**

```python
requests.post(
    "https://api.scriptivox.com/v1/webhooks/test",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={"url": "https://example.com/webhooks/scriptivox"})
```

```javascript
await fetch("https://api.scriptivox.com/v1/webhooks/test", {
  method: "POST",
  headers: { Authorization: "sk_live_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ url: "https://example.com/webhooks/scriptivox" }),
});
```

```bash
curl -X POST "https://api.scriptivox.com/v1/webhooks/test" \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/webhooks/scriptivox"}'
```

---

## Send feedback on a job

### POST `/v1/transcribe/{id}/feedback`

Rate a completed transcription from 1 to 5, report a problem with any of your transcriptions, or both in one call, or report that \

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Transcription ID returned by POST /v1/transcribe. |
| `rating` | integer | No | How good the transcript is, 1 (poor) to 5 (excellent). Completed jobs only. Needs comment or their_words, at least 20 characters. Range: 1–5. |
| `topics` | array | No | Optional: what the feedback is about. |
| `comment` | string | No | What made it that rating, in words. With a rating: comment or their_words, at least 20 characters. With report_no_speech: what is in the recording, when their_words is empty. Maximum 1000 characters. |
| `their_words` | string | No | Your end user's own words, unchanged, if you have them. Counts as the words for a rating, a problem report or report_no_speech. Maximum 1000 characters. |
| `problem` | boolean | No | true to report a problem with this job (failed, empty or wrong). Needs what_happened. |
| `what_happened` | string | No | What went wrong, for a problem report: what_happened or their_words, at least 20 characters. Maximum 1000 characters. |
| `report_no_speech` | boolean | No | true when the job's result says no_speech: true but the file has speech; the team checks the file within 24 hours. Send it on its own (no rating, no problem), with their_words or comment saying what is in the recording, at least 20 characters. At most 3 a day per account. |

**Response:**

```json
{
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "rating_saved": true,
  "problem_report": {
    "id": "7d1e2f3a-4b5c-4d6e-8f70-819a2b3c4d5e",
    "status": "open",
    "added_to_open_report": false,
    "opened_by_rating": true
  }
}
```

**Code Examples:**

```python
requests.post(
    f"https://api.scriptivox.com/v1/transcribe/{transcription_id}/feedback",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={"rating": 2, "topics": ["speakers"], "comment": "Speaker labels are swapped after minute 3."})
```

```javascript
await fetch(`https://api.scriptivox.com/v1/transcribe/${id}/feedback`, {
  method: "POST",
  headers: { Authorization: "sk_live_YOUR_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({ problem: true, what_happened: "The job failed twice on the same file." }),
});
```

```bash
curl -X POST "https://api.scriptivox.com/v1/transcribe/<id>/feedback" \
  -H "Authorization: sk_live_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"rating": 5, "comment": "Every name and number was right."}'
```

Every feedback needs words, at least 20 characters: a rating needs `comment` or `their_words` (what made it that rating), a problem report `what_happened` or `their_words`. Without them the answer is `400 INVALID_REQUEST` with "A rating needs words: comment or their_words, at least 20 characters." Topics are optional: `accuracy`, `clarity`, `speakers`, `timing`, `language`, `formatting`, `other`.

A second rating of the same job replaces the first. A rating of 1 or 2 also opens a problem report, so it is looked at within the same 24 hours. Send `problem: true` with `what_happened` for a job that failed, came back empty, or is wrong; a report on a job whose report is still open is added to it. A rating on a job that has not completed returns `409 CONFLICT`. At most 5 new problem reports a day per account (`429 RATE_LIMIT_EXCEEDED` after that).

If a kind of feedback is switched off, what you send is kept as the nearest kind that is on, so your words are never lost: `rating_saved` is `false`, `saved_as` names the kind it was kept as (a rating of 1 or 2 becomes a problem report), and `notice` says so. If no other kind can keep it, the answer is `409 CONFLICT`.

**"No speech" was wrong.** A job whose result says `no_speech: true` completed with an empty transcript. If the file does have speech, send `report_no_speech: true` on its own (no `rating`, no `problem`) with `their_words` or `comment` saying what is in the recording, at least 20 characters. The team checks the file within 24 hours, and the reply goes to your account's email.

```bash
curl -X POST "https://api.scriptivox.com/v1/transcribe/<id>/feedback" \
  -H "Authorization: sk_live_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"report_no_speech": true, "their_words": "A 10-minute interview in Spanish, two people talking."}'
```

The answer has `no_speech_reported: true`. A second report on the same job answers `already_reported: true` and sends nothing new. A job not marked no speech returns `409 CONFLICT` (send a problem report instead). At most 3 of these reports a day per account (`429 RATE_LIMIT_EXCEEDED` after that).

---

## Delete transcription

### DELETE `/v1/transcribe/{id}`

Soft-delete a completed or failed transcription. Removes the stored transcript from our storage. The job record is kept for 7 days for audit, then hard-deleted. In-flight jobs cannot be deleted; cancel them first.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Parameters:**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Transcription ID returned by POST /v1/transcribe. |

**Response:**

```json
(204 No Content: empty body)
```

**Code Examples:**

```python
requests.delete(
    f"https://api.scriptivox.com/v1/transcribe/{transcription_id}",
    headers={"Authorization": "sk_live_YOUR_KEY"})
```

```javascript
await fetch(`https://api.scriptivox.com/v1/transcribe/${id}`, {
  method: "DELETE",
  headers: { Authorization: "sk_live_YOUR_KEY" },
});
```

```bash
curl -X DELETE "https://api.scriptivox.com/v1/transcribe/<id>" \
  -H "Authorization: sk_live_YOUR_KEY"
```

Returns `204 No Content` on success. Idempotent: deleting an already-deleted transcription also returns 204. Trying to delete an in-flight transcription returns `409 CONFLICT` with a message telling you to cancel first.

---

## Balance

A balance above zero is required to **start** an upload or submit a transcription: `POST /v1/upload` and `POST /v1/transcribe` return `402 ZERO_BALANCE` when your balance is $0 or below. `balance_cents` can be below zero after a refunded deposit. The exact cost is reserved once the audio duration is known (after download/validation), not on submission.

**Auto top-up.** In **Add Funds** or on the [Billing page](/platform/billing) you can save a card and turn on auto top-up: each time `available_cents` falls below your threshold, we charge the card your top-up amount. `auto_topup` in the response shows whether it is on and its two amounts. The check runs after each job's cost is reserved and charged, on `GET /v1/balance`, and every few minutes, so a top-up shows on a later call. See [Pricing](/docs/pricing#auto-top-up).

### GET `/v1/balance`

Returns your current account balance in cents, the amount reserved for in-progress transcriptions, the amount available for new jobs, and an estimate of remaining hours at the current per-hour price.

**Authentication:** `Authorization: sk_live_YOUR_KEY`

**Response:**

```json
{
  "balance_cents": 1500,
  "reserved_cents": 100,
  "available_cents": 1400,
  "price_per_hour_cents": 20,
  "estimated_hours_available": 70,
  "deposit_url": "https://platform.scriptivox.com/billing",
  "updated_at": "2025-01-15T10:30:00Z",
  "auto_topup": {
    "enabled": true,
    "threshold_cents": 500,
    "amount_cents": 2000
  }
}
```

**Code Examples:**

```python
resp = requests.get("https://api.scriptivox.com/v1/balance",
    headers={"Authorization": "sk_live_YOUR_KEY"})
balance = resp.json()
print(f"Available: ${balance['available_cents'] / 100:.2f}")
print(f"Hours remaining: {balance['estimated_hours_available']:.1f}")
```

```javascript
const resp = await fetch("https://api.scriptivox.com/v1/balance", {
  headers: { Authorization: "sk_live_YOUR_KEY" },
});
const balance = await resp.json();
console.log(`Available: $${(balance.available_cents / 100).toFixed(2)}`);
console.log(`Hours remaining: ${balance.estimated_hours_available.toFixed(1)}`);
```

```bash
curl https://api.scriptivox.com/v1/balance \
  -H "Authorization: sk_live_YOUR_KEY"
```

---

## Service status

`GET /v1/status` says whether the API is taking new jobs right now. It needs **no API key**, so a monitor or a health check can call it without using your key's limits; it is limited per IP instead (see [Rate Limits](#rate-limits)).

- `status` is `operational`, `maintenance` or `unknown`. `unknown` means the state could not be checked just now. It does not mean the API is down.
- `accepting_new_jobs` is `false` while `POST /v1/upload` and `POST /v1/transcribe` are paused.
- `maintenance.paused` lists each pause: its `scope` (the same value a paused request gets in `error.scope`), a plain `name`, the `message` we wrote, the `routes` it stops, and `back_by`, the time we expect it to end if we set one (otherwise `null`). `maintenance.retry_after_seconds` is how long to wait.
- A pause can stop part of an operation. While link imports are paused (`scope` `link`), `POST /v1/transcribe` refuses a `url` to a video or social media site (such as TikTok, Instagram, Facebook, X or Snapchat) but still takes uploads and other file addresses: the pause names that operation, it stays in `still_working`, and `accepting_new_jobs` stays `true`.
- `still_working` lists every operation that still works. Reading, listing, cancelling and deleting jobs, the balance, webhooks and feedback keep working through ordinary maintenance (only full maintenance, below, pauses them), and **jobs already accepted always finish**.
- `upcoming` lists planned maintenance that has not started yet, soonest first. New jobs are paused from each one's `starts_at`.

While `status` is `unknown`, the fields that could not be checked are `null`, never an empty list. Only a pause that can stop an API call appears here: maintenance of other parts of Scriptivox, such as the website's converter pages, leaves the status `operational`. The answer can be a few seconds old, so it can trail a change by up to about 30 seconds.

### GET `/v1/status`

Whether the API is taking new jobs right now, what is paused and why, what still works, and planned maintenance ahead. No API key needed. Always answers 200: read status.

**Response:**

```json
{
  "status": "maintenance",
  "accepting_new_jobs": false,
  "maintenance": {
    "paused": [
      {
        "scope": "upload",
        "name": "Starting new jobs and uploads",
        "message": "Planned upgrade until 10:30 UTC.",
        "routes": [
          "POST /v1/upload",
          "POST /v1/transcribe"
        ],
        "back_by": null
      }
    ],
    "retry_after_seconds": 300
  },
  "still_working": [
    "GET /v1/transcribe/{id}",
    "DELETE /v1/transcribe/{id}",
    "POST /v1/transcribe/{id}/cancel",
    "POST /v1/transcribe/{id}/webhook/resend",
    "POST /v1/webhooks/test",
    "POST /v1/transcribe/{id}/feedback",
    "GET /v1/transcriptions",
    "GET /v1/balance"
  ],
  "upcoming": [],
  "checked_at": "2026-11-20T14:02:11.000Z",
  "status_page": "https://status.scriptivox.com"
}
```

**Code Examples:**

```python
import requests

status = requests.get("https://api.scriptivox.com/v1/status").json()
if status["accepting_new_jobs"] is False:
    for pause in status["maintenance"]["paused"]:
        print(pause["name"], "-", pause["message"] or "")
    print("Try again in", status["maintenance"]["retry_after_seconds"], "seconds")
elif status["status"] == "unknown":
    print("Could not check just now; send jobs as usual and handle a 503")
```

```javascript
const status = await (await fetch("https://api.scriptivox.com/v1/status")).json();
if (status.accepting_new_jobs === false) {
  for (const pause of status.maintenance.paused) console.log(pause.name, pause.message ?? "");
  console.log(`Try again in ${status.maintenance.retry_after_seconds} seconds`);
}
```

```bash
curl https://api.scriptivox.com/v1/status
```

```javascript
// npm install scriptivox (0.4.0 or newer)
import Scriptivox, { status, MaintenanceError } from "scriptivox";

const s = await status(); // no API key needed
if (s.accepting_new_jobs === false) {
  for (const p of s.maintenance?.paused ?? []) console.log(p.name, p.message ?? "", p.back_by ?? "");
  console.log(`Try again in ${s.maintenance?.retry_after_seconds} seconds`);
}

// A paused request throws MaintenanceError: nothing was created or charged
const client = new Scriptivox({ apiKey: "sk_live_YOUR_KEY" });
try {
  await client.transcribe({ file: "./meeting.mp3" });
} catch (err) {
  if (!(err instanceof MaintenanceError)) throw err;
  console.log(err.scope, err.backBy, err.retryAfter, err.statusUrl);
}
```

```python
# pip install "scriptivox>=0.4.0"
import scriptivox
from scriptivox import MaintenanceError, Scriptivox

s = scriptivox.status()  # no API key needed
if s["accepting_new_jobs"] is False:
    for p in s["maintenance"]["paused"]:
        print(p["name"], p["message"] or "", p["back_by"] or "")
    print("Try again in", s["maintenance"]["retry_after_seconds"], "seconds")

# A paused request raises MaintenanceError: nothing was created or charged
client = Scriptivox(api_key="sk_live_YOUR_KEY")
try:
    client.transcribe(file="meeting.mp3")
except MaintenanceError as e:
    print(e.scope, e.back_by, e.retry_after, e.status_url)
```

**When a request is paused.** `POST /v1/upload` and `POST /v1/transcribe` answer `503 MAINTENANCE` with a `Retry-After` header (300 seconds), the paused `scope`, and `status_url`, the address of this call. Nothing was created or charged: send the same request again after that many seconds. While link imports are paused, only a `url` to a video site gets this answer, with `scope` `link`; send uploads and other file addresses as usual.

```json
{
  "error": {
    "code": "MAINTENANCE",
    "message": "Planned upgrade until 10:30 UTC.",
    "scope": "upload",
    "back_by": null,
    "status_url": "https://api.scriptivox.com/v1/status",
    "docs_url": "https://www.scriptivox.com/errors/maintenance",
    "help_id": "maintenance",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

**When we expect it back.** For a longer pause we may set a time it should end by. Then the `503 MAINTENANCE` carries `error.back_by` (ISO 8601, UTC), `Retry-After` counts the seconds until then (at least 60 and at most 3600, so a long pause is looked at again within the hour), and the pause's entry in `GET /v1/status` has the same `back_by`. Sending the request again before then gets the same answer. The time is a plan, not a promise: `status` says when the pause is really over, and a time that has passed is never sent. Without a time, `back_by` is `null` and `Retry-After` is 300 seconds.

```json
{
  "error": {
    "code": "MAINTENANCE",
    "message": "Planned upgrade. Jobs already accepted finish.",
    "scope": "upload",
    "back_by": "2026-11-20T14:30:00.000Z",
    "status_url": "https://api.scriptivox.com/v1/status",
    "docs_url": "https://www.scriptivox.com/errors/maintenance",
    "help_id": "maintenance",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

**Full maintenance.** Sometimes the whole service pauses for a few minutes, for example during a planned upgrade. Then every operation answers `503 MAINTENANCE` with `scope` `global`, reads included, and nothing is done; `Retry-After` is 300 seconds as usual, or counts down to `error.back_by` when we set a time. `GET /v1/status` keeps answering: `status` is `maintenance` with one pause that names every operation, and `still_working` is empty. Site-wide maintenance also uses `scope` `global` but pauses only new jobs and uploads, so `still_working` tells the two apart.

```json
{
  "status": "maintenance",
  "accepting_new_jobs": false,
  "maintenance": {
    "paused": [
      {
        "scope": "global",
        "name": "All of Scriptivox, reading included",
        "message": "Planned upgrade until 10:30 UTC.",
        "routes": [
          "POST /v1/upload",
          "POST /v1/transcribe",
          "GET /v1/transcribe/{id}",
          "DELETE /v1/transcribe/{id}",
          "POST /v1/transcribe/{id}/cancel",
          "POST /v1/transcribe/{id}/webhook/resend",
          "POST /v1/webhooks/test",
          "POST /v1/transcribe/{id}/feedback",
          "GET /v1/transcriptions",
          "GET /v1/balance"
        ],
        "back_by": null
      }
    ],
    "retry_after_seconds": 300
  },
  "still_working": [],
  "upcoming": null,
  "checked_at": "2026-11-20T14:02:11.000Z",
  "status_page": "https://status.scriptivox.com"
}
```

```json
{
  "error": {
    "code": "MAINTENANCE",
    "message": "Planned upgrade until 10:30 UTC.",
    "scope": "global",
    "back_by": null,
    "status_url": "https://api.scriptivox.com/v1/status",
    "docs_url": "https://www.scriptivox.com/errors/maintenance",
    "help_id": "maintenance",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

---

## Error Codes

All errors follow the same format:

```json
{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable description",
    "docs_url": "https://www.scriptivox.com/errors/<help_id>",
    "help_id": "<help_id>",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

`code` is stable and safe to branch on. `message` is a sanitized, customer-safe string (never a raw stack trace), and its wording may change. `docs_url` is the page that explains this exact error, why it happens and what to do, and `help_id` is that page's id. `request_id` identifies the request.

### Help pages

Every error links the page that explains it: `docs_url` is `https://www.scriptivox.com/errors/<help_id>`. The page often says more than the code: one code can have several pages (an `INVALID_REQUEST` for an export of an unfinished job links [The transcript is not ready yet](https://www.scriptivox.com/errors/transcript-not-ready), not the general page of `INVALID_REQUEST`). A failed job's `error` on `GET /v1/transcribe/{id}`, on `GET /v1/transcriptions`, on the cancel answer and in the `transcription.failed` webhook carries the same two fields, found from that job's own failure (a Google Drive file that is not shared links [drive-not-shared](https://www.scriptivox.com/errors/drive-not-shared)).

- `help_id` is stable: a page's id is never renamed, so you can keep your own text or handling per id. New ids may be added. Keep branching on `code`; use `help_id` when you want more detail than the code gives.
- Every page has a plain-text copy at `https://www.scriptivox.com/errors/<help_id>.md`, and [errors.json](https://www.scriptivox.com/errors.json) lists them all with the codes each covers. The index is [www.scriptivox.com/errors](https://www.scriptivox.com/errors).
- An error with no page of its own links this table instead and has no `help_id`. The "Help page" column below gives each code's own page.

### Request IDs

Every response, successful or not, carries an `X-Request-Id` header: `req_` followed by 16 hex characters. Error bodies repeat the same value as `error.request_id`. Log it with failed calls, and include it when you contact support: it lets us find that exact request on our side. A refused submit (`400`, `402`, `429`) has no transcription ID, so the request ID is the way to point us at it. Every response also carries a `Link: <https://platform.scriptivox.com/openapi.json>; rel="service-desc"` header pointing at the machine-readable [OpenAPI specification](https://platform.scriptivox.com/openapi.json).

New fields may be added to the error object over time; treat unknown keys as ignorable rather than as a parse failure.

### Synchronous errors (returned immediately on the request)

| HTTP | Code | Description | Help page |
| --- | --- | --- | --- |
| 400 | INVALID_REQUEST | Malformed request body or missing required fields. Also returned at once for a link to a site whose links cannot be transcribed right now (`error.reason` `platform_disabled`, `error.platform` names the site); the `message` says what to send instead. | [request-invalid](https://www.scriptivox.com/errors/request-invalid) |
| 400 | INVALID_FILENAME | Filename is missing, too long, contains invalid characters, or has no extension | [filename-invalid](https://www.scriptivox.com/errors/filename-invalid) |
| 400 | INVALID_MEDIA_FORMAT | Unsupported file extension at upload time (e.g. `.txt`, `.pdf`). Also returned later if the contents turn out not to be readable audio or video. | [file-type-not-supported](https://www.scriptivox.com/errors/file-type-not-supported) |
| 400 | FILE_NOT_UPLOADED | File not found at the upload URL | [upload-never-arrived](https://www.scriptivox.com/errors/upload-never-arrived) |
| 400 | FILE_TOO_LARGE | File exceeds 5 GB limit | [file-too-large](https://www.scriptivox.com/errors/file-too-large) |
| 400 | UPLOAD_ALREADY_USED | Upload already used for a transcription | [upload-already-used](https://www.scriptivox.com/errors/upload-already-used) |
| 400 | UPLOAD_EXPIRED | Upload URL expired (1 hour TTL) | [upload-expired](https://www.scriptivox.com/errors/upload-expired) |
| 400 | URL_NOT_ACCESSIBLE | A YouTube, TikTok, Instagram, Facebook, X, Snapchat or Douyin post that can't be transcribed, refused when you send it: nothing is created or charged. `error.reason` says why: `link_not_verifiable` (private, deleted or not available in the region), `link_not_found` (the video can't be opened), `link_unsupported` (a kind of link that is not a video, such as a Facebook Page or profile), `link_no_media` (no audio or video, such as a photo post), and for a YouTube video `link_private`, `link_age_restricted`, `link_members_only`, `link_premium_only` or `live_stream`; `error.platform` names the site. Sending the same link again gives the same answer. Also returned at once for a Google Drive link while Google has paused downloads of your files (`error.reason` `drive_paused`): a Drive job of yours ended with Google's download limit, so new Drive links are refused until `error.paused_until` (24 hours later); upload the file instead. Also returned at once for a podcast link (an Apple Podcasts episode, or an episode page on a podcast host) or a Yandex Disk link that leads to no audio or video file (`error.reason` `podcast_show_link`, `podcast_not_found`, `podcast_episode_not_found`, `podcast_no_feed`, `yandex_not_found`, `yandex_folder`, `yandex_not_media` or `yandex_no_download`) and for a Spotify link (`spotify_no_audio`). Other links that can't be downloaded fail later on `GET /v1/transcribe/{id}`. | [link-not-accessible](https://www.scriptivox.com/errors/link-not-accessible) |
| 400 | DURATION_TOO_LONG | A social post whose video is longer than 10 hours, refused when you send it (`error.platform` names the site). Nothing is created or charged. | [file-too-long](https://www.scriptivox.com/errors/file-too-long) |
| 401 | INVALID_API_KEY | Invalid or missing API key | [api-key-invalid](https://www.scriptivox.com/errors/api-key-invalid) |
| 401 | API_KEY_REVOKED | API key has been revoked | [api-key-revoked](https://www.scriptivox.com/errors/api-key-revoked) |
| 402 | INSUFFICIENT_BALANCE | Not enough balance for this transcription | [api-balance-too-low](https://www.scriptivox.com/errors/api-balance-too-low) |
| 402 | ZERO_BALANCE | Balance is $0 or below: deposit required | [api-no-balance](https://www.scriptivox.com/errors/api-no-balance) |
| 403 | FORBIDDEN | Request rejected upstream (e.g. by the network layer) before it reached the API. | [request-blocked](https://www.scriptivox.com/errors/request-blocked) |
| 404 | UPLOAD_NOT_FOUND | Upload ID does not exist | [upload-not-found](https://www.scriptivox.com/errors/upload-not-found) |
| 404 | TRANSCRIPTION_NOT_FOUND | Transcription ID does not exist | [transcript-not-found](https://www.scriptivox.com/errors/transcript-not-found) |
| 404 | NOT_FOUND | Path doesn't match any endpoint | [endpoint-not-found](https://www.scriptivox.com/errors/endpoint-not-found) |
| 405 | METHOD_NOT_ALLOWED | The path exists but only accepts a different HTTP method. The response includes an `Allow` header naming the accepted method (e.g. `Allow: GET` if you POST to `/v1/balance`). | [method-not-allowed](https://www.scriptivox.com/errors/method-not-allowed) |
| 409 | CONFLICT | Action not allowed in the current state (e.g. delete on an in-flight job, cancel on a job that is already transcribing or completed) | [action-not-allowed-now](https://www.scriptivox.com/errors/action-not-allowed-now) |
| 409 | IDEMPOTENCY_KEY_LOCKED | Another request with the same `Idempotency-Key` is mid-flight. Retry after a few seconds (`Retry-After` header sent). | [request-in-progress](https://www.scriptivox.com/errors/request-in-progress) |
| 409 | SOURCE_EXPIRED | `source_transcription_id` names a job whose audio was deleted 24 hours after it ended, so it cannot be transcribed again: nothing is created or charged. Send the file again with `upload_id` or `url`. | [original-file-gone](https://www.scriptivox.com/errors/original-file-gone) |
| 410 | ENDPOINT_REMOVED | This endpoint has been removed. The `message` says what to use instead (for `POST /v1/accounts`: create the account at https://www.scriptivox.com/signup). | [endpoint-removed](https://www.scriptivox.com/errors/endpoint-removed) |
| 413 | PAYLOAD_TOO_LARGE | Request **body** exceeds 100KB. This is the JSON body, not the media file. Large files go to the presigned upload URL, which has its own 5 GB limit. | [request-body-too-large](https://www.scriptivox.com/errors/request-body-too-large) |
| 415 | UNSUPPORTED_MEDIA_TYPE | Request body sent without `Content-Type: application/json` on a POST/PUT/PATCH. The response includes an `Accept-Post: application/json` header. Parameters are allowed (`application/json; charset=utf-8` works). | [request-not-json](https://www.scriptivox.com/errors/request-not-json) |
| 422 | IDEMPOTENCY_KEY_CONFLICT | `Idempotency-Key` reused with a different request body. Use a fresh key for a different operation. | [request-key-reused](https://www.scriptivox.com/errors/request-key-reused) |
| 422 | NO_SPEECH | A link whose transcriptions for your account already found no speech twice in the last 30 days (each completed with an empty transcript), refused when you send it again: nothing is created. `error.transcription_ids` names the earlier jobs. Send a recording with audible speech, or a different file. | [no-speech-again](https://www.scriptivox.com/errors/no-speech-again) |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests (see Rate Limits: wait the seconds in the `Retry-After` header), or 25 jobs already in progress on POST /v1/transcribe (no `Retry-After`: submit more once one finishes, which GET /v1/transcribe/{id} or the webhook tells). On POST /v1/transcribe with a social post link, also a limit on social links set on your account (`error.reason` `social_link_limit`, with `error.limit` and `error.window_seconds`; accounts have none unless Scriptivox sets one), with `Retry-After`; uploads and other links are not affected. | [rate-limited](https://www.scriptivox.com/errors/rate-limited) |
| 500 | INTERNAL_ERROR | Server error | [something-went-wrong](https://www.scriptivox.com/errors/something-went-wrong) |
| 503 | LINK_CHECK_UNAVAILABLE | A social post link could not be checked right now, so nothing was created or charged. `error.reason` `verify_rate_limited`: link checks are busy (`Retry-After: 600`); `link_check_failed`: the check did not answer (`Retry-After: 60`). Send the same request again after that many seconds. Links to files and to Google Drive, Dropbox, OneDrive or Yandex Disk are not checked and are not affected. | [link-check-unavailable](https://www.scriptivox.com/errors/link-check-unavailable) |
| 503 | TEMPORARILY_UNAVAILABLE | Your data could not be read just now (a brief problem on our side), so the request was not completed: nothing was created, changed or charged. Send the same request again after the number of seconds in the `Retry-After` header. | [try-again-shortly](https://www.scriptivox.com/errors/try-again-shortly) |
| 503 | MAINTENANCE | Paused for maintenance: nothing was created, changed or charged. `error.scope` says what is paused (`upload`: new jobs and uploads; `link`: a `url` to a video or social media site (such as TikTok, Instagram, Facebook, X or Snapchat) on `POST /v1/transcribe`, while uploads and other file addresses carry on; `global`: site-wide maintenance, which stops new jobs and uploads, or full maintenance, for example during a planned upgrade, when every operation gets this answer, reads included), and `error.status_url` is `GET /v1/status`, which needs no key and says what still works. Send the same request again after the number of seconds in the `Retry-After` header (300; when we set a time we expect the pause to end, `error.back_by` gives it and `Retry-After` counts down to it, from 60 to 3600 seconds). | [maintenance](https://www.scriptivox.com/errors/maintenance) |
| 503 | ISSUER_UNCONFIGURED | OAuth sign-in is not configured on this deployment. | [sign-in-not-configured](https://www.scriptivox.com/errors/sign-in-not-configured) |

### Asynchronous errors (surface only on `GET /v1/transcribe/{id}`)

`POST /v1/transcribe` accepts the job and returns `{"status":"created"}` even if the input will ultimately fail. The one exception is a link to a social post, which is checked on the submit call (see [social posts](#social-posts)). The errors below only appear on the GET endpoint, with the top-level `status` set to `"failed"` and the failure reason in the `error` object. Your client **must** handle these on the poll path, not on submit.

| Code | When it appears | Help page |
| --- | --- | --- |
| URL_NOT_ACCESSIBLE | URL flow only. Covers several non-fetchable cases: the URL returned 4xx/5xx; DNS didn't resolve; the connection was refused; the response was an HTML page instead of media (login/preview/folder/expired-link, or a video site's page instead of its video); the share requires sign-in (e.g. OneDrive `1drv.ms/v/c/…` SharePoint Photos shares); or the server returned a 200 with an empty body. For a social post that passed the check: its video file could not be downloaded, or the download links the site gave expired before the download and checking the post again did not give working ones. The `message` field names the specific cause when detectable. | [link-not-accessible](https://www.scriptivox.com/errors/link-not-accessible) |
| DOWNLOAD_FAILED | URL flow only: the download started but was interrupted. | [link-download-interrupted](https://www.scriptivox.com/errors/link-download-interrupted) |
| INVALID_MEDIA_FORMAT | The file downloaded but could not be read: not actually audio/video, no audio track, or **shorter than the 1-second minimum** (message names the measured duration, e.g. `"Audio too short (0.10s). Minimum duration is 1 second."`). The length is measured in whole seconds, rounded: audio of half a second or more counts as 1 second and is transcribed and billed as 1 second. | [file-type-not-supported](https://www.scriptivox.com/errors/file-type-not-supported) |
| FILE_TOO_LARGE | The file is larger than 5 GB. For a URL this is only known once the download reaches the limit. | [file-too-large](https://www.scriptivox.com/errors/file-too-large) |
| DURATION_TOO_LONG | Audio exceeds the 10-hour limit (only known after probing duration). | [file-too-long](https://www.scriptivox.com/errors/file-too-long) |
| INSUFFICIENT_BALANCE | Once the length was measured, the job cost more than your available balance. Nothing was charged. The `message` names the amount needed; add funds and submit again. | [api-balance-too-low](https://www.scriptivox.com/errors/api-balance-too-low) |
| PROCESSING_ERROR | Transcription failed after all retries. | [processing-failed](https://www.scriptivox.com/errors/processing-failed) |
| SPEECH_BELOW_THRESHOLD | You set speech_threshold and less of the audio than that was speech (the `message` gives both shares). Nothing was charged and the job is not retried: sending the same file again gives the same result. Without speech_threshold, a file with no speech completes with an empty transcript and `result.no_speech: true`, and is charged on its length. | [speech-below-threshold](https://www.scriptivox.com/errors/speech-below-threshold) |
| CREATED_TIMEOUT | Job sat in `created` for more than 30 minutes: the validation step never started. | [job-start-failed](https://www.scriptivox.com/errors/job-start-failed) |
| DOWNLOAD_TIMEOUT | Job sat in `downloading` for more than 15 minutes: the file download stalled. | [link-download-timed-out](https://www.scriptivox.com/errors/link-download-timed-out) |
| PROCESSING_TIMEOUT | Job sat in `processing` for more than 45 minutes without a result. | [processing-timed-out](https://www.scriptivox.com/errors/processing-timed-out) |
| BILLING_ERROR | Internal accounting issue while finalizing the charge. Your balance was **not** debited and the transcript was not delivered. Safe to retry. | [charge-not-completed](https://www.scriptivox.com/errors/charge-not-completed) |
| INTERNAL_ERROR | A server-side step (e.g. queueing the job to our processing layer) failed after we accepted the request. Safe to retry. | [something-went-wrong](https://www.scriptivox.com/errors/something-went-wrong) |
| CANCELLED | The transcription was cancelled by the customer via `POST /v1/transcribe/{id}/cancel`. You are not charged. | [job-cancelled](https://www.scriptivox.com/errors/job-cancelled) |

Failed transcriptions are free. The reserved balance is released back to your account, so a failure costs $0 regardless of how far the job got.

`error.message` is always a sanitized, customer-safe string; we never forward raw internal errors. If you need more detail than the message provides for a `PROCESSING_ERROR`, contact support with the transcription ID and we can look up the raw error on our side.

---

## Important notes

### Language parameter behavior

**Recommended: always pass `language` explicitly.** Auto-detection works in most cases but has a small failure rate that's fully avoidable. Passing the actual language gives more accurate transcripts, faster turnaround (the model skips its detection pass), and protects you from the known edge cases below.

When you specify a `language` code, the model is forced to interpret the audio as that language. If the audio is actually in a different language, the model may **translate** rather than transcribe. For example, setting `language: "es"` on English audio can produce a Spanish translation of the speech. Omit `language` (or pass `null`) to let the model auto-detect.

Auto-detect picks a single dominant language for the whole file and is not perfect:

- **Code-switched audio** (e.g. English/Spanish in the same clip) typically gets transcribed as the dominant language, and segments in the other language may be dropped or mistranscribed.
- **Hindi audio is sometimes routed to Urdu** by the detector. If you know the language in advance, pass it explicitly.
- **Short clips** (under 30s) give the detector less signal and are more likely to mis-route.
- **Music or background noise** during the first few seconds can throw the detector off.

If you know the language up front, even probabilistically, pass it. The accuracy cost of being wrong is **roughly the same** as the cost of auto-detect picking the wrong language, but passing it is faster and works on the edge cases above.

### Silence and very short clips

Speech recognition can misfire on near-silent or sub-second audio, sometimes producing a phantom `"Thank you."` or similar filler. If your pipeline can produce silent or extremely short clips, filter them on your side before submitting.

### Files with no speech

Billing is on the length of the audio, not on how much of it is speech. A file with no speech (silence, music or noise only) completes with an empty transcript (`full_transcript: ""`, `utterances: []`) and `result.no_speech: true`, and is charged on its length.

To skip files with too little speech, set `speech_threshold` on `POST /v1/transcribe`: the share of the audio, from 0 to 1, that must be speech. A job below it fails with `SPEECH_BELOW_THRESHOLD`, its `message` gives both shares, and nothing is charged. The share is measured reliably from about 30 seconds of audio. A file with no audio track at all fails with `INVALID_MEDIA_FORMAT` and is not charged.

### Size, duration, and retention limits

- **Max file size:** 5 GB. Anything larger is rejected with `400 FILE_TOO_LARGE`. Very large uploads can also be rejected by the network layer with an HTML `413` page **before** they reach the API, so your client should handle non-JSON error bodies gracefully.
- **Max duration:** 10 hours. Files probing longer than this fail with `DURATION_TOO_LONG` (asynchronous; you'll see it on the GET endpoint after probing completes).
- **Min duration:** 1 second. Shorter files fail asynchronously with `INVALID_MEDIA_FORMAT` and a message naming the actual measured duration. (Sub-second clips have too little speech signal to transcribe reliably.) The length is measured in whole seconds, rounded, so a file of half a second or more counts as 1 second: it is transcribed and billed as 1 second. Only audio under half a second fails.
- **Request body Content-Type:** every `POST` / `PUT` / `PATCH` that carries a JSON body must send `Content-Type: application/json` (parameters allowed, e.g. `application/json; charset=utf-8`). Anything else is rejected at the gateway with `415 UNSUPPORTED_MEDIA_TYPE` and an `Accept-Post: application/json` header.
- **Presigned URL TTL:** 1 hour. Uploads must `PUT` to the URL within `expires_in` seconds of receiving it; after that the URL returns `400 UPLOAD_EXPIRED`.
- **Audio retention:** uploaded source audio is retained for **24 hours** after the job ends, then deleted. Transcripts themselves remain available via `GET /v1/transcribe/{id}`.

### Filename rules

The `filename` you pass to `POST /v1/upload` must satisfy all of the following:

- **ASCII only** (rename files with accents, CJK, or emoji before upload; storage rejects non-ASCII object keys).
- **No path separators**: `/` and `\` are rejected.
- **No `< > " ' ``**: rejected to prevent injection into dashboards that render filenames unescaped.
- **Must include a supported extension** (e.g. `.mp3`, `.wav`, `.mp4`). See [Supported Formats](#supported-formats) for the full list.
- **255 characters or fewer.**

Violations return `400 INVALID_FILENAME` (or `400 INVALID_MEDIA_FORMAT` if the extension is present but unsupported).

### `audio_duration_seconds` is an integer

`audio_duration_seconds` in `GET /v1/transcribe/{id}` is rounded to the nearest whole second (so an 11.7-second clip returns `11`). `cost_cents`, by contrast, is fractional and exact (e.g. 0.061111 for an 11-second clip at $0.20/hour). Your account balance is debited against the precise value, not a rounded one.

### `speaker_count` is a soft prior, not a hard ceiling

When you set `speaker_count: N` with `diarize: true`, you're giving the diarizer a hint about how many speakers to expect, not a hard cap. The result may include slightly more or fewer speaker labels than `N` (e.g. requesting 5 may produce 6). Values outside 1–50, or `speaker_count` without `diarize: true`, are rejected with `400 INVALID_REQUEST`.

**Recommended:** whenever you know how many speakers are on the recording, pass `speaker_count`. It noticeably improves diarization accuracy: the model uses it as a prior instead of guessing, which cuts down on over-segmentation (one speaker split across two labels) and under-segmentation (two speakers merged into one).

### Per-word leading whitespace

Word objects in `align: true` output have whitespace pre-stripped (e.g. `{"word":"The"}`, not `{"word":" The"}`). Reconstruct sentence text from `utterance.text` if you need exact spacing.

### `diarize` forces `align`

`diarize` requires word-level alignment to map speakers onto each word, so any request with `diarize: true` is processed as if `align: true`, even when the caller explicitly passes `align: false`. The stored job and webhook payload reflect the effective value (`align: true`), and word objects are present on the result. If you don't want alignment data, leave `diarize` off.

### Idempotency

Both `POST /v1/upload` and `POST /v1/transcribe` accept an optional `Idempotency-Key` HTTP header. When present, we cache the response for 24 hours and replay it byte-for-byte on subsequent requests with the same key and body. This protects you against double-billed transcriptions if your network drops the response and your client retries.

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Idempotency-Key: 7c8f5b3a-1234-4d56-90ab-cdef01234567" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/audio.mp3"}'
```

Rules:
- Key is opaque; we don't parse it. Generate one per logical operation (a UUID is conventional). Reuse the same key when retrying after a failure.
- 1–255 printable ASCII characters.
- Same key + same body within 24 hours → cached response is replayed. The replayed response carries a `Idempotent-Replay: true` header so you can tell it was cached.
- Same key + **different** body → `422 IDEMPOTENCY_KEY_CONFLICT`. This is a bug in your retry logic. Use a fresh key for a different operation.
- Same key while a previous request is **still in progress** → `409 IDEMPOTENCY_KEY_LOCKED` with a `Retry-After` header. Sleep briefly and retry; the cached response will be available once the first request finishes.
- No header sent → endpoint behaves normally (no caching).

The replay cache covers 200 success responses only. 4xx and 5xx errors are not cached, so you can retry freely.

### Unknown fields are rejected

Request bodies on `POST /v1/upload` and `POST /v1/transcribe` are strict: any top-level field that isn't in the documented parameter list returns `400 INVALID_REQUEST` with the offending key name. This is to surface typos (`{"dirize": true}`) immediately instead of silently ignoring them. Nested objects (e.g. inside a future `metadata` field) are not currently inspected.

### Response shape changes with `diarize` and `align`

The `GET /v1/transcribe/{id}` example above shows the response with `diarize: true` and `align: true` (the maximal case). When you turn flags off, some `result` fields become null or empty:

| Field | `diarize: false` | `align: false` |
| --- | --- | --- |
| `result.speakers` | `null` | unchanged |
| `result.utterances[].speaker` | `null` | unchanged |
| `result.utterances[].words` | unchanged | `[]` (empty array) |
| `result.utterances[].words[].speaker` | key absent | n/a (no words) |

Top-level metadata (`status`, `cost_cents`, `audio_duration_seconds`, etc.) is identical regardless of flags. `result.utterances[].confidence` and `result.utterances[].words[].confidence` may be `null`: confidence scores depend on the alignment model used for the detected language, and not every language is covered. Always handle `null` defensively (e.g. skip filtering by confidence rather than dropping the word).

Speaker labels are `"SPEAKER 1"`, `"SPEAKER 2"`, … (space, 1-indexed), not `"SPEAKER_00"`. `source_url` is only present on URL-flow transcriptions; upload-flow jobs omit it.

---

## Rate Limits

Limits are enforced per API key per endpoint, plus a per-IP cap across all endpoints. Exceeding any limit returns `429 RATE_LIMIT_EXCEEDED` with a `Retry-After` header.

| Scope | Limit | Notes |
| --- | --- | --- |
| `POST /v1/upload` (per key) | 60/min | Create a presigned upload URL |
| `POST /v1/transcribe` (per key) | 60/min | Start a transcription |
| `GET /v1/transcribe/{id}` (per key) | 200/min | Get a transcription |
| `DELETE /v1/transcribe/{id}` (per key) | 30/min | Delete a transcription |
| `POST /v1/transcribe/{id}/cancel` (per key) | 30/min | Cancel a transcription before it starts transcribing |
| `POST /v1/transcribe/{id}/webhook/resend` (per key) | 30/min | Send a finished job's final webhook again |
| `POST /v1/transcribe/{id}/feedback` (per key) | 10/min | Rate a job, report a problem with it, or report that "no speech" was wrong |
| `POST /v1/webhooks/test` (per key) | 10/min | Send a test webhook to your URL |
| `GET /v1/transcriptions` (per key) | 60/min | List transcriptions |
| `GET /v1/balance` (per key) | 100/min | Get account balance |
| `GET /v1` (per IP) | 100/min | Describe the API |
| `GET /v1/status` (per IP) | 100/min | Check whether the API is taking new jobs |
| Per source IP (across all endpoints) | 300/min | Edge-level cap to prevent abuse |

Limits use a **sliding 60-second window**, not a fixed-window counter: short bursts above the per-minute number are tolerated as long as the rolling 60-second total stays under the limit. Plan against the steady-state number, not the burst.

**Jobs in progress.** An account can have up to 25 transcriptions in progress at once (`created`, `downloading`, `pending` or `processing`). A `POST /v1/transcribe` beyond that returns `429 RATE_LIMIT_EXCEEDED` with `in_flight`, `limit` and `not_started` (how many of those have not started yet, and how many of them are Google Drive links) in the error and no `Retry-After`: submit more as earlier jobs finish. Google Drive links of one account download 3 at a time, each starting by itself, so nothing needs to be sent again; while a job waits for its turn, `GET /v1/transcribe/{id}` says why in `waiting` and `progress` ([why a job is waiting](#waiting)). Need more? [Contact support](mailto:support@scriptivox.com) and we can raise it for your account.

### Rate limit headers

Rate limits are advertised in two vocabularies on the same response: the
`RateLimit-Policy` / `RateLimit` structured fields from
[draft-ietf-httpapi-ratelimit-headers](https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/),
and the older `X-RateLimit-*` spelling that most existing clients read. They
always agree; use whichever your HTTP client makes easier.

**On every response, including `401` and `429`:**

| Header | Description |
| --- | --- |
| `RateLimit-Policy` | The quotas that apply, as an RFC 9651 structured field list. `q` is the quota, `w` the window in seconds. Two policies are always listed: `"endpoint"` (per key, per endpoint) and `"ip"` (per source IP, across everything). |
| `X-RateLimit-Limit` | The `"endpoint"` quota, as a bare integer. |

You do **not** need a working API key to read these. A `401` carries them too,
which means an agent can learn what it is allowed to do before it is allowed to
do anything.

**Once the API key has been validated:**

| Header | Description |
| --- | --- |
| `RateLimit` | Live remaining quota. `r` is the remaining request count, `t` the seconds until the window resets. |
| `X-RateLimit-Remaining` | Requests remaining in the current rolling window. |
| `X-RateLimit-Reset` | Unix timestamp when the window fully resets. |
| `Retry-After` | Seconds to wait before retrying. Only on `429`. |

```http
RateLimit-Policy: "endpoint";q=60;w=60, "ip";q=300;w=60
RateLimit: "endpoint";r=57;t=41
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1787643480
```

> **Which 429 you got:** 
> A `429` from the per-key limiter carries the live `RateLimit` field. A `429`
> from the per-IP cap or from an abuse block is raised before your key is read, so
> it carries `RateLimit-Policy` and `Retry-After` but no `r` value, because there is no
> per-key window to report. Both are safe to retry after `Retry-After` seconds.

---

## Supported Formats

26 file extensions are accepted (11 audio + 15 video). Maximum file size is 5 GB; maximum duration is 10 hours. Unrecognized extensions return `400 INVALID_MEDIA_FORMAT`.

### Audio (11)

| Extension | Format |
| --- | --- |
| .mp3 | MPEG Audio |
| .wav | Waveform Audio |
| .m4a | MPEG-4 Audio |
| .aac | Advanced Audio Coding |
| .ogg | Ogg Vorbis |
| .oga | Ogg Audio |
| .flac | Free Lossless Audio |
| .wma | Windows Media Audio |
| .aiff | Audio Interchange |
| .opus | Opus |
| .caf | Core Audio Format |

### Video (15)

| Extension | Format |
| --- | --- |
| .mp4 | MPEG-4 Video |
| .mov | QuickTime |
| .avi | Audio Video Interleave |
| .mkv | Matroska Video |
| .webm | WebM |
| .wmv | Windows Media Video |
| .flv | Flash Video |
| .m4v | MPEG-4 Video (iTunes) |
| .3gp | 3GPP |
| .mpeg | MPEG Video |
| .mts | AVCHD |
| .ogv | Ogg Video |
| .ts | MPEG Transport Stream |
| .vob | DVD Video Object |
| .f4v | Flash MP4 Video |

---

## Supported Languages

119 languages are supported. Pass the ISO 639-1 (or BCP-47 fallback, e.g. `yue`, `kea`) language code below in the `language` parameter.

**We recommend always passing a language explicitly.** Omitting the parameter (or passing `null`) triggers auto-detection, which works for most inputs but has a small chance of picking the wrong language, especially on short clips, code-switched audio, or files that start with music or background noise. See [Language parameter behavior](#important-notes) for details.

Invalid codes return `400 INVALID_REQUEST`.

| Language | Code |
| --- | --- |
| Afrikaans | af |
| Albanian | sq |
| Amharic | am |
| Arabic | ar |
| Armenian | hy |
| Assamese | as |
| Asturian | ast |
| Azerbaijani | az |
| Bashkir | ba |
| Basque | eu |
| Belarusian | be |
| Bengali | bn |
| Bosnian | bs |
| Breton | br |
| Bulgarian | bg |
| Cantonese | yue |
| Cape Verdean Creole | kea |
| Catalan | ca |
| Cebuano | ceb |
| Chichewa | ny |
| Chinese | zh |
| Croatian | hr |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| English | en |
| Estonian | et |
| Faroese | fo |
| Finnish | fi |
| French | fr |
| Fula | ff |
| Galician | gl |
| Georgian | ka |
| German | de |
| Greek | el |
| Gujarati | gu |
| Haitian Creole | ht |
| Hausa | ha |
| Hawaiian | haw |
| Hebrew | he |
| Hindi | hi |
| Hungarian | hu |
| Icelandic | is |
| Igbo | ig |
| Indonesian | id |
| Irish | ga |
| Italian | it |
| Japanese | ja |
| Javanese | jw |
| Kamba | kam |
| Kannada | kn |
| Kazakh | kk |
| Khmer | km |
| Korean | ko |
| Kyrgyz | ky |
| Lao | lo |
| Latin | la |
| Latvian | lv |
| Lingala | ln |
| Lithuanian | lt |
| Luganda | lg |
| Luo | luo |
| Luxembourgish | lb |
| Macedonian | mk |
| Malagasy | mg |
| Malay | ms |
| Malayalam | ml |
| Maltese | mt |
| Maori | mi |
| Marathi | mr |
| Mongolian | mn |
| Myanmar | my |
| Nepali | ne |
| Northern Sotho | nso |
| Norwegian | no |
| Nynorsk | nn |
| Occitan | oc |
| Odia | or |
| Oromo | om |
| Pashto | ps |
| Persian | fa |
| Polish | pl |
| Portuguese | pt |
| Punjabi | pa |
| Romanian | ro |
| Russian | ru |
| Sanskrit | sa |
| Serbian | sr |
| Shona | sn |
| Sindhi | sd |
| Sinhala | si |
| Slovak | sk |
| Slovenian | sl |
| Somali | so |
| Sorani Kurdish | ckb |
| Spanish | es |
| Sundanese | su |
| Swahili | sw |
| Swedish | sv |
| Tagalog | tl |
| Tajik | tg |
| Tamil | ta |
| Tatar | tt |
| Telugu | te |
| Thai | th |
| Tibetan | bo |
| Turkish | tr |
| Turkmen | tk |
| Ukrainian | uk |
| Umbundu | umb |
| Urdu | ur |
| Uzbek | uz |
| Vietnamese | vi |
| Welsh | cy |
| Wolof | wo |
| Xhosa | xh |
| Yiddish | yi |
| Yoruba | yo |
| Zulu | zu |

---

- [Webhooks](/docs/webhooks): Real-time completion notifications
- [Pricing](/docs/pricing): Pay-as-you-go at $0.20/hour

---

<!-- source: https://platform.scriptivox.com/docs/pricing -->
<!-- updated: 2026-05-14 -->

# Pricing

Simple, transparent pricing. Pay only for what you use.

## $0.20 / hour of audio

Billed per second of audio processed. No rounding up to the nearest minute.

### Everything included

- Speaker diarization
- Word-level timestamps
- Confidence scores (where supported by the alignment model)
- 119 language support
- Automatic language detection
- Webhook notifications

---

## Key details

### Pay-as-you-go

No subscriptions or commitments. Add funds to your balance and use them whenever you need.

### No minimums

No minimum usage requirements. Transcribe one file or a thousand at the same rate.

### Balance never expires

Funds in your account never expire. Use them at your own pace, no time limits.

---

## How billing works

When you submit a transcription, we **reserve** the estimated cost from your balance based on the audio duration. Once the transcription completes, we charge the exact cost and release any unused reserve.

Cost is calculated as: `(audio_seconds / 3600) * price_per_hour`, where the price per hour is $0.20 (`price_per_hour_cents` in `GET /v1/balance` is the authoritative live value).

**Failed transcriptions are free.** If a job fails for any reason, the full reserve is released back to your balance. You are never charged for unsuccessful attempts.

## Example costs

| Audio Duration | Hours | Cost |
| --- | --- | --- |
| 30 seconds | 0.0083h | $0.0017 |
| 5 minutes | 0.0833h | $0.0167 |
| 30 minutes | 0.5h | $0.10 |
| 1 hour | 1h | $0.20 |
| 3 hours | 3h | $0.60 |
| 10 hours | 10h | $2.00 |

## Adding funds

Add funds to your account via the [Billing page](/platform/billing) in your dashboard. Payments are processed securely through Stripe.

Minimum deposit is $5.00, which gives you approximately **25 hours** of transcription.

### Auto top-up

Auto top-up keeps your balance from running out between jobs. Each time your available balance falls below an amount you choose, we charge your saved card the top-up amount you choose, one charge at a time. New settings start at: add $20 when the balance falls below $5.

Auto top-up is off until you turn it on. Turn it on in **Add Funds** (the **+** next to your balance) or in [Billing](/platform/billing). If no card is saved yet, the card you pay with is saved and auto top-up turns on once that payment goes through. In Billing you can also see how much auto top-up added this month and remove the card. If a charge doesn't go through, we email you and try again 6 hours later; after three in a row, auto top-up turns itself off. Cards issued in India can't be charged automatically. `GET /v1/balance` shows whether it is on (`auto_topup`).

## Rate limits

Rate limits are enforced per API key to ensure fair usage. See the [API Reference](/docs/api-reference#rate-limits) for specific limits per endpoint. You must also have sufficient balance to cover the estimated cost before a transcription can begin. If your balance is insufficient, the request will return a `402` error.

## Common questions

### What formats are supported?

We support 26 audio and video file formats including mp3, wav, m4a, mp4, mov, webm, aac, ogg, flac, and opus ([full list](/docs/api-reference#supported-formats)). Max file size is 5 GB and max audio duration is 10 hours per file.

### Am I charged if a transcription fails?

No. Failed transcriptions are completely free. The reserved amount is returned to your balance immediately.

### How is cost calculated for very short audio?

Cost is calculated per second with no rounding or minimums. A 30-second clip costs $0.001667 (0.20 * 30 / 3600).

### Do you offer volume discounts?

Contact us for enterprise pricing if you process more than 1,000 hours per month.

### Can I get a refund?

Unused balance can be refunded within 30 days of deposit. Contact support for refund requests.

When a deposit is refunded, the refunded amount is taken off your balance. If you had already used it, your balance goes below zero and new transcriptions need a top-up.

---

- [Quickstart](/docs/quickstart): Get your first transcription running
- [API Reference](/docs/api-reference): Full endpoint documentation

---

<!-- source: https://platform.scriptivox.com/docs/webhooks -->
<!-- updated: 2026-05-18 -->

# Webhooks

Get a signed POST to your server when a transcription is processing, completes or fails, instead of polling.

---

## Overview

When you provide a `webhook_url` in your transcription request, we POST progress and result events to that URL as the job moves through the pipeline. Webhooks are signed with HMAC-SHA256 using your key's webhook signing secret, so you can verify they came from Scriptivox. A delivery your server does not accept is **retried with backoff, 8 tries over about 10¾ h**, and every event carries a stable ID so you can drop repeats.

Webhooks fire for both upload-based and URL-based transcription flows. The `webhook_url` field is optional. If omitted, no webhooks are sent and you should poll [`GET /v1/transcribe/{id}`](/docs/api-reference) instead.

You can also set a default webhook URL in your [account settings](/platform/settings) that is used for any transcription that does not specify one in the request body.

Webhook URLs must use `https://`. A request with an `http://` `webhook_url` is refused with `INVALID_REQUEST`, and so are private and internal addresses.

## Setting up webhooks

Pass a `webhook_url` when starting a transcription:

```python
requests.post("https://api.scriptivox.com/v1/transcribe",
    headers={"Authorization": "sk_live_YOUR_KEY"},
    json={
        "upload_id": "abc-123",
        "webhook_url": "https://your-server.com/webhook"
    })
```

```javascript
await fetch("https://api.scriptivox.com/v1/transcribe", {
  method: "POST",
  headers: {
    Authorization: "sk_live_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    upload_id: "abc-123",
    webhook_url: "https://your-server.com/webhook",
  }),
});
```

```bash
curl -X POST https://api.scriptivox.com/v1/transcribe \
  -H "Authorization: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "upload_id": "abc-123",
    "webhook_url": "https://your-server.com/webhook"
  }'
```

### Check your endpoint first

Before going live, send yourself a test event. It is signed with the key's secret and carries the same headers as a real event, so it also tests your signature check:

- In the dashboard: [Settings](/platform/settings) → **Webhook deliveries** → choose the key → **Send test event**.
- With the API: [`POST /v1/webhooks/test`](/docs/api-reference#webhook-test) with `{"url": "https://…"}` (or no body, to use your default webhook URL). The answer tells you what your server returned.

## Webhook events

Every job sends `transcription.processing` once the file has been checked and sent for transcription, then exactly one of `transcription.completed` or `transcription.failed` when the job ends. URL jobs also send `transcription.downloading` when the download starts. The `created` state is visible in `GET /v1/transcribe/{id}` polling but does not send a webhook.

### transcription.processing

Sent when the audio file has been downloaded or uploaded and checked, and the transcription job has been submitted for processing. Includes the measured duration and the reserved cost.

```json
{
  "event": "transcription.processing",
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "processing",
  "duration_seconds": 120,
  "cost_cents": 0.666667
}
```

### transcription.completed

Sent when a transcription finishes successfully. Includes the full result, the same as `GET /v1/transcribe/{id}` returns.

```json
{
  "event": "transcription.completed",
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "completed",
  "duration_seconds": 120,
  "cost_cents": 0.666667,
  "result": {
    "full_transcript": "Hello, thanks for joining...",
    "language": "en",
    "duration_seconds": 120,
    "speakers": ["SPEAKER 1", "SPEAKER 2"],
    "utterances": [
      {
        "start": 0.5,
        "end": 3.2,
        "text": "Hello, thanks for joining the call today.",
        "speaker": "SPEAKER 1",
        "confidence": 0.95,
        "words": [...]
      }
    ]
  }
}
```

### transcription.failed

Sent any time a transcription ends in the `failed` state. Reserved balance is automatically released so a failed job costs $0.

This event covers every failure surface: URL download/validation errors, insufficient balance, internal errors, transcription failures, and **cleanup-timeout failures** (when a job sits stuck in `created`, `downloading`, or `processing` past its threshold). You will receive at most one `transcription.failed` event per transcription, so a single handler can cover all failure modes. Branch on `error.code` (see [API reference: error codes](/docs/api-reference#error-codes)) for code-specific behavior.

`error.message` is a sanitized, customer-safe string; we don't forward raw internal errors. For `PROCESSING_ERROR` cases where the message is generic, retrying is usually the right next step. `error.docs_url` is the page that explains why this job failed and what to do, and `error.help_id` is its id: the same two fields `GET /v1/transcribe/{id}` shows ([Help pages](/docs/api-reference#help-pages)).

```json
{
  "event": "transcription.failed",
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "failed",
  "error": {
    "code": "PROCESSING_ERROR",
    "message": "Failed to process audio file",
    "docs_url": "https://www.scriptivox.com/errors/processing-failed",
    "help_id": "processing-failed"
  }
}
```

### transcription.downloading

URL jobs only: sent once when we start downloading the file from your URL. It is tried **once and not retried**: a late "downloading" would tell you nothing.

```json
{
  "event": "transcription.downloading",
  "transcription_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "status": "downloading"
}
```

### webhook.test

Sent only when you ask for a test event (dashboard or `POST /v1/webhooks/test`). One try. It is not about a real job, so answer it with a 2xx and do nothing else.

```json
{
  "event": "webhook.test",
  "test": true,
  "message": "This is a test event from Scriptivox. Answer with any 2xx status to confirm your endpoint works.",
  "created_at": "2026-11-09T16:00:00.000Z"
}
```

### Events summary

| Event | When | Flows | Retried |
| --- | --- | --- | --- |
| transcription.processing | File checked, sent for transcription | Both | Yes, until the job's final event is sent |
| transcription.completed | Transcription finished successfully | Both | Yes, up to 8 tries |
| transcription.failed | Download, validation, or processing failed | Both | Yes, up to 8 tries |
| transcription.downloading | Download from your URL started | URL | No, one try |
| webhook.test | You asked for a test event | n/a | No, one try |

Answer `2xx` to any event you do not handle: new event types may be added.

## Verifying webhook signatures

### Your webhook signing secret

Each API key has its own webhook signing secret, a random string that starts with `whsec_`. Find it on the [API Keys](/keys) page: choose **Show webhook secret** under the key. Webhooks for a job are signed with the secret of the key that created the job.

- Keep it on your server only, like the API key. It is not the API key and cannot be worked out from it.
- **Regenerate** (on the same page) replaces it at once: the old secret stops working, so update your server straight away.

Every webhook request includes these headers:

| Header | Description |
| --- | --- |
| `X-Scriptivox-Signature` | HMAC-SHA256 hex digest of the signed payload |
| `X-Scriptivox-Timestamp` | Unix timestamp (seconds, as a string) of when this try was sent |
| `X-Scriptivox-Delivery` | ID of the event. The same on every retry and resend of that event: use it to drop repeats |
| `X-Scriptivox-Attempt` | Which try this is: `1` for the first, up to `8` for automatic retries |

```http
POST /webhooks/scriptivox HTTP/1.1
Content-Type: application/json
User-Agent: scriptivox-webhook/1
X-Scriptivox-Signature: 5d2f0c4e9b1a…
X-Scriptivox-Timestamp: 1794240000
X-Scriptivox-Delivery: 6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f
X-Scriptivox-Attempt: 2
```

> **Signing formula:** 
> 1. `signing_secret`: your key's webhook signing secret, the whole string including `whsec_`, as UTF-8
> 2. `signed_payload = f"{timestamp}.{body}"`: body is the exact raw JSON request body, byte-for-byte
> 3. `signature = HMAC_SHA256_hex(signing_secret, signed_payload)`: sent as `X-Scriptivox-Signature`
> 
> Reject any request whose `X-Scriptivox-Timestamp` is more than **5 minutes** old to prevent replay attacks. Each retry is signed again with a fresh timestamp, so retries pass this check.

```python
import hmac
import hashlib
import os
import time

# Your key's webhook signing secret (API Keys page > Show webhook secret)
WEBHOOK_SECRET = os.environ["SCRIPTIVOX_WEBHOOK_SECRET"]  # "whsec_..."

def verify_webhook(body: bytes, signature: str, timestamp: str) -> bool:
    if not signature or not timestamp:
        return False

    # Check timestamp is recent (within 5 minutes)
    now = int(time.time())
    if abs(now - int(timestamp)) > 300:
        return False

    message = f"{timestamp}.{body.decode()}"
    expected = hmac.new(
        WEBHOOK_SECRET.encode(),
        message.encode(),
        hashlib.sha256
    ).hexdigest()

    return hmac.compare_digest(expected, signature)

# In your webhook handler:
# signature = request.headers.get("X-Scriptivox-Signature", "")
# timestamp = request.headers.get("X-Scriptivox-Timestamp", "")
# is_valid = verify_webhook(request.body, signature, timestamp)
```

```javascript
import { createHmac, timingSafeEqual } from "crypto";

// Your key's webhook signing secret (API Keys page > Show webhook secret)
const WEBHOOK_SECRET = process.env.SCRIPTIVOX_WEBHOOK_SECRET; // "whsec_..."

function verifyWebhook(body, signature, timestamp) {
  if (!signature || !timestamp) return false;

  // Check timestamp is recent (within 5 minutes)
  const now = Math.floor(Date.now() / 1000);
  if (Math.abs(now - parseInt(timestamp)) > 300) {
    return false;
  }

  const message = `${timestamp}.${body}`;
  const expected = createHmac("sha256", WEBHOOK_SECRET)
    .update(message)
    .digest("hex");

  return (
    expected.length === signature.length &&
    timingSafeEqual(Buffer.from(expected), Buffer.from(signature))
  );
}

// In your Express handler, use the RAW body, not the parsed JSON:
//   app.post("/webhook", express.raw({ type: "application/json" }), (req, res) => {
//     const sig = req.headers["x-scriptivox-signature"];
//     const ts  = req.headers["x-scriptivox-timestamp"];
//     const valid = verifyWebhook(req.body.toString("utf8"), sig, ts);
//     if (!valid) return res.sendStatus(401);
//     const payload = JSON.parse(req.body.toString("utf8"));
//     res.sendStatus(200);
//   });
```

## Delivery behavior

### What counts as delivered

- **Any `2xx` status within 10 seconds** means delivered. Retries for that event stop.
- **`410 Gone`** means "stop": we make no more tries for that event.
- **Anything else is retried**: another status code (`4xx` other than 410, `5xx`, a `3xx` we do not follow), no answer within **10 seconds**, or no connection at all.

### Retry schedule

A failed event is retried after these waits, counted from the previous try:

| Try | Wait before it | About this long after the first try |
| --- | --- | --- |
| 1 | none: sent as soon as the event happens | 0 |
| 2 | 30 seconds | 30 s |
| 3 | 2 minutes | 2.5 min |
| 4 | 10 minutes | 12.5 min |
| 5 | 30 minutes | 43 min |
| 6 | 60 minutes | 1 h 43 min |
| 7 | 3 hours | 4 h 43 min |
| 8 | 6 hours | 10 h 43 min |

After the 8th failed try the event is marked failed and not sent again on its own; you can still resend it (below). Retries can be up to a minute later than the times above.

### Duplicates and order

- **Deduplicate by `X-Scriptivox-Delivery`.** The same event can reach you more than once: your server answered after the 10-second limit, a network error hid your 2xx from us, or you resent it. Store the IDs you have handled and answer `2xx` to a repeat without doing the work again.
- **Order is not guaranteed** once retries are involved. Use the `status` field, not arrival order. A `transcription.processing` still waiting for a retry when the job ends is dropped, so it never arrives after the job's final event.

### Delivery log and resend

- The dashboard shows the **last 50 deliveries per API key**: [Settings](/platform/settings) → **Webhook deliveries**, with each event's status, number of tries and the last response code. Deliveries are kept for **30 days**.
- **Resend** any delivery from that list, or a job's final event with [`POST /v1/transcribe/{id}/webhook/resend`](/docs/api-reference#webhook-resend). A resend is one try made at once, with the same `X-Scriptivox-Delivery`; automatic retries still left carry on as scheduled.

### Other details

- **One redirect followed.** If your endpoint returns a 3xx response with a `Location` header, the same body and signature/timestamp headers are re-POSTed to the resolved URL exactly once. Only `https` destinations are followed; any other `Location` is not, and the try counts as failed.
- **User-Agent** on every request starts with `scriptivox-webhook/1` (our hosting adds a suffix after it).
- **Transcriptions complete normally** regardless of webhook delivery status; webhook health does not affect billing or job state.

For anything that must never be missed, also poll `GET /v1/transcribe/{id}` as a fallback, for example for jobs you have not heard about after a few hours. Live API uptime is published at **[status.scriptivox.com](https://status.scriptivox.com)**.

## Best practices

- **Return 2xx quickly:** Acknowledge the webhook within 10 seconds and do any heavy work asynchronously. A slower answer counts as a failed try and is retried.
- **Always verify signatures:** Check the HMAC-SHA256 signature against the raw body before trusting any payload.
- **Check timestamps:** Reject webhooks with `X-Scriptivox-Timestamp` older than 5 minutes to prevent replay attacks.
- **Be idempotent:** Deduplicate by `X-Scriptivox-Delivery`, and act on the `status` field rather than on arrival order.
- **Use HTTPS:** Webhook URLs must be `https://`. For local development, expose your server through an HTTPS tunnel such as ngrok.
- **Answer 410 to stop:** If an endpoint is retired for good, answering `410 Gone` stops further tries for that event.
- **Poll as a fallback:** Webhooks are retried for about 10¾ h; polling `GET /v1/transcribe/{id}` covers a longer outage on your side.

---

- [API Reference](/docs/api-reference): Full endpoint documentation
- [Pricing](/docs/pricing): Pay-as-you-go at $0.20/hour

---

<!-- source: https://platform.scriptivox.com/docs/use-cases -->
<!-- updated: 2026-08-25 -->

# Use Cases

Practical examples of building with the Scriptivox API.

---

## Folder Watcher

A self-contained script that watches a folder for new audio or video files, automatically transcribes them via the Scriptivox API, and saves the results as text files. No manual steps: drop files in and get transcripts out.

### What it does

- Scans `input/` for new audio or video files every 10 seconds (configurable)
- Uploads multiple files in parallel (10 at a time by default, configurable)
- Starts transcription (optionally with speaker diarization and word-level timestamps)
- Receives results via a local [webhook](/docs/webhooks) server
- Saves transcripts as `.txt` files in `output/` with the same base filename
- Moves source files to `done/` on success or `failed/` on failure
- Persists job state to `state.json`, so it survives script restarts
- Falls back to polling `GET /v1/transcribe/{id}` if a webhook is missed (e.g. after a restart or network blip)
- Client-side rate limiting: self-throttles to stay within your plan's limits (never hits 429)
- Round-robin polling: every pending job gets checked, even with thousands in flight
- Handles 10,000+ files/day with no issues

### Prerequisites

- **Python 3.8+** (or **Node.js 18+** for the JavaScript version)
- A Scriptivox API key with balance ([create one here](/platform/keys))
- [ngrok](https://ngrok.com) (free tier works) to expose your local webhook server

### Setup

### Step 1: Install dependencies
**Python:**

```bash
pip install requests
```

**Node.js:** No dependencies needed. It uses built-in `fetch` and `http` (Node 18+).

### Step 2: Expose your local webhook
The script runs a webhook server on port `8765`. Use ngrok to make it accessible from the internet so Scriptivox can deliver results to it:

```bash
ngrok http 8765
```

Copy the HTTPS forwarding URL (e.g. `https://abc123.ngrok.io`). You'll use it in the next step.

### Step 3: Run the script
Set your API key, its webhook signing secret (on the [API Keys](/keys) page, **Show webhook secret** under the key) and a public https URL that reaches the script's webhook server (port 8765, for example through an ngrok tunnel), then start:

```bash
export SCRIPTIVOX_API_KEY="sk_live_YOUR_KEY"
export SCRIPTIVOX_WEBHOOK_SECRET="whsec_YOUR_SECRET"
export WEBHOOK_URL="https://abc123.ngrok.io/webhook"
python transcribe_watcher.py
```

Or for Node.js:

```bash
SCRIPTIVOX_API_KEY=sk_live_YOUR_KEY \
SCRIPTIVOX_WEBHOOK_SECRET=whsec_YOUR_SECRET \
WEBHOOK_URL=https://abc123.ngrok.io/webhook \
node transcribe_watcher.mjs
```

### Step 4: Drop files and get transcripts
Put any audio or video file in the `input/` folder. The script picks it up on the next scan, uploads it, and transcribes it. Files are moved automatically once processed:

```
project/
  input/                    <- drop files here
  output/
    meeting.txt             <- transcripts appear here
    podcast.txt
  done/
    meeting.mp3             <- source files after success
    podcast.wav
  failed/
    corrupted.mp3           <- source files after failure
  state.json                <- tracks pending jobs (survives restarts)
  transcribe_watcher.py     <- or transcribe_watcher.mjs for Node
```

### The script

```python
#!/usr/bin/env python3
"""
Scriptivox Folder Watcher
Watches a folder for new audio/video files, transcribes them,
and saves results as text files.

Handles high-volume workloads (10,000+ files/day) with:
- Concurrent uploads (configurable worker count)
- Client-side rate limiting (never hits 429)
- Separate polling thread (doesn't block submissions)
- Round-robin polling (all jobs get checked)
- Restart resilience via state.json

Folder structure:
  input/    <- drop audio/video files here
  output/   <- transcripts saved here as .txt
  done/     <- source files moved here after success
  failed/   <- source files moved here after failure

Usage:
  export SCRIPTIVOX_API_KEY="sk_live_YOUR_KEY"
  export SCRIPTIVOX_WEBHOOK_SECRET="whsec_YOUR_SECRET"
  export WEBHOOK_URL="https://abc123.ngrok.io/webhook"
  python transcribe_watcher.py
"""

import os
import sys
import time
import json
import hashlib
import hmac
import shutil
import random
import threading
import requests
from concurrent.futures import ThreadPoolExecutor
from http.server import HTTPServer, BaseHTTPRequestHandler
from pathlib import Path
from collections import deque

# ─── Configuration ───────────────────────────────────────

API_KEY       = os.environ.get("SCRIPTIVOX_API_KEY", "")
# The key's webhook signing secret (API Keys page > Show webhook secret)
WEBHOOK_SECRET = os.environ.get("SCRIPTIVOX_WEBHOOK_SECRET", "")
BASE_URL      = "https://api.scriptivox.com/v1"
INPUT_DIR     = Path("input")
OUTPUT_DIR    = Path("output")
DONE_DIR      = Path("done")
FAILED_DIR    = Path("failed")
STATE_FILE    = Path("state.json")
SCAN_INTERVAL = 10        # seconds between folder scans
POLL_INTERVAL = 30        # seconds between poll cycles
WEBHOOK_PORT  = 8765
# Public https URL that reaches WEBHOOK_PORT (e.g. an ngrok tunnel)
WEBHOOK_URL   = os.environ.get("WEBHOOK_URL", "")
DIARIZE       = False     # set True to enable speaker diarization
ALIGN         = True      # word-level timestamps; set False to opt out (auto-True when DIARIZE)
MAX_PARALLEL_UPLOADS = 10  # how many files to upload at the same time

# Rate limits (requests per minute): set these to match your plan.
# Keep slightly below actual limits to leave headroom.
RATE_LIMITS = {
    "upload":     50,     # POST /v1/upload
    "transcribe": 50,     # POST /v1/transcribe
    "poll":       150,    # GET  /v1/transcribe/{id}
}

SUPPORTED = {
    ".mp3", ".wav", ".m4a", ".aac", ".ogg", ".oga", ".flac",
    ".wma", ".aiff", ".opus", ".caf", ".mp4", ".mov", ".avi",
    ".mkv", ".webm", ".wmv", ".flv", ".m4v", ".3gp", ".mpeg",
    ".mts", ".ogv", ".ts", ".vob", ".f4v",
}

state_lock = threading.Lock()
pending = {}       # transcription_id -> filename
poll_offset = 0    # tracks where we left off polling

# ─── Rate Limiter ────────────────────────────────────────

class RateLimiter:
    """Token-bucket rate limiter. Blocks until a request is allowed."""

    def __init__(self, max_per_minute):
        self.max_per_minute = max_per_minute
        self.timestamps = deque()
        self.lock = threading.Lock()

    def wait(self):
        """Block until we can make a request within the rate limit."""
        with self.lock:
            now = time.time()
            # Remove timestamps older than 60s
            while self.timestamps and now - self.timestamps[0] > 60:
                self.timestamps.popleft()
            if len(self.timestamps) >= self.max_per_minute:
                wait_time = 60 - (now - self.timestamps[0]) + 0.1
                self.lock.release()
                time.sleep(wait_time)
                self.lock.acquire()
                now = time.time()
                while self.timestamps and now - self.timestamps[0] > 60:
                    self.timestamps.popleft()
            self.timestamps.append(time.time())

limiters = {
    name: RateLimiter(rpm) for name, rpm in RATE_LIMITS.items()
}

# ─── State Persistence ───────────────────────────────────

def load_state():
    """Load pending jobs from disk."""
    if STATE_FILE.exists():
        data = json.loads(STATE_FILE.read_text())
        return data.get("pending", {})
    return {}

def save_state():
    """Save pending jobs to disk."""
    with state_lock:
        STATE_FILE.write_text(json.dumps({"pending": pending}, indent=2))

# ─── Helpers ─────────────────────────────────────────────

def unique_output_name(filename, prefix=""):
    """Generate a unique output filename, appending a number if needed."""
    stem = Path(filename).stem
    name = f"{prefix}{stem}.txt"
    out = OUTPUT_DIR / name
    if not out.exists():
        return out
    # Append incrementing number to avoid collision
    n = 2
    while True:
        name = f"{prefix}{stem}_{n}.txt"
        out = OUTPUT_DIR / name
        if not out.exists():
            return out
        n += 1

def already_processed(filename):
    """Check if output already has a result for this file."""
    stem = Path(filename).stem
    return (
        (OUTPUT_DIR / f"{stem}.txt").exists() or
        (OUTPUT_DIR / f"failed_{stem}.txt").exists()
    )

def write_failure(filename, error_code, error_message):
    """Write a failure log to output/."""
    out = unique_output_name(filename, prefix="failed_")
    out.write_text(
        f"File: {filename}\nError: {error_code}: {error_message}\n",
        encoding="utf-8",
    )
    return out

# ─── API Helper ──────────────────────────────────────────

def api_request(method, url, limiter_name, max_retries=5, **kwargs):
    """Make a rate-limited API request with retry on 429."""
    limiter = limiters.get(limiter_name)
    for attempt in range(max_retries):
        if limiter:
            limiter.wait()
        r = requests.request(method, url, **kwargs)
        if r.status_code == 429:
            retry_after = int(r.headers.get("Retry-After", 10))
            print(f"  Rate limited (429), waiting {retry_after}s "
                  f"(attempt {attempt + 1}/{max_retries})")
            time.sleep(retry_after)
            continue
        return r
    return r  # return last response even if still 429

# ─── Webhook Server ─────────────────────────────────────

class WebhookHandler(BaseHTTPRequestHandler):
    def do_POST(self):
        length = int(self.headers.get("Content-Length", 0))
        body = self.rfile.read(length)

        # Verify HMAC signature: unsigned requests are rejected too
        sig = self.headers.get("X-Scriptivox-Signature", "")
        ts  = self.headers.get("X-Scriptivox-Timestamp", "")
        expected = hmac.new(
            WEBHOOK_SECRET.encode(),
            f"{ts}.{body.decode()}".encode(),
            hashlib.sha256,
        ).hexdigest()
        if not (sig and ts and hmac.compare_digest(expected, sig)):
            print(f"  [webhook] Rejected: invalid signature")
            self.send_response(401)
            self.end_headers()
            return

        data   = json.loads(body)
        event  = data.get("event", "unknown")
        txn_id = data.get("transcription_id", "?")

        with state_lock:
            if event == "transcription.completed" and txn_id in pending:
                name = pending.pop(txn_id)
                text = data["result"]["full_transcript"]

                out = unique_output_name(name)
                out.write_text(text, encoding="utf-8")

                src = INPUT_DIR / name
                if src.exists():
                    shutil.move(str(src), str(DONE_DIR / name))

                save_state()
                print(f"  [webhook] completed  {name}")
                print(f"           transcript -> {out}")

            elif event == "transcription.failed" and txn_id in pending:
                name = pending.pop(txn_id)
                err  = data.get("error", {})
                code = err.get("code", "UNKNOWN")
                msg  = err.get("message", "unknown error")

                fail_out = write_failure(name, code, msg)
                src = INPUT_DIR / name
                if src.exists():
                    shutil.move(str(src), str(FAILED_DIR / name))

                save_state()
                print(f"  [webhook] failed     {name}")
                print(f"           error      {code}: {msg}")

            else:
                print(f"  [webhook] {event}  txn={txn_id}")

        self.send_response(200)
        self.end_headers()

    def log_message(self, *_):
        pass

# ─── Poll Pending Jobs (separate thread) ─────────────────

def poll_loop():
    """Continuously polls pending jobs in a round-robin fashion.
    Runs in its own thread so it never blocks file submissions."""
    global poll_offset

    while True:
        time.sleep(POLL_INTERVAL)

        with state_lock:
            items = list(pending.items())

        if not items:
            continue

        # Round-robin: start from where we left off last time
        if poll_offset >= len(items):
            poll_offset = 0

        # Rotate the list so we start from the offset
        rotated = items[poll_offset:] + items[:poll_offset]
        polled = 0

        for txn_id, name in rotated:
            try:
                r = api_request(
                    "GET", f"{BASE_URL}/transcribe/{txn_id}",
                    limiter_name="poll",
                    headers={"Authorization": API_KEY},
                )
                if r.status_code == 429:
                    break
                if r.status_code != 200:
                    polled += 1
                    continue
                data = r.json()
                status = data.get("status")

                if status == "completed":
                    text = data.get("result", {}).get("full_transcript", "")
                    out = unique_output_name(name)
                    out.write_text(text, encoding="utf-8")
                    src = INPUT_DIR / name
                    if src.exists():
                        shutil.move(str(src), str(DONE_DIR / name))
                    with state_lock:
                        pending.pop(txn_id, None)
                        save_state()
                    print(f"  [poll] completed  {name}")

                elif status == "failed":
                    err = data.get("error", {})
                    code = err.get("code", "UNKNOWN")
                    msg  = err.get("message", "unknown error")
                    write_failure(name, code, msg)
                    src = INPUT_DIR / name
                    if src.exists():
                        shutil.move(str(src), str(FAILED_DIR / name))
                    with state_lock:
                        pending.pop(txn_id, None)
                        save_state()
                    print(f"  [poll] failed     {name} ({code}): {msg}")

                polled += 1
            except Exception:
                polled += 1

        poll_offset = (poll_offset + polled) % max(len(items), 1)

# ─── Upload & Transcribe ────────────────────────────────

def process_file(filepath):
    name = filepath.name

    if already_processed(name):
        return

    with state_lock:
        if name in pending.values():
            return

    print(f"  Upload {name}")

    try:
        # 1. Get presigned upload URL
        r = api_request(
            "POST", f"{BASE_URL}/upload",
            limiter_name="upload",
            headers={"Authorization": API_KEY, "Content-Type": "application/json"},
            json={"filename": name},
        )
        r.raise_for_status()
        upload = r.json()

        # 2. Upload file (streams from disk, no full-file memory load)
        content_type = upload["headers"]["Content-Type"]
        with open(filepath, "rb") as f:
            requests.put(
                upload["upload_url"],
                headers={"Content-Type": content_type},
                data=f,
            ).raise_for_status()

        # 3. Start transcription
        body = {
            "upload_id":   upload["upload_id"],
            "webhook_url": WEBHOOK_URL,
        }
        if DIARIZE:
            body["diarize"] = True
        if ALIGN:
            body["align"] = True

        r = api_request(
            "POST", f"{BASE_URL}/transcribe",
            limiter_name="transcribe",
            headers={"Authorization": API_KEY, "Content-Type": "application/json"},
            json=body,
        )
        r.raise_for_status()
        job = r.json()

        with state_lock:
            pending[job["id"]] = name
            save_state()

        print(f"  Queued {name} (ID: {job['id']})")

    except requests.HTTPError as e:
        try:
            err_body = e.response.json() if e.response else {}
        except ValueError:
            err_body = {}
        code = err_body.get("error", {}).get("code", "HTTP_ERROR")
        msg  = err_body.get("error", {}).get("message", str(e))
        print(f"  Error  {name}: {msg}")
        fail_out = write_failure(name, code, msg)
        if filepath.exists():
            shutil.move(str(filepath), str(FAILED_DIR / name))
        print(f"         log    -> {fail_out}")
    except Exception as e:
        print(f"  Error  {name}: {e}")
        fail_out = write_failure(name, "SCRIPT_ERROR", str(e))
        if filepath.exists():
            shutil.move(str(filepath), str(FAILED_DIR / name))
        print(f"         log    -> {fail_out}")

# ─── Main Loop ──────────────────────────────────────────

def main():
    if not API_KEY:
        print("Set SCRIPTIVOX_API_KEY environment variable")
        sys.exit(1)
    if not WEBHOOK_SECRET or not WEBHOOK_URL.startswith("https://"):
        print("Set SCRIPTIVOX_WEBHOOK_SECRET and an https WEBHOOK_URL")
        sys.exit(1)

    for d in [INPUT_DIR, OUTPUT_DIR, DONE_DIR, FAILED_DIR]:
        d.mkdir(exist_ok=True)

    pending.update(load_state())
    if pending:
        print(f"Resumed {len(pending)} pending job(s) from state.json")

    # Start webhook server in background
    server = HTTPServer(("0.0.0.0", WEBHOOK_PORT), WebhookHandler)
    threading.Thread(target=server.serve_forever, daemon=True).start()

    # Start polling thread in background
    threading.Thread(target=poll_loop, daemon=True).start()

    print(f"Webhook server on port {WEBHOOK_PORT}")
    print(f"Watching    {INPUT_DIR.resolve()}")
    print(f"Output      {OUTPUT_DIR.resolve()}")
    print(f"Parallel    {MAX_PARALLEL_UPLOADS} uploads at a time")
    print(f"Rate limits upload={RATE_LIMITS['upload']}/min "
          f"transcribe={RATE_LIMITS['transcribe']}/min "
          f"poll={RATE_LIMITS['poll']}/min")
    print(f"Diarize     {DIARIZE}")
    print(f"Align       {ALIGN}")
    print(f"Scan every  {SCAN_INTERVAL}s")
    print(f"Poll every  {POLL_INTERVAL}s\n")

    with ThreadPoolExecutor(max_workers=MAX_PARALLEL_UPLOADS) as pool:
        while True:
            files = sorted(
                f for f in INPUT_DIR.iterdir()
                if f.suffix.lower() in SUPPORTED
            )
            if files:
                # Submit all new files to the worker pool
                futures = []
                for f in files:
                    futures.append(pool.submit(process_file, f))
                # Wait for this batch to finish before next scan
                for fut in futures:
                    try:
                        fut.result()
                    except Exception as e:
                        print(f"  Worker error: {e}")
            time.sleep(SCAN_INTERVAL)

if __name__ == "__main__":
    main()
```

```javascript
#!/usr/bin/env node
/**
 * Scriptivox Folder Watcher
 * Watches a folder for new audio/video files, transcribes them,
 * and saves results as text files.
 *
 * Handles high-volume workloads (10,000+ files/day) with:
 * - Concurrent uploads (configurable worker count)
 * - Client-side rate limiting (never hits 429)
 * - Separate polling interval (doesn't block submissions)
 * - Round-robin polling (all jobs get checked)
 * - Streaming file uploads (no full-file memory load)
 * - Restart resilience via state.json
 *
 * Folder structure:
 *   input/    <- drop audio/video files here
 *   output/   <- transcripts saved here as .txt
 *   done/     <- source files moved here after success
 *   failed/   <- source files moved here after failure
 *
 * Usage:
 *   SCRIPTIVOX_API_KEY=sk_live_YOUR_KEY \
 *   SCRIPTIVOX_WEBHOOK_SECRET=whsec_YOUR_SECRET \
 *   WEBHOOK_URL=https://abc123.ngrok.io/webhook \
 *   node transcribe_watcher.mjs
 */

import fs from "fs";
import path from "path";
import http from "http";
import crypto from "crypto";

// ─── Configuration ──────────────────────────────────────

const API_KEY       = process.env.SCRIPTIVOX_API_KEY || "";
// The key's webhook signing secret (API Keys page > Show webhook secret)
const WEBHOOK_SECRET = process.env.SCRIPTIVOX_WEBHOOK_SECRET || "";
const BASE_URL      = "https://api.scriptivox.com/v1";
const INPUT_DIR     = path.resolve("input");
const OUTPUT_DIR    = path.resolve("output");
const DONE_DIR      = path.resolve("done");
const FAILED_DIR    = path.resolve("failed");
const STATE_FILE    = path.resolve("state.json");
const SCAN_INTERVAL = 10_000;   // ms between folder scans
const POLL_INTERVAL = 30_000;   // ms between poll cycles
const WEBHOOK_PORT  = 8765;
// Public https URL that reaches WEBHOOK_PORT (e.g. an ngrok tunnel)
const WEBHOOK_URL   = process.env.WEBHOOK_URL || "";
const DIARIZE       = false;
const ALIGN         = true;
const MAX_PARALLEL_UPLOADS = 10; // how many files to upload at the same time

// Rate limits (requests per minute): set these to match your plan.
// Keep slightly below actual limits to leave headroom.
const RATE_LIMITS = {
  upload:     50,     // POST /v1/upload
  transcribe: 50,     // POST /v1/transcribe
  poll:       150,    // GET  /v1/transcribe/{id}
};

const SUPPORTED = new Set([
  ".mp3", ".wav", ".m4a", ".aac", ".ogg", ".oga", ".flac",
  ".wma", ".aiff", ".opus", ".caf", ".mp4", ".mov", ".avi",
  ".mkv", ".webm", ".wmv", ".flv", ".m4v", ".3gp", ".mpeg",
  ".mts", ".ogv", ".ts", ".vob", ".f4v",
]);

// ─── Rate Limiter ───────────────────────────────────────

class RateLimiter {
  constructor(maxPerMinute) {
    this.maxPerMinute = maxPerMinute;
    this.timestamps = [];
  }

  async wait() {
    // Remove timestamps older than 60s
    const now = Date.now();
    this.timestamps = this.timestamps.filter((t) => now - t < 60_000);
    if (this.timestamps.length >= this.maxPerMinute) {
      const waitMs = 60_000 - (now - this.timestamps[0]) + 100;
      await sleep(waitMs);
      const now2 = Date.now();
      this.timestamps = this.timestamps.filter((t) => now2 - t < 60_000);
    }
    this.timestamps.push(Date.now());
  }
}

const limiters = {
  upload:     new RateLimiter(RATE_LIMITS.upload),
  transcribe: new RateLimiter(RATE_LIMITS.transcribe),
  poll:       new RateLimiter(RATE_LIMITS.poll),
};

// ─── State Persistence ──────────────────────────────────

function loadState() {
  if (fs.existsSync(STATE_FILE)) {
    const data = JSON.parse(fs.readFileSync(STATE_FILE, "utf-8"));
    return new Map(Object.entries(data.pending || {}));
  }
  return new Map();
}

function saveState(pending) {
  const obj = { pending: Object.fromEntries(pending) };
  fs.writeFileSync(STATE_FILE, JSON.stringify(obj, null, 2));
}

const pending = loadState();
let pollOffset = 0;

// ─── Helpers ────────────────────────────────────────────

const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

function uniqueOutputName(filename, prefix = "") {
  const stem = path.parse(filename).name;
  let name = `${prefix}${stem}.txt`;
  let out = path.join(OUTPUT_DIR, name);
  if (!fs.existsSync(out)) return out;
  let n = 2;
  while (true) {
    name = `${prefix}${stem}_${n}.txt`;
    out = path.join(OUTPUT_DIR, name);
    if (!fs.existsSync(out)) return out;
    n++;
  }
}

function alreadyProcessed(filename) {
  const stem = path.parse(filename).name;
  return (
    fs.existsSync(path.join(OUTPUT_DIR, `${stem}.txt`)) ||
    fs.existsSync(path.join(OUTPUT_DIR, `failed_${stem}.txt`))
  );
}

function writeFailure(filename, errorCode, errorMessage) {
  const out = uniqueOutputName(filename, "failed_");
  fs.writeFileSync(out, `File: ${filename}\nError: ${errorCode}: ${errorMessage}\n`, "utf-8");
  return out;
}

function moveFile(src, destDir) {
  const name = path.basename(src);
  const dest = path.join(destDir, name);
  if (fs.existsSync(src)) fs.renameSync(src, dest);
  return dest;
}

async function api(method, endpoint, limiterName, body, maxRetries = 5) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    await limiters[limiterName].wait();

    const res = await fetch(`${BASE_URL}${endpoint}`, {
      method,
      headers: {
        Authorization: API_KEY,
        "Content-Type": "application/json",
      },
      body: body ? JSON.stringify(body) : undefined,
    });

    if (res.status === 429) {
      const retryAfter = parseInt(res.headers.get("Retry-After") || "10");
      console.log(`  Rate limited (429), waiting ${retryAfter}s `
        + `(attempt ${attempt + 1}/${maxRetries})`);
      await sleep(retryAfter * 1000);
      continue;
    }

    const data = await res.json();
    if (!res.ok) throw new Error(data.error?.message || `HTTP ${res.status}`);
    return data;
  }
  throw new Error("Rate limited after max retries");
}

// ─── Webhook Server ─────────────────────────────────────

http.createServer((req, res) => {
  if (req.method !== "POST") {
    res.writeHead(405);
    return res.end();
  }

  let body = "";
  req.on("data", (c) => (body += c));
  req.on("end", () => {
    // Verify HMAC signature: unsigned requests are rejected too
    const sig = req.headers["x-scriptivox-signature"] || "";
    const ts  = req.headers["x-scriptivox-timestamp"] || "";
    const expected = crypto
      .createHmac("sha256", WEBHOOK_SECRET)
      .update(`${ts}.${body}`)
      .digest("hex");
    if (!ts || sig.length !== expected.length || !crypto.timingSafeEqual(
      Buffer.from(expected), Buffer.from(sig)
    )) {
      console.log("  [webhook] Rejected: invalid signature");
      res.writeHead(401);
      return res.end();
    }

    const data  = JSON.parse(body);
    const event = data.event || "unknown";
    const txnId = data.transcription_id || "?";

    if (event === "transcription.completed" && pending.has(txnId)) {
      const name = pending.get(txnId);
      pending.delete(txnId);

      const out = uniqueOutputName(name);
      fs.writeFileSync(out, data.result.full_transcript, "utf-8");
      moveFile(path.join(INPUT_DIR, name), DONE_DIR);

      saveState(pending);
      console.log(`  [webhook] completed  ${name}`);
      console.log(`           transcript -> ${out}`);

    } else if (event === "transcription.failed" && pending.has(txnId)) {
      const name = pending.get(txnId);
      pending.delete(txnId);
      const err = data.error || {};
      const code = err.code || "UNKNOWN";
      const msg  = err.message || "unknown error";

      const failOut = writeFailure(name, code, msg);
      moveFile(path.join(INPUT_DIR, name), FAILED_DIR);

      saveState(pending);
      console.log(`  [webhook] failed     ${name}`);
      console.log(`           error      ${code}: ${msg}`);

    } else {
      console.log(`  [webhook] ${event}  txn=${txnId}`);
    }

    res.writeHead(200);
    res.end();
  });
}).listen(WEBHOOK_PORT);

// ─── Poll Pending Jobs (separate interval) ───────────────

setInterval(async () => {
  const items = [...pending];
  if (items.length === 0) return;

  if (pollOffset >= items.length) pollOffset = 0;

  // Round-robin: start from where we left off
  const rotated = [...items.slice(pollOffset), ...items.slice(0, pollOffset)];
  let polled = 0;

  for (const [txnId, name] of rotated) {
    try {
      await limiters.poll.wait();

      const res = await fetch(`${BASE_URL}/transcribe/${txnId}`, {
        headers: { Authorization: API_KEY },
      });
      if (res.status === 429) break;
      if (!res.ok) { polled++; continue; }
      const data = await res.json();

      if (data.status === "completed") {
        const text = data.result?.full_transcript || "";
        const out = uniqueOutputName(name);
        fs.writeFileSync(out, text, "utf-8");
        moveFile(path.join(INPUT_DIR, name), DONE_DIR);
        pending.delete(txnId);
        saveState(pending);
        console.log(`  [poll] completed  ${name}`);

      } else if (data.status === "failed") {
        const err = data.error || {};
        const code = err.code || "UNKNOWN";
        const msg  = err.message || "unknown error";
        writeFailure(name, code, msg);
        moveFile(path.join(INPUT_DIR, name), FAILED_DIR);
        pending.delete(txnId);
        saveState(pending);
        console.log(`  [poll] failed     ${name} (${code}): ${msg}`);
      }

      polled++;
    } catch {
      polled++;
    }
  }

  pollOffset = (pollOffset + polled) % Math.max(items.length, 1);
}, POLL_INTERVAL);

// ─── Concurrency Pool ────────────────────────────────────

async function runPool(tasks, concurrency) {
  const results = [];
  let index = 0;

  async function worker() {
    while (index < tasks.length) {
      const i = index++;
      try {
        await tasks[i]();
      } catch (err) {
        console.log(`  Worker error: ${err.message}`);
      }
    }
  }

  const workers = [];
  for (let i = 0; i < Math.min(concurrency, tasks.length); i++) {
    workers.push(worker());
  }
  await Promise.all(workers);
  return results;
}

// ─── Upload & Transcribe ────────────────────────────────

async function processFile(filePath) {
  const name = path.basename(filePath);

  if (alreadyProcessed(name)) return;

  for (const val of pending.values()) {
    if (val === name) return;
  }

  console.log(`  Upload ${name}`);

  try {
    // 1. Get presigned upload URL
    const upload = await api("POST", "/upload", "upload", { filename: name });

    // 2. Upload file using streaming (no full-file memory load)
    const contentType = upload.headers["Content-Type"];
    const fileStream = fs.createReadStream(filePath);
    const stats = fs.statSync(filePath);

    const putRes = await fetch(upload.upload_url, {
      method: "PUT",
      headers: {
        "Content-Type": contentType,
        "Content-Length": stats.size.toString(),
      },
      body: fileStream,
      duplex: "half",
    });
    if (!putRes.ok) throw new Error(`Upload failed: ${putRes.status}`);

    // 3. Start transcription
    const body = {
      upload_id:   upload.upload_id,
      webhook_url: WEBHOOK_URL,
    };
    if (DIARIZE) body.diarize = true;
    if (ALIGN) body.align = true;

    const job = await api("POST", "/transcribe", "transcribe", body);

    pending.set(job.id, name);
    saveState(pending);

    console.log(`  Queued ${name} (ID: ${job.id})`);
  } catch (err) {
    console.log(`  Error  ${name}: ${err.message}`);
    const failOut = writeFailure(name, "UPLOAD_ERROR", err.message);
    if (fs.existsSync(filePath)) moveFile(filePath, FAILED_DIR);
    console.log(`         log    -> ${failOut}`);
  }
}

// ─── Main Loop ──────────────────────────────────────────

async function main() {
  if (!API_KEY) {
    console.error("Set SCRIPTIVOX_API_KEY environment variable");
    process.exit(1);
  }
  if (!WEBHOOK_SECRET || !WEBHOOK_URL.startsWith("https://")) {
    console.error("Set SCRIPTIVOX_WEBHOOK_SECRET and an https WEBHOOK_URL");
    process.exit(1);
  }

  for (const dir of [INPUT_DIR, OUTPUT_DIR, DONE_DIR, FAILED_DIR]) {
    fs.mkdirSync(dir, { recursive: true });
  }

  if (pending.size > 0) {
    console.log(`Resumed ${pending.size} pending job(s) from state.json`);
  }

  console.log(`Webhook server on port ${WEBHOOK_PORT}`);
  console.log(`Watching    ${INPUT_DIR}`);
  console.log(`Output      ${OUTPUT_DIR}`);
  console.log(`Parallel    ${MAX_PARALLEL_UPLOADS} uploads at a time`);
  console.log(`Rate limits upload=${RATE_LIMITS.upload}/min `
    + `transcribe=${RATE_LIMITS.transcribe}/min `
    + `poll=${RATE_LIMITS.poll}/min`);
  console.log(`Diarize     ${DIARIZE}`);
  console.log(`Align       ${ALIGN}`);
  console.log(`Scan every  ${SCAN_INTERVAL / 1000}s`);
  console.log(`Poll every  ${POLL_INTERVAL / 1000}s\n`);

  while (true) {
    const files = fs.readdirSync(INPUT_DIR)
      .filter((f) => SUPPORTED.has(path.extname(f).toLowerCase()))
      .sort();

    if (files.length > 0) {
      const tasks = files.map(
        (f) => () => processFile(path.join(INPUT_DIR, f))
      );
      await runPool(tasks, MAX_PARALLEL_UPLOADS);
    }

    await sleep(SCAN_INTERVAL);
  }
}

main();
```

### How it works

1. **Startup:** Creates `input/`, `output/`, `done/`, and `failed/` folders. Loads any pending jobs from `state.json` (so it picks up where it left off after a restart). Starts a webhook server on port 8765 in a background thread. Starts a separate polling thread for webhook fallback.
2. **Scan loop:** Every 10 seconds, scans `input/` for files with [supported extensions](/docs/api-reference#supported-formats). New files are submitted to a concurrent worker pool (10 workers by default) for parallel upload and transcription.
3. **Rate limiting:** Before each API call, the client-side rate limiter checks whether the request fits within the configured limit. If at capacity, it waits automatically. This prevents 429 errors instead of reacting to them. Set the limits slightly below your plan's actual limits to leave headroom.
4. **Upload:** Each worker requests a presigned upload URL via `POST /v1/upload`, then streams the file with a `PUT` request using the exact `Content-Type` returned by the API. Files are streamed from disk (no full-file memory load). If the API returns 429 despite client-side limiting, the script waits for the `Retry-After` duration and retries (up to 5 attempts).
5. **Transcribe:** Starts a transcription job via `POST /v1/transcribe` with the `upload_id` and `webhook_url`. The API returns immediately with `status: "created"`, and the file is validated and transcribed in the background. The job is saved to `state.json` so it persists across restarts.
6. **Webhook:** When Scriptivox finishes a transcription, it POSTs the result to your webhook. The handler verifies the [HMAC-SHA256 signature](/docs/webhooks#verifying-webhook-signatures), saves the transcript to `output/<filename>.txt`, and moves the source file to `done/`. All webhook events are logged.
7. **Polling fallback:** A separate thread polls pending jobs every 30 seconds in round-robin order, so every job eventually gets checked, even with thousands in flight. This catches results if a webhook is missed (e.g. your server was down for longer than the roughly 10¾ h webhooks are retried). Webhooks are retried with backoff and deduplicated by `X-Scriptivox-Delivery`, so the poll is a backstop, not the main path.
8. **Failure:** If a transcription fails, the webhook (or poll) handler logs the error, moves the source file to `failed/`, and removes the job from state. If the upload itself fails (HTTP error, rate limit exhausted), the file is also moved to `failed/`. Either way, the watcher continues processing other files.

### Configuration

| Variable | Default | Description |
| --- | --- | --- |
| SCRIPTIVOX_API_KEY | (none) | Your API key (required) |
| SCRIPTIVOX_WEBHOOK_SECRET | (none) | The key's webhook signing secret, `whsec_…` (required) |
| WEBHOOK_URL | (none) | Public https URL that reaches the webhook server (required) |
| MAX_PARALLEL_UPLOADS | 10 | How many files to upload at the same time |
| SCAN_INTERVAL | 10 | Seconds between folder scans |
| POLL_INTERVAL | 30 | Seconds between polling cycles |
| WEBHOOK_PORT | 8765 | Local port for the webhook server |
| DIARIZE | False | Set to True to enable speaker diarization (auto-detects number of speakers) |
| ALIGN | True | Word-level timestamps (set False to opt out; auto-forced True when DIARIZE is True) |
| INPUT_DIR | ./input | Folder to watch for new files |
| OUTPUT_DIR | ./output | Folder to save transcripts |
| DONE_DIR | ./done | Completed source files moved here |
| FAILED_DIR | ./failed | Failed source files moved here |
| RATE_LIMITS.upload | 50 | Max upload requests/min (keep below your plan's limit) |
| RATE_LIMITS.transcribe | 50 | Max transcribe requests/min (keep below your plan's limit) |
| RATE_LIMITS.poll | 150 | Max polling requests/min (keep below your plan's limit) |

To change the rate limits, concurrency, or directories, edit the constants at the top of the script. Set the rate limits slightly below your actual plan limits to leave headroom.

> **Polling-only mode:** 
> The script already polls pending jobs as a webhook fallback. If you'd rather skip webhooks entirely, remove the webhook server and the `SCRIPTIVOX_WEBHOOK_SECRET` / `WEBHOOK_URL` check in `main`, drop `webhook_url` from the transcribe request, and lean on the polling thread alone. See the [Get Result](/docs/api-reference#get-result) endpoint for details.

> **Filenames must be ASCII:** 
> The Scriptivox API rejects filenames with non-ASCII characters (accents, CJK, emoji) and reserved characters (`/`, `\`, `<`, `>`, `"`, `'`, backtick). The watcher will surface these as `INVALID_FILENAME` and move the file to `failed/`. Rename source files to ASCII before dropping them in `input/`. See [filename rules](/docs/api-reference#important-notes) for details.

---

- [API Reference](/docs/api-reference): Full endpoint documentation
- [Webhooks](/docs/webhooks): Webhook setup and verification

---

<!-- source: https://platform.scriptivox.com/docs/authentication -->
<!-- updated: 2026-08-25 -->

# Authentication

Every Scriptivox API request is authenticated with an API key. There is no session login, no OAuth flow, and no cookie. A key is the only credential the API accepts.

**Base URL:** `https://api.scriptivox.com/v1`

---

## Get a key

Create one at [platform.scriptivox.com/keys](/keys). Keys look like `sk_live_` followed by 48 hexadecimal characters.

The full key value is shown **once**, at creation. Store it immediately: the dashboard keeps only a prefix afterwards so you can tell your keys apart, and there is no way to recover a lost key. Create a replacement and revoke the old one instead.

> **An API key is not a web subscription:** 
> Scriptivox is two products, billed separately. A subscription on [scriptivox.com](https://www.scriptivox.com) grants nothing to the API, and API usage draws down a prepaid balance you top up at [/billing](/billing), at $0.20 per hour of audio. Even on Pro, `POST /v1/transcribe` returns `402 ZERO_BALANCE` at $0.

## Send the key

Two headers are accepted. They are equivalent, so pick one:

```http
Authorization: sk_live_a1b2c3...
```

```http
X-Api-Key: sk_live_a1b2c3...
```

A `Bearer ` prefix on `Authorization` is accepted but not required, so `Authorization: Bearer sk_live_…` works too. Header names are case-insensitive.

```bash
curl https://api.scriptivox.com/v1/balance \
  -H "Authorization: sk_live_YOUR_KEY"
```

If both headers are present, `X-Api-Key` wins.

## Limits on keys

Each account may hold **at most 5 active keys**. If you hit the ceiling, revoke an unused key before creating another.

Rate limits are enforced per key per endpoint, plus a per-IP cap across all endpoints. Every response, including the `401` you get with no key at all, carries `RateLimit-Policy`, so you can read the limits before you have a working key. See [Rate Limits](/docs/api-reference#rate-limits).

## Rotating a key

Keys have no expiry, so rotation is something you choose to do rather than something forced on you:

1. Create the new key at [/keys](/keys).
2. Deploy it. Both keys are live and both draw on the same account balance, so there is no cutover window to coordinate.
3. Revoke the old key.

Revocation takes effect immediately. The gateway caches *malformed* keys for five minutes to blunt brute-force attempts, but a well-formed `sk_live_` key that starts returning `401` is never cached: a transient backend blip must not brick a real customer's key for five minutes, so every request re-checks. The cost of that choice is one extra lookup per failure; the benefit is that revoking a leaked key is instant.

## When authentication fails

| Status | Code | What happened |
| --- | --- | --- |
| `401` | `INVALID_API_KEY` | No key, a malformed key, or a key that does not exist. |
| `401` | `API_KEY_REVOKED` | The key was valid and has since been revoked. |
| `402` | `ZERO_BALANCE` | The key is fine. The account balance is $0. Add credit at [/billing](/billing). |
| `429` | `RATE_LIMIT_EXCEEDED` | Valid key, too many requests. Honour `Retry-After`. |

Repeated authentication failures from one IP earn a progressive block: 60 seconds, then 5 minutes, then 30 minutes. The block returns `429 RATE_LIMIT_EXCEEDED` with a `Retry-After` header rather than another `401`, so a client retrying a bad key in a tight loop will start seeing 429s. Fix the key rather than retrying.

Every error body is the same shape, with a stable machine-readable code:

```json
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "This API key was not recognized. Check that you copied the whole key, or create a new one at https://platform.scriptivox.com/keys",
    "docs_url": "https://www.scriptivox.com/errors/api-key-invalid",
    "help_id": "api-key-invalid",
    "request_id": "req_8f3a1c2b9d4e6f70"
  }
}
```

`docs_url` opens the page that explains that exact error and what to do ([Help pages](/docs/api-reference#help-pages)).

The full list is in [Error Codes](/docs/api-reference#error-codes).

## Keeping a key secret

- **Never ship a key to a browser or a mobile app.** Anything a user can run, a user can read. Call the API from your own server and expose your own endpoint to the client.
- **Never commit one.** Read it from the environment: `SCRIPTIVOX_API_KEY` is the variable name the [CLI](/docs/cli) and the [MCP server](/docs/mcp) both use.
- **A leaked key spends real money.** Revoke it at [/keys](/keys) first, investigate second.

Webhook payloads are signed with HMAC-SHA256 using a separate webhook signing secret (`whsec_…`), one per key, which you can show and regenerate on [/keys](/keys). It is not the API key and cannot be worked out from it. See [Webhooks](/docs/webhooks#verifying-webhook-signatures).

---

<!-- source: https://platform.scriptivox.com/docs/versioning -->
<!-- updated: 2026-08-25 -->

# Versioning and deprecation

This page is the promise you can build against: what we are allowed to change without telling you, what we are not, and how you find out before it happens.

---

## How the API is versioned

The version is in the URL path. Every endpoint lives under `/v1`:

```
https://api.scriptivox.com/v1/transcribe
```

There is no version header and no `Accept` negotiation on version. If a request works today at a given `/v1` URL, that URL is the contract.

`info.version` in [openapi.json](/openapi.json) is the version of the *document*, not of the API. It moves whenever the description is corrected. Do not pin behaviour to it; pin to `/v1`.

## What counts as a breaking change

Breaking changes only ever ship behind a new major version: a `/v2` prefix, never a silent change to `/v1`.

**Breaking**, and therefore never done to `/v1`:

- Removing an endpoint, a request parameter, or a response field.
- Renaming any of the above.
- Changing the type of a response field, or making an optional request parameter required.
- Removing a value from an enum you receive (a `status`, an `error.code`).
- Tightening a validation rule so a request that used to succeed now fails.

**Not breaking**, and shipped to `/v1` without notice. Write your client so these cannot hurt it:

- Adding a new endpoint.
- Adding a new **optional** request parameter.
- Adding a new field to a response body.
- Adding a new value to an enum you *send* us.
- Adding a new `error.code`, or a new HTTP header.
- Fixing a bug where the documented behaviour and the actual behaviour disagreed.

> **Two client habits that turn a safe change into an outage:** 
> **Do not reject unknown fields.** We add response fields without notice. A client that treats an unrecognised key as a parse error will break on a change nobody was required to announce.
> 
> **Do not exhaustively switch on `error.code` without a default branch.** New codes are additive. Treat an unrecognised code as "an error I do not specifically handle", never as an unreachable case.
> 
> (Note the asymmetry: *we* reject unknown fields on request bodies, with `additionalProperties: false`, because a silently ignored typo in your request is worse than a loud rejection.)

## Notice before anything is removed

If an endpoint, parameter or field is ever deprecated:

- **Six months minimum** between the deprecation announcement and the removal. No exception for anything except a security defect that cannot be fixed any other way, which will say so explicitly.
- **Twelve months minimum** of `/v1` running alongside `/v2` after a `/v2` exists, so migration is never a same-week emergency.
- The announcement is machine-readable. It is not only a blog post you have to be subscribed to.

**Removed early, November 2026: `POST /v1/accounts`.** It created an account without the website. No account was ever created through it, and it had two security defects, so it was switched off without six months' notice, under the security exception above. It now answers `410 Gone`. Create accounts at [https://www.scriptivox.com/signup](https://www.scriptivox.com/signup).

**Added, November 2026: `source_transcription_id` on `POST /v1/transcribe`.** An optional field that transcribes a completed job again from the audio it holds, within 24 hours of its end ([transcribe again](/docs/api-reference#transcribe-again)), with one new error code, `409 SOURCE_EXPIRED`. Requests without it are answered as before.

**Added, November 2026: `503 TEMPORARILY_UNAVAILABLE`.** When reading your own data fails for a moment on our side, `GET /v1/transcribe/{id}` and `POST /v1/transcribe` with `upload_id` now answer `503 TEMPORARILY_UNAVAILABLE` with a `Retry-After` header: send the same request again after that many seconds. Before, such a read could answer `404 TRANSCRIPTION_NOT_FOUND` or `404 UPLOAD_NOT_FOUND` for a job or upload that exists. A `404` now always means there is no such job or upload.

**Added, November 2026: `GET /v1/status`.** A new operation that needs no API key and says whether the API is taking new jobs right now, what is paused, what still works and what maintenance is planned ([service status](/docs/api-reference#service-status)). A `503 MAINTENANCE` now also carries `status_url`, the address of that call; its `scope` field, sent since before, is now documented. Nothing else about the answer changed.

**Added, November 2026: `503 MAINTENANCE` on every operation during full maintenance.** During a short full pause (for example a planned upgrade) every operation, reads included, answers `503 MAINTENANCE` with `scope` `global` and a `Retry-After` header, and `GET /v1/status` says `maintenance` ([full maintenance](/docs/api-reference#service-status)). Before, those requests failed with other errors during such a pause. A client that already retries a `503` after `Retry-After` needs no change.

**Added, November 2026: `back_by` on `503 MAINTENANCE` and in `GET /v1/status`.** When we set a time a pause should end by, the `503 MAINTENANCE` carries it in `error.back_by` (ISO 8601, UTC) and its `Retry-After` counts the seconds until then (at least 60, at most 3600) instead of the usual 300; each pause in `GET /v1/status` has the same `back_by` ([service status](/docs/api-reference#service-status)). Without a time, `back_by` is `null` and nothing else changes. A client that already retries a `503` after `Retry-After` needs no change.

**Added, November 2026: `scope` `link` on `503 MAINTENANCE`.** While link imports are paused, `POST /v1/transcribe` with a `url` to a video or social media site (such as TikTok, Instagram, Facebook, X or Snapchat) answers `503 MAINTENANCE` with `scope` `link` and a `Retry-After` header; uploads and other file addresses are taken as usual. `GET /v1/status` then names that pause and keeps `POST /v1/transcribe` in `still_working`, with `accepting_new_jobs` `true` ([service status](/docs/api-reference#service-status)). Before, such links were refused only while all new jobs were paused. A client that already retries a `503` after `Retry-After` needs no change.

**Added, November 2026: `waiting` on `GET /v1/transcribe/{id}` and `GET /v1/transcriptions`, and `not_started` on `POST /v1/transcribe`.** While a job waits for its turn, or for a later try at a Google Drive link, `GET /v1/transcribe/{id}` adds `waiting` (`reason`, `since`, `retry_at`) and its `progress` says why in a sentence; the `status` keeps its value, and `waiting` is absent once the job starts. Each item of `GET /v1/transcriptions` carries the same `waiting`, with the reason as `progress`, while it waits ([why a job is waiting](/docs/api-reference#waiting)). `POST /v1/transcribe` adds `not_started` (`total`, `google_drive`): the account's jobs not started yet, on an accepted job and on the jobs-in-progress `429`. Both are optional fields; a client that ignores unknown fields needs no change.

## How deprecation is signalled on the wire

A deprecated endpoint answers normally and adds three response headers:

| Header | Meaning |
| --- | --- |
| `Deprecation` | [RFC 9745](https://www.rfc-editor.org/rfc/rfc9745.html). An HTTP date: when the resource became deprecated. |
| `Sunset` | [RFC 8594](https://www.rfc-editor.org/rfc/rfc8594.html). An HTTP date: the earliest date the resource may stop responding. |
| `Link` | `rel="sunset"`, pointing at this page. |

```http
Deprecation: @1794787200
Sunset: Sat, 15 Aug 2026 00:00:00 GMT
Link: <https://platform.scriptivox.com/docs/versioning>; rel="sunset"
```

The response body is unchanged: a deprecation never breaks a working integration on the day it is announced. That is the whole point of the headers: an automated client can notice and open a ticket six months before anything stops working.

> **Nothing is deprecated today:** 
> No endpoint, parameter or field in `/v1` currently carries a `Deprecation` or `Sunset` header, because nothing is scheduled for removal. The mechanism is in place and documented so it is already there on the day it is first needed, not invented in a hurry alongside the first removal.

## What to do if you see one

1. Read the `Link` target for the migration path.
2. Note the `Sunset` date. It is the earliest date the endpoint may stop working, not a date it will be checked again.
3. Migrate. If the `Sunset` date is inconvenient, say so at [support@scriptivox.com](mailto:support@scriptivox.com) *before* it passes; dates are set to be generous, and we would rather move one than break you.

## Watching for changes without polling

- **[openapi.json](/openapi.json)** is regenerated on every deploy and is the most precise description of the current surface. Diffing it in CI is the cheapest change detector there is; a removed `operationId` or a changed `required` list shows up as a diff before it shows up as an incident.
- **Every response** carries `Link: <https://platform.scriptivox.com/openapi.json>; rel="service-desc"` ([RFC 8631](https://www.rfc-editor.org/rfc/rfc8631.html)), so a client can find that document without hard-coding this page.
- **[status.scriptivox.com](https://status.scriptivox.com)** carries incidents and maintenance, which is a different thing from deprecation: availability, not contract.

## Other surfaces

The [CLI](/docs/cli) and the [MCP server](/docs/mcp) follow semver independently of the API version. Their major versions may move while the API stays at `/v1`: a tool renamed in the MCP server is a breaking change to that npm package, not to `/v1`. Deprecated MCP tool names are kept as working aliases and are listed in the [manifest](/.well-known/mcp) with the release that removes them.

---

<!-- source: https://platform.scriptivox.com/docs/cli -->
<!-- updated: 2026-08-25 -->

# CLI

`@scriptivox-api/cli` is the official command-line client for the Scriptivox transcription API. It transcribes recorded audio and video from a shell or a script, with 119 languages, speaker diarization, word-level timestamps, and SRT / WebVTT / plain-text export.

It is a peer of the [MCP server](/docs/mcp): same API, different transport. Use the CLI when a human or a shell script is driving; use MCP when a model is.

**npm:** [`@scriptivox-api/cli`](https://www.npmjs.com/package/@scriptivox-api/cli) · **Command:** `scriptivox-api`

---

## Install

```bash
npm install -g @scriptivox-api/cli

# or run it without installing
npx @scriptivox-api/cli --help
```

Node 18 or newer. **Zero runtime dependencies**: nothing is pulled in at install time beyond the package itself.

## Authenticate

Create a key at [/keys](/keys) and add credit at [/billing](/billing).

```bash
export SCRIPTIVOX_API_KEY=sk_live_...
```

Or pass `--api-key` per command. See [Authentication](/docs/authentication) for the header details the CLI handles for you.

> **The API is billed separately from the web app:** 
> A subscription on [scriptivox.com](https://www.scriptivox.com) grants no API credit. API usage draws down a prepaid balance at $0.20 per hour of audio. That is why the package is `@scriptivox-api/cli` and the command is `scriptivox-api` rather than `scriptivox`: the name is a reminder of which product you are spending.

## Commands

Every command maps one-to-one onto an operation in the [OpenAPI specification](/openapi.json).

```bash
# Transcribe a public URL and wait for the result
scriptivox-api transcribe https://example.com/meeting.mp3 --language en --diarize --wait

# Upload a local file, transcribe it, wait
scriptivox-api transcribe ./interview.m4a --diarize --speakers 2 --wait

# Export captions: stdout is clean, progress goes to stderr
scriptivox-api get 4f3c... --format srt --max-words 3 > interview.srt
scriptivox-api get 4f3c... --format vtt --speakers-in-captions true > interview.vtt

# Inspect and manage jobs
scriptivox-api status 4f3c...
scriptivox-api list --status completed --limit 20 --json
scriptivox-api cancel 4f3c...
scriptivox-api delete 4f3c...

# Check the balance
scriptivox-api balance

# Is the API taking new jobs right now? One line, no API key needed
scriptivox-api service-status
```

`scriptivox-api --help` lists every flag.

## Scripting

Structured output goes to **stdout**, progress and diagnostics to **stderr**, so a redirect produces a clean file even while the command is reporting status. `--json` puts JSON on stdout and silences progress entirely.

Exit codes are part of the contract:

| Code | Meaning |
| --- | --- |
| `0` | Success |
| `1` | Usage error: bad arguments, missing API key, unreadable file |
| `2` | API error; the machine-readable error code is printed on stderr |
| `3` | `service-status` only: new jobs are paused for maintenance |
| `4` | `service-status` only: the status could not be checked just now (this does not mean the API is down) |

```bash
if ! scriptivox-api transcribe ./call.mp3 --wait --json > result.json; then
  echo "transcription failed with exit $?" >&2
fi
```

The exit-code contract is guarded by an offline test suite that never touches the network, so a refactor cannot quietly change a code that scripts depend on.

## Things worth knowing

- **`transcribe` returns before the work is done.** Without `--wait` you get a job ID; input problems (unreachable URL, unsupported media, audio too long) surface *later* on `status`, as `status: failed` with an `error.code`. Check the poll path, not just the submit call.
- **Pass `--language` when you know it.** Auto-detection works most of the time but mis-routes short clips, code-switched audio, and files that open with music. It is also faster, because the model skips its detection pass.
- **`--speakers` needs `--diarize`.** It is a prior, not a hard cap: asking for 5 may yield 6.
- **Failed and cancelled jobs are free.** The reserved balance is released.
- **`--idempotency-key` makes retries safe.** The same key with the same body replays the cached response for 24 hours instead of starting a second, separately-billed job.

## Scope

The CLI talks to `https://api.scriptivox.com/v1` and nothing else. There is no session login, no cookie handling, and no access to the web app or the developer dashboard. An `sk_live_…` key is the only credential it understands.

MIT licensed. Bug reports and feature requests: [support@scriptivox.com](mailto:support@scriptivox.com).

---

<!-- source: https://platform.scriptivox.com/docs/mcp -->
<!-- updated: 2026-10-18 -->

# MCP server

Scriptivox runs an official [Model Context Protocol](https://modelcontextprotocol.io) server, so Claude, ChatGPT, Cursor, Codex and any other MCP client can transcribe audio and video, and work with your transcripts, as native tool calls.

There is **one address** for every app:

```
https://platform.scriptivox.com/mcp
```

Add it, sign in once in the browser, and choose what the app uses. Nothing to install.

---

## Connect an app

**Claude (web, desktop and mobile):** Scriptivox is in Claude's connector directory, verified by Anthropic. Open [Scriptivox in Claude's connector directory](https://claude.com/marketplace/connectors/scriptivox), check that it says **Anthropic verified** and **Made by Scriptivox**, click **Add to Claude** and sign in. Or open [Customize → Connectors](https://claude.ai/customize/connectors), choose **+ Add** → **Add custom connector**, name it Scriptivox, paste `https://platform.scriptivox.com/mcp` and sign in.

**ChatGPT:** on the web, open [Plugins](https://chatgpt.com/plugins), choose **+** → **Add custom MCP server**, name it Scriptivox, paste `https://platform.scriptivox.com/mcp`, choose OAuth, then **Create as a plugin** and sign in.

**Claude Code**

```bash
claude mcp add --transport http scriptivox https://platform.scriptivox.com/mcp
```

Then run `/mcp` inside Claude Code and choose **Authenticate**.

**Codex**

```bash
codex mcp add scriptivox --url https://platform.scriptivox.com/mcp
codex mcp login scriptivox
```

**One-click:** [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=scriptivox&config=eyJ1cmwiOiJodHRwczovL3BsYXRmb3JtLnNjcmlwdGl2b3guY29tL21jcCJ9) · [Add to VS Code](vscode:mcp/install?%7B%22name%22%3A%22scriptivox%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fplatform.scriptivox.com%2Fmcp%22%7D)

**Any other client.** Add it as a remote server:

```json
{
  "mcpServers": {
    "scriptivox": {
      "url": "https://platform.scriptivox.com/mcp"
    }
  }
}
```

A client that can only run local (stdio) servers can bridge to it with `npx mcp-remote https://platform.scriptivox.com/mcp`.

## What you choose when you sign in

The sign-in page asks two things. You can change both later on [Connected apps](https://www.scriptivox.com/account/connections).

**1. What the app uses**

| | My Scriptivox plan | API credits |
| --- | --- | --- |
| Billing | Your plan's minutes and limits, exactly like the website | Your prepaid API balance, $0.20 per hour of audio |
| For | Most people: ChatGPT, Claude, everyday use | Developers and scripts |
| AI-app allowance | On every paid plan, AI apps can start 100 transcriptions a day and run 10 at once (the website itself has no daily limit). For more, switch the connection to API credits | The API's own limits and your balance |
| Buying | Cannot buy anything or create API keys; at a limit it points you to [pricing](https://www.scriptivox.com/pricing) | Can ask to buy a plan, add credit or manage API keys, each only after you approve it |
| Files | Upload box in the chat (up to 5 GB), ChatGPT attachments, links, upload links for apps with a terminal | Upload box in the chat (up to 5 GB), links, upload links for apps with a terminal |
| Links | Google Drive, Dropbox, OneDrive, Yandex Disk, SharePoint and Teams recordings (shared with "Anyone with the link"), Apple Podcasts episodes and episode pages on Buzzsprout, Acast, Transistor, Libsyn, Podbean or Spreaker, TikTok, Instagram, Facebook, X, Snapchat, Douyin, and direct links to an audio or video file on any public website. Not YouTube or Spotify: send the recording as a file instead | Google Drive, Dropbox, OneDrive and Yandex Disk sharing links, public YouTube, TikTok, Instagram, Facebook, X, Snapchat and Douyin posts, Apple Podcasts episodes and episode pages on Buzzsprout, Acast, Transistor, Libsyn, Podbean or Spreaker, and direct links to an audio or video file |

The plan is preselected. Someone with API credits and no paid plan gets API credits preselected.

**2. What it may do**

- **Everything** (default): transcribe, read, organise and edit, send meeting bots, email summaries and run automations. The app must ask you in the chat before anything that reaches other people.
- **Transcribe and organise**: everything except meeting bots, emails, automations and purchases.
- **Read only**: find, read and export your transcripts. Nothing is transcribed, changed or sent.

**What it can do in your library**

- **Delete**: a deleted transcript goes to Trash on the website, as when you delete it there; only you can restore it, on the website, within 30 days. The app cannot see, restore or empty Trash. Deleting a folder sends the transcripts in it to Trash too. A transcription that is still running cannot be deleted.
- **Organise**: create, rename and delete folders and workspaces; move and tag transcripts.
- **Export**: PDF, Word, TXT, CSV, SRT or VTT, several at once as one ZIP, with the website's export options (words, characters and seconds per caption, sentence breaks, characters to remove, timestamps, speakers). A text format comes back in the chat; files come as a download card.
- **Calendar**: if you connected a calendar on the website, the app lists your upcoming meetings and turns the recording bot on or off for each, or for all. Connecting or disconnecting a calendar is only done on the website.
- **Asks you first**: the app asks in the chat before deleting a folder, a workspace or several transcripts at once, switching the bot for several meetings or "record all meetings", sending a meeting bot, emailing a summary or running an automation.
- **Website only**: Trash, creating or editing automations, deleting a tag from your account, connecting a calendar, AI chat and the Summary tab.
- **In ChatGPT**: the same tools, except automations and anything about plans or prices (ChatGPT's rules for apps).

## If you are an AI assistant asked to install Scriptivox

1. Add the server `https://platform.scriptivox.com/mcp` with the command for your client above.
2. Ask the person to finish signing in (in Claude Code: `/mcp` → **Authenticate**). A browser opens; they choose their plan or API credits and approve. Do not ask them for an API key or a password.
3. Check it worked: call `get_account`, then tell the person which account you are connected to and what this connection uses.
4. If a call fails, look the message up in [Troubleshooting](#troubleshooting) and tell the person what to do. Do not retry the same failing call in a loop.

## Files on the person's computer

The server cannot read anyone's disk. There are three ways in, best first:

- **In a chat app:** call `upload_file` and the person drops the file in the upload box (both kinds of connection; on API credits each file is billed to the API balance). In ChatGPT a file attached to the message is picked up by `transcribe_file`. Claude cannot hand a chat attachment to a connector, so in Claude chat the app calls `upload_file` with the attached file's name, and the box asks the person to pick that same file. In Claude the box also shows how many transcriptions are left today on a plan with a daily limit, and with none left it says when the count starts again instead of showing a file picker.
- **An app with a terminal** (Claude Code, Codex, Cursor): call `upload_link` with the file's name. It returns a one-time upload address and the exact `curl` command to run. Once the upload finishes, the app calls `start_transcription` (like pressing Transcribe on the website); nothing is transcribed or counted before that, so an upload that never arrives leaves nothing behind.
- **A link:** `transcribe_url` with a share link.

## Your controls

On [Connected apps](https://www.scriptivox.com/account/connections). Only you, signed in on the website, can change these; a connected app cannot, even though it acts for your account.

- **What each app uses and may do.** Change either for any connection.
- **Activity.** Each connection has **Show activity**: every tool it called, when, and whether it worked. Never the content. Kept for 90 days.
- **Let AI apps use my account.** Switch it off to block every connected app at once. Nothing is disconnected; switch it back on and they carry on.
- **Ask me before an app spends money or changes API keys.** On by default. The app gets an **APPROVAL NEEDED** link to `platform.scriptivox.com/approvals/<id>` and nothing happens until you approve. An approval works once, only for exactly what was asked, and expires after 24 hours.
- **Ask me before an app sends a meeting bot or runs an automation.** Off by default; works the same way.
- **Emailing a meeting summary to someone new always waits for your approval**, whatever the switches say.
- **Limits.** 120 requests a minute per connection, 300 per person (`429` with `Retry-After` past that); at most 5 meeting bots an hour; at most 10 connected apps. On a plan connection, AI apps can start 100 transcriptions a day (reset at 00:00 UTC) and run 10 at once on every paid plan; past that the app says so and suggests API credits.
- **Expiry.** A connection unused for 90 days ends, and every connection ends a year after you approved it. Sign in again to reconnect.

Every sign-in is its own connection: Claude Code on two computers shows up twice. The sign-in page suggests a name such as "Claude Code on Linux"; each connection also has a short id like `mcp_3fa9c1d2` and shows the app's software and where it signed in from.

### Troubleshooting

| What you see | What it means | What to do |
| --- | --- | --- |
| The client says the server **needs authentication** | You have not signed in yet, or the sign-in ended | In Claude Code run `/mcp` → **Authenticate**; in Codex `codex mcp login scriptivox`; in Claude or ChatGPT reconnect the connector |
| `401 invalid_token` with "revoked", "expired" or "more than a year old" | It was disconnected, your password changed, it went unused for 90 days, or it is a year old | Sign in again; that makes a new connection |
| "…is not available on a connection that uses the Scriptivox plan" | That tool needs API credits | Change the connection to API credits on Connected apps, or reconnect and choose it |
| "…is only available on a connection that uses the Scriptivox plan" | The upload box and ChatGPT attachments use the plan | Change the connection to your plan, or use `upload_link` or a link |
| "…was approved as Read only" | The access level leaves that tool out | Change the access level on Connected apps |
| `403` with "already has 10 connected apps" | The per-account limit | Disconnect one, then sign in again |
| `403` with "AI app access is turned off" | The owner switched AI apps off | Switch **Let AI apps use my account** back on |
| `429` with "Too many requests" | Over the rate limit | Wait for the `Retry-After` seconds |
| **APPROVAL NEEDED** | An action waits for the account owner | Open the link, approve, then call again with the same arguments plus `approval_id` |
| `ZERO_BALANCE` or `INSUFFICIENT_BALANCE` | An API-credits connection has no balance | Add credit, or switch the connection to your plan |
| The sign-in page shows a red warning | The app's return address is not Scriptivox, not this computer and not a known app, or its name claims to be Scriptivox | Cancel unless you started this sign-in yourself just now |
| Anything else, or an error you can't explain | Not covered above | Email support@scriptivox.com with the connection id, the job id if there is one, and the time. It is resolved within 24 hours, our founders' personal guarantee |

## API keys

Scripts and clients that cannot sign in can send a key instead. A key always uses API credits, and covers transcription and exports; the account tools (library, meetings, automations, buying) need a signed-in app.

```json
{
  "mcpServers": {
    "scriptivox": {
      "url": "https://platform.scriptivox.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_YOUR_KEY"
      }
    }
  }
}
```

`Authorization: Bearer sk_live_…`, bare `Authorization: sk_live_…`, or `X-Api-Key: sk_live_…` all work. Get one at [/keys](/keys); see [Authentication](/docs/authentication). Calls made with a key show in that key's activity on /keys.

## Tools

73 tools. A plan connection sees 59 of them, an API-credits connection or key 71; the access level chosen at sign-in narrows that further ("lowest level" below). Generated from the server's own tool list.

| Tool | Plan | API credits | Lowest level | What it does |
| --- | :-: | :-: | --- | --- |
| `get_supported_languages` | ✓ | ✓ | Read only | List all languages supported by Scriptivox for audio/video transcription. |
| `get_pricing` | ✓ | ✓ | Read only | Get Scriptivox pricing: the web plans (subscriptions and lifetime deals) with their prices and what each includes, read live from the plan list behind the pricing page, and the pay-as-you-go API rate. |
| `get_product_info` | ✓ | ✓ | Read only | Get information about Scriptivox capabilities: transcription, subtitle tools, meeting bot, or API. |
| `service_status` | ✓ | ✓ | Read only | Check whether Scriptivox is paused for maintenance right now, for what this connection can do. |
| `get_api_docs` |  | ✓ | Read only | Get Scriptivox API documentation. |
| `check_balance` |  | ✓ | Read only | Check your Scriptivox API credit balance, available hours, and pricing. |
| `transcribe_url` | ✓ | ✓ | Transcribe and organise | Transcribe audio or video from a public URL using Scriptivox AI. |
| `transcribe_file` | ✓ |  | Transcribe and organise | Transcribe an audio or video file the person attached to their message in this chat. |
| `transcribe_status` | ✓ | ✓ | Read only | Check the status of a Scriptivox transcription job. |
| `transcribe_upload` |  | ✓ | Transcribe and organise | Start transcribing a file you already sent with upload_link: pass its upload_id. |
| `upload_link` | ✓ | ✓ | Transcribe and organise | Send a file from the computer you are running on to Scriptivox, when you can run terminal commands (Claude Code, Codex, Cursor): returns a one-time upload address and the exact curl command to run. |
| `start_transcription` | ✓ |  | Transcribe and organise | Start transcribing a file that is waiting for it (one you sent with upload_link, once its command finished without an error, or one the person uploaded in the upload box, when they ask you to start it): like pressing Transcribe on the Scriptivox website. |
| `transcribe_cancel` |  | ✓ | Transcribe and organise · can overwrite or remove | Cancel an in-flight Scriptivox transcription and release any reserved balance. |
| `transcribe_delete` |  | ✓ | Transcribe and organise · can overwrite or remove | Soft-delete a Scriptivox transcription record. |
| `list_transcriptions` |  | ✓ | Read only | List recent API transcriptions for the signed-in account, with optional status/date filters and cursor pagination. |
| `export_transcript` | ✓ | ✓ | Read only | Export a completed Scriptivox transcript as SRT subtitles, WebVTT subtitles, or plain text. |
| `get_account` | ✓ | ✓ | Read only | Read the account of the signed-in person: current plan, entitlements and quota. |
| `get_credits` | ✓ | ✓ | Read only | Check what is left on the signed-in person's Scriptivox plan right now: AI credits (and when they refill), transcriptions left today, transcription minutes left this month, meeting-bot minutes left, and storage used. |
| `get_email_settings` | ✓ | ✓ | Read only | Show which Scriptivox emails the signed-in person gets and which ones they can turn off: activity emails (transcripts ready, daily limit resets, meeting summaries), tips and offers (marketing), and notes from the team, each on or off. |
| `set_email_settings` | ✓ | ✓ | Transcribe and organise | Turn the person's Scriptivox email switches off or on, the same switches as Settings on the website and the Unsubscribe link in each email. |
| `create_api_key` |  | ✓ | Everything | Mint a new Scriptivox API key (sk_live_...) for the signed-in person. |
| `revoke_api_key` |  | ✓ | Everything · can overwrite or remove | Permanently revoke an API key belonging to the signed-in person. |
| `purchase_plan` |  | ✓ | Everything | Start checkout for a Scriptivox web subscription and return a Stripe Checkout URL. |
| `top_up_balance` |  | ✓ | Everything | Start checkout to add credit to the prepaid API balance and return a Stripe Checkout URL. |
| `get_billing_history` | ✓ | ✓ | Read only | Read the signed-in person's billing history: plan invoices, add-on charges, lifetime purchases and API deposits, newest first, with links to each Stripe invoice. |
| `get_billing_portal_url` |  | ✓ | Everything | Return a link to the Stripe billing portal for the signed-in person, where they can change their card, download invoices, or cancel a subscription. |
| `search_transcripts` | ✓ | ✓ | Read only | Find transcripts in the signed-in person's library by FILE NAME, folder, tag, workspace, status, date, source (upload, link, meeting…), language or length, sorted as asked (newest first by default). |
| `find_in_transcripts` | ✓ | ✓ | Read only | Search what was SAID across every transcript in the signed-in person's library: which recordings mention a word or phrase, ranked, each with its matching lines (timestamp, speaker, segment number). |
| `rename_transcription` | ✓ | ✓ | Transcribe and organise | Rename a transcript in the signed-in person's library (its title, shown everywhere on the website). |
| `rename_speakers` | ✓ | ✓ | Transcribe and organise | Give the speakers in a transcript real names ("SPEAKER_00 is Priya"), the same as renaming speakers on the website: every view, export, share link and get_transcript then shows the names. |
| `edit_transcript` | ✓ | ✓ | Transcribe and organise · can overwrite or remove | Correct the text of a transcript, the same as editing it on the website: the edited text becomes the transcript everywhere (viewer, exports, share links, chat), and word timings are re-aligned. |
| `restore_original_transcript` | ✓ | ✓ | Transcribe and organise · can overwrite or remove | Throw away every text edit on a transcript and go back to the original, exactly as it was first transcribed (the website's "Restore original"). |
| `send_transcript_feedback` | ✓ | ✓ | Read only | Send the person's feedback on a transcript, or a problem report, to the Scriptivox team. |
| `remove_tags` | ✓ | ✓ | Transcribe and organise | Remove tags from up to 50 transcriptions (tag_transcriptions adds them). |
| `move_to_workspace` | ✓ | ✓ | Transcribe and organise | Move up to 50 transcriptions into another of the person's own workspaces (list_workspaces), optionally straight into a folder of that workspace (list_folders). |
| `delete_transcriptions` | ✓ | ✓ | Transcribe and organise · can overwrite or remove | Delete transcripts from the person's library, the same as deleting them on the website: each finished one goes to the website's Trash, where the person can restore it for 30 days (you cannot see or restore Trash). |
| `create_folder` | ✓ | ✓ | Transcribe and organise | Create a folder in one of the person's workspaces (default: their personal workspace), the same as on the website. |
| `rename_folder` | ✓ | ✓ | Transcribe and organise | Rename one of the person's folders (list_folders). |
| `delete_folder` | ✓ | ✓ | Transcribe and organise · asks you first, can overwrite or remove | Delete one of the person's folders AND the transcripts in it: they go to the website's Trash, where the person can restore them for 30 days (you cannot see or restore Trash). |
| `create_workspace` | ✓ | ✓ | Transcribe and organise | Create a new workspace for the person, the same as on the website. |
| `rename_workspace` | ✓ | ✓ | Transcribe and organise | Rename one of the person's workspaces (list_workspaces). |
| `delete_workspace` | ✓ | ✓ | Transcribe and organise · asks you first, can overwrite or remove | Delete one of the person's workspaces, the same as on the website: its finished transcripts go to Trash, where the person can restore them for 30 days (a restored one comes back in the personal workspace; you cannot see or restore Trash). |
| `get_meeting_participants` | ✓ | ✓ | Everything · asks you first | For ONE recorded meeting, list who took part: the display names the meeting bot heard, and any email addresses this account already holds for that meeting (the person's calendar invite, or addresses they shared the summary with). |
| `send_meeting_summary` | ✓ | ✓ | Everything · asks you first | Email the summary of ONE recorded meeting to the people the person names, from Scriptivox: each recipient gets the meeting summary and a link to the meeting's shared page, once (an address that already got it is skipped). |
| `get_meeting_summary` | ✓ | ✓ | Read only | Read the summary of ONE meeting recorded by the Scriptivox meeting bot, the same summary the website shows on the meeting's Summary tab: its purpose, key takeaways, action items and next steps with who owns each and when in the meeting it came up, and the topics discussed. |
| `open_meeting_share` | ✓ | ✓ | Everything | Show ONE recorded meeting's share link to the person, in a box in the chat: the same link as the website's Share button, with Copy and Stop sharing, or a button to make one if the meeting has none. |
| `list_tags` | ✓ | ✓ | Read only | List the tags on the signed-in person's account: the ones actually in use on transcriptions with a count of each, and separately the named-tag registry the web app maintains. |
| `tag_transcriptions` | ✓ | ✓ | Transcribe and organise | Add tags to up to 10 existing transcriptions at once: the tool for "label these interviews as Q3". |
| `list_folders` | ✓ | ✓ | Read only | List the folders on the signed-in person's account, with the workspace each belongs to. |
| `move_to_folder` | ✓ | ✓ | Transcribe and organise | File up to 50 existing transcriptions into a folder, or pass folder_id: null to move them out of any folder. |
| `list_workspaces` | ✓ | ✓ | Read only | List the signed-in person's workspaces. |
| `get_transcript_audio` | ✓ | ✓ | Read only | Return a time-limited signed URL for the source audio or video of an existing transcription, so it can be handed to another tool or streamed. |
| `get_transcript` | ✓ | ✓ | Read only | Read the text of a completed transcription in the person's Scriptivox library, with timestamps and speaker names. |
| `chat_with_transcript` |  | ✓ | Everything | Ask a question about an existing transcript and get an answer from the model, with the transcript as context. |
| `list_automations` | ✓ | ✓ | Read only | List the automations on the signed-in person's account: saved chains of steps that run over a finished transcript (built on the website; creating, editing and deleting them is done there). |
| `run_automation` | ✓ | ✓ | Everything · asks you first | Run one of the signed-in person's existing automations over one completed transcription. |
| `get_automation_run` | ✓ | ✓ | Read only | Check the progress of an automation run started by run_automation: overall status, plus each step with its status, model, duration and error. |
| `start_meeting_bot` | ✓ | ✓ | Everything · asks you first | Send a bot to join ONE Zoom, Google Meet, Teams or Webex call and record it, producing a speaker-attributed transcript after the call ends. |
| `stop_meeting_bot` | ✓ | ✓ | Everything · asks you first, can overwrite or remove | Tell a meeting bot that is currently in a call to leave. |
| `cancel_scheduled_bot` | ✓ | ✓ | Everything · asks you first, can overwrite or remove | Cancel a meeting bot that has not joined yet, so it never joins. |
| `list_scheduled_meetings` | ✓ | ✓ | Read only | List the signed-in person's meeting bots that are scheduled or currently running, plus any dispatches still queued waiting for a free bot. |
| `list_calendar_meetings` | ✓ | ✓ | Read only | List the upcoming meetings on the calendars the person connected on the Scriptivox website (Google or Outlook), with whether the Scriptivox bot will join and record each one, and whether "record all meetings" is on. |
| `set_meeting_recording` | ✓ | ✓ | Everything | Switch the Scriptivox bot on or off for meetings on the person's connected calendar, the same as the switch beside each meeting on the website: on, the bot joins that meeting and records it, and the transcript appears in the library afterwards (it uses the account's meeting minutes); off, it does not join. |
| `set_auto_record` | ✓ | ✓ | Everything · asks you first | Turn the website's "record all meetings" switch on or off for every calendar the person connected. |
| `upload_file` | ✓ | ✓ | Transcribe and organise | Show an upload box in the chat so the person can drop an audio or video file from their computer to transcribe it (up to 5 GB). |
| `open_library` | ✓ | ✓ | Read only | Show the person's Scriptivox library in the chat (their transcripts, folders and tags) so they can browse, search and open one. |
| `open_subtitle_file` | ✓ | ✓ | Read only | Open a .srt or .vtt subtitle file in the Scriptivox subtitle editor (ChatGPT desktop opens such files with it). |
| `read_settings` | ✓ | ✓ | Read only | Read the person's Scriptivox transcription defaults: default language and speaker labels. |
| `update_settings` | ✓ | ✓ | Transcribe and organise | Change the person's Scriptivox transcription defaults: default language and speaker labels. |
| `edit_subtitles` | ✓ | ✓ | Read only | Open a subtitle editor in the chat for a completed transcription: the person can correct the text and timing of each caption and download SRT or WebVTT. |
| `open_meeting_bot` | ✓ | ✓ | Everything | Show the meeting-bot card in the chat: the bots that are scheduled or recording now, and a form the person fills in to send a bot to a Zoom, Google Meet, Teams or Webex call. |
| `search_docs` |  | ✓ | Read only | Search the Scriptivox documentation and agent guides. |
| `get_doc` |  | ✓ | Read only | Fetch a full Scriptivox documentation page as markdown, by its slug (for example "quickstart", "authentication", "api-reference"). |

## How it behaves

- **`transcribe_url` returns quickly.** On a plan connection it returns a `transcription_id` at once and the transcript is read with `get_transcript` (the progress card in the chat says when). On API credits it waits up to 25 seconds for a signed-in app or 55 seconds for a key, then returns the id and tells the app to call `transcribe_status`. The job itself keeps running.
- **Stateless.** No `Mcp-Session-Id`; every request stands alone and gets one JSON response (no SSE stream). `GET` and `DELETE` answer `405`. Request bodies over 1 MB are refused.
- **Protocol revisions:** `2026-07-28`, `2025-11-25`, `2025-06-18`, `2025-03-26`. For `2026-07-28` there is no handshake: `server/discover` lists versions and capabilities, and each request carries its version in `_meta`.
- **Also offered:** prompts (`meeting-notes`, `transcribe-audio`, `summarize-latest-meeting`, `make-subtitles`, `find-in-transcripts`; Claude on a plan connection also gets `transcribe-a-file`, which opens the upload box), the in-chat screen as an MCP Apps resource, and MCP Events (`events/list`, `events/subscribe`) for signed-in apps.
- `https://www.scriptivox.com/mcp` answers too; `platform.` is the address to use. Apps connected before 12 Oct 2026 at `/mcp/directory` keep working there.

## Checking it by hand

```bash
curl -s https://platform.scriptivox.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'MCP-Protocol-Version: 2026-07-28' \
  -H 'Authorization: Bearer sk_live_YOUR_KEY' \
  -d '{"jsonrpc":"2.0","id":1,"method":"server/discover"}'

curl -s https://platform.scriptivox.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'MCP-Protocol-Version: 2025-11-25' \
  -H 'Authorization: Bearer sk_live_YOUR_KEY' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```

Leave the `Authorization` header off and you get the `401` challenge that starts sign-in.

## The documentation server

`https://platform.scriptivox.com/mcp/docs` speaks the same protocol and has exactly two tools, `search_docs` and `get_doc`, over these pages. It needs **no credential**, touches no account, and changes nothing. They are on the main address too, for API-credits connections and keys. The scoping is a clear contract, not a permission boundary.

## Tools in the page itself (WebMCP)

The servers above serve an agent calling Scriptivox from outside. WebMCP is the other case: an agent driving the browser a person is already signed into. Scriptivox registers its page tools with `document.modelContext.registerTool()` (`navigator.modelContext` is accepted as a fallback):

| Tool | What it does |
|---|---|
| `scriptivox_whoami` | Whether anybody is signed in on this page, and as whom. Call it first. |
| `scriptivox_open_signup` | Opens the signup form. It does **not** create an account. |
| `scriptivox_get_plan_status` | The signed-in person's plan and entitlements. |
| `scriptivox_search_transcripts` | Finds the person's transcripts by name. Read only. |
| `scriptivox_open_transcript` | Opens one of them in the page. |
| `scriptivox_transcribe_link` | Fills in a link to transcribe; the person confirms on the page. |
| `scriptivox_start_plan_checkout` | Returns a Stripe Checkout URL. Charges nothing. |
| `scriptivox_create_api_key` | Asks the person, on the page, to create an API key. |

Nothing that spends, sends or creates a key happens without the person clicking on the page. WebMCP is a W3C draft and absent in most browsers today; the page registers what it can and does nothing when the API is missing.

## The old local package

`@scriptivox/mcp-server` (npm) and its Docker image are **retired** in favour of the hosted address above, which has every tool and nothing to install. Existing installs keep working with an API key; new tools arrive only on the hosted server.

## Versioning

The hosted server follows the MCP spec's revisions, listed above; a tool renamed or removed is announced in the [changelog](/docs/versioning) first. The 1.0.x names `transcription_url` and `transcription_status` still work but are no longer listed.

---

<!-- source: https://www.scriptivox.com/errors -->

# Help for every message

Every message Scriptivox shows on the website, in AI apps, in the API and in the browser extension has its own help page: what happened, why, what to do next and, where it matters, whether anything was charged. Each address below is the page as plain markdown; drop `.md` for the page. The same list as JSON: https://www.scriptivox.com/errors.json

## General

- [A brief problem on our side](https://www.scriptivox.com/errors/try-again-shortly.md) (API: TEMPORARILY_UNAVAILABLE)
- [No connection to Scriptivox](https://www.scriptivox.com/errors/no-connection.md)
- [Paused for maintenance](https://www.scriptivox.com/errors/maintenance.md) (API: MAINTENANCE)
- [Reload the page](https://www.scriptivox.com/errors/page-needs-refresh.md)
- [Something went wrong on our side](https://www.scriptivox.com/errors/something-went-wrong.md) (API: INTERNAL_ERROR)
- [The app couldn't open Scriptivox](https://www.scriptivox.com/errors/app-cannot-load.md)
- [The charge couldn't be completed](https://www.scriptivox.com/errors/charge-not-completed.md) (API: BILLING_ERROR)
- [The transcription couldn't be started](https://www.scriptivox.com/errors/job-start-failed.md) (API: CREATED_TIMEOUT)
- [The transcription failed](https://www.scriptivox.com/errors/processing-failed.md) (API: PROCESSING_ERROR)
- [The transcription took too long](https://www.scriptivox.com/errors/processing-timed-out.md) (API: PROCESSING_TIMEOUT)
- [The transcription was cancelled](https://www.scriptivox.com/errors/job-cancelled.md) (API: CANCELLED)
- [This isn't available right now](https://www.scriptivox.com/errors/feature-not-available.md)

## Files

- [No speech was found in the recording](https://www.scriptivox.com/errors/no-speech-found.md)
- [The file couldn't be read as audio or video](https://www.scriptivox.com/errors/file-unreadable.md)
- [The file has no audio](https://www.scriptivox.com/errors/file-no-audio.md)
- [The file is empty](https://www.scriptivox.com/errors/file-empty.md)
- [The file is incomplete or damaged](https://www.scriptivox.com/errors/file-incomplete.md)
- [The file is too large](https://www.scriptivox.com/errors/file-too-large.md) (API: FILE_TOO_LARGE)
- [The file wasn't accepted](https://www.scriptivox.com/errors/file-not-accepted.md)
- [The recording is too long](https://www.scriptivox.com/errors/file-too-long.md) (API: DURATION_TOO_LONG)
- [The recording is too short](https://www.scriptivox.com/errors/file-too-short.md)
- [This file already came back with no speech](https://www.scriptivox.com/errors/no-speech-again.md) (API: NO_SPEECH)
- [This type of file can't be transcribed](https://www.scriptivox.com/errors/file-type-not-supported.md) (API: INVALID_MEDIA_FORMAT)

## Uploads

- [That upload was already used](https://www.scriptivox.com/errors/upload-already-used.md) (API: UPLOAD_ALREADY_USED)
- [The file is no longer available to the browser](https://www.scriptivox.com/errors/file-no-longer-accessible.md)
- [The file never arrived](https://www.scriptivox.com/errors/upload-never-arrived.md) (API: FILE_NOT_UPLOADED)
- [The recording couldn't be saved](https://www.scriptivox.com/errors/recording-not-saved.md)
- [The upload link has expired](https://www.scriptivox.com/errors/upload-expired.md) (API: UPLOAD_EXPIRED)
- [The upload stopped before it finished](https://www.scriptivox.com/errors/upload-interrupted.md)
- [The upload was never processed](https://www.scriptivox.com/errors/upload-not-processed.md)
- [We couldn't find that upload](https://www.scriptivox.com/errors/upload-not-found.md) (API: UPLOAD_NOT_FOUND)

## Links

- [Links to this site can't be transcribed right now](https://www.scriptivox.com/errors/site-links-paused.md)
- [Live streams can't be transcribed until they end](https://www.scriptivox.com/errors/link-is-live-stream.md)
- [Opening the file with your Microsoft account didn't work](https://www.scriptivox.com/errors/microsoft-open-unavailable.md)
- [The download from the link took too long](https://www.scriptivox.com/errors/link-download-timed-out.md) (API: DOWNLOAD_TIMEOUT)
- [The download from the link was interrupted](https://www.scriptivox.com/errors/link-download-interrupted.md) (API: DOWNLOAD_FAILED)
- [The link asks for a sign-in](https://www.scriptivox.com/errors/link-needs-sign-in.md)
- [The link couldn't be opened](https://www.scriptivox.com/errors/link-not-accessible.md) (API: URL_NOT_ACCESSIBLE)
- [The link is a folder, not a file](https://www.scriptivox.com/errors/link-is-folder.md)
- [The link is not audio or video](https://www.scriptivox.com/errors/link-not-audio-or-video.md)
- [The link opens a web page, not a file](https://www.scriptivox.com/errors/link-is-web-page.md)
- [The video in this post can't be opened](https://www.scriptivox.com/errors/social-post-not-found.md)
- [This kind of link can't be transcribed](https://www.scriptivox.com/errors/link-not-supported.md)
- [This link is already being transcribed](https://www.scriptivox.com/errors/link-already-processing.md)
- [This post is private, deleted or not available](https://www.scriptivox.com/errors/social-post-unavailable.md)
- [We couldn't check the link right now](https://www.scriptivox.com/errors/link-check-unavailable.md) (API: LINK_CHECK_UNAVAILABLE)
- [We couldn't get the audio of this YouTube video](https://www.scriptivox.com/errors/youtube-audio-not-fetched.md)

## Google Drive

- [Downloading is turned off for this Google Drive file](https://www.scriptivox.com/errors/drive-download-off.md)
- [Google Drive didn't allow this file to be downloaded](https://www.scriptivox.com/errors/drive-download-refused.md)
- [Google Drive didn't send the file right now](https://www.scriptivox.com/errors/drive-busy.md)
- [Google Drive has flagged this file](https://www.scriptivox.com/errors/drive-file-flagged.md)
- [Google Drive has paused downloads of this file](https://www.scriptivox.com/errors/drive-download-paused.md)
- [Pick the Google Drive file again](https://www.scriptivox.com/errors/drive-pick-again.md)
- [Picking files from Google Drive is not available right now](https://www.scriptivox.com/errors/drive-picker-unavailable.md)
- [This Google Drive file is not shared with Anyone with the link](https://www.scriptivox.com/errors/drive-not-shared.md)
- [This Google Drive link is not an audio or video file](https://www.scriptivox.com/errors/drive-not-media.md)

## Meetings and meeting bots

- [Everyone left before the bot started recording](https://www.scriptivox.com/errors/meeting-everyone-left.md)
- [No calendar is connected](https://www.scriptivox.com/errors/calendar-not-connected.md)
- [No meeting bot is free right now](https://www.scriptivox.com/errors/meeting-bots-busy.md)
- [No meeting was found at this link](https://www.scriptivox.com/errors/meeting-link-invalid.md)
- [No one else joined the meeting](https://www.scriptivox.com/errors/meeting-nobody-joined.md)
- [No one let the bot in from the waiting room](https://www.scriptivox.com/errors/meeting-waiting-room.md)
- [No one spoke, so the bot left](https://www.scriptivox.com/errors/meeting-silence.md)
- [Only bots were in the meeting](https://www.scriptivox.com/errors/meeting-only-bots.md)
- [Only the person who recorded the meeting can share it](https://www.scriptivox.com/errors/only-recorder-can-share.md)
- [Some calendar events couldn't be synced](https://www.scriptivox.com/errors/calendar-sync-partial.md)
- [Someone removed the meeting bot](https://www.scriptivox.com/errors/meeting-bot-removed.md)
- [The bot can't join town halls and events](https://www.scriptivox.com/errors/meeting-type-not-supported.md)
- [The host didn't allow recording](https://www.scriptivox.com/errors/meeting-recording-not-allowed.md)
- [The meeting asked the bot to solve a captcha](https://www.scriptivox.com/errors/meeting-captcha.md)
- [The meeting asks people to register](https://www.scriptivox.com/errors/meeting-registration-required.md)
- [The meeting bot can't join breakout rooms](https://www.scriptivox.com/errors/meeting-breakout-room.md)
- [The meeting bot couldn't be sent](https://www.scriptivox.com/errors/meeting-bot-start-failed.md)
- [The meeting bot left before recording](https://www.scriptivox.com/errors/meeting-bot-left.md)
- [The meeting bot ran into a problem](https://www.scriptivox.com/errors/meeting-bot-error.md)
- [The meeting bot was stopped before recording](https://www.scriptivox.com/errors/meeting-bot-stopped.md)
- [The meeting ended before recording started](https://www.scriptivox.com/errors/meeting-ended.md)
- [The meeting hadn't started yet](https://www.scriptivox.com/errors/meeting-not-started.md)
- [The meeting link has expired](https://www.scriptivox.com/errors/meeting-link-expired.md)
- [The meeting needs a passcode](https://www.scriptivox.com/errors/meeting-passcode-needed.md)
- [The meeting only lets in people from the host's organisation](https://www.scriptivox.com/errors/meeting-organisation-only.md)
- [The meeting only lets in signed-in people](https://www.scriptivox.com/errors/meeting-sign-in-required.md)
- [The meeting share box has expired](https://www.scriptivox.com/errors/meeting-share-box-expired.md)
- [The meeting summary is not ready yet](https://www.scriptivox.com/errors/meeting-summary-not-ready.md)
- [The meeting time has already passed](https://www.scriptivox.com/errors/meeting-time-passed.md)
- [The meeting was full](https://www.scriptivox.com/errors/meeting-full.md)
- [The meeting was locked](https://www.scriptivox.com/errors/meeting-locked.md)
- [The meeting's recording couldn't be retrieved](https://www.scriptivox.com/errors/meeting-recording-lost.md)
- [The meeting's settings stopped the bot from joining](https://www.scriptivox.com/errors/meeting-settings-blocked.md)
- [The picture wasn't accepted](https://www.scriptivox.com/errors/picture-not-accepted.md)
- [This meeting app is not supported](https://www.scriptivox.com/errors/meeting-platform-not-supported.md)
- [This meeting is already on your calendar](https://www.scriptivox.com/errors/meeting-on-calendar.md)
- [This transcript was not recorded by the meeting bot](https://www.scriptivox.com/errors/not-a-meeting-transcript.md)
- [Too little was said to make a summary](https://www.scriptivox.com/errors/too-short-to-summarise.md)
- [Too many meeting bots are open](https://www.scriptivox.com/errors/meeting-too-many-bots.md)
- [You've shared this summary with the most people allowed](https://www.scriptivox.com/errors/share-limit-reached.md)
- [Your calendar couldn't be connected](https://www.scriptivox.com/errors/calendar-connection-failed.md)
- [Your calendar was disconnected](https://www.scriptivox.com/errors/calendar-disconnected.md)
- [Your meeting minutes are held by other bots](https://www.scriptivox.com/errors/meeting-minutes-held.md)
- [Your meeting minutes are used up](https://www.scriptivox.com/errors/meeting-minutes-used.md)

## Limits

- [The extension needs a free account](https://www.scriptivox.com/errors/guest-limit.md)
- [The file is larger than your plan allows](https://www.scriptivox.com/errors/plan-size-limit.md)
- [The recording is longer than your plan allows](https://www.scriptivox.com/errors/plan-length-limit.md)
- [This needs a paid plan](https://www.scriptivox.com/errors/needs-paid-plan.md)
- [Today's AI app transcriptions are used up](https://www.scriptivox.com/errors/ai-app-daily-limit.md)
- [Today's transcriptions are used up](https://www.scriptivox.com/errors/daily-limit.md)
- [Too many files at once](https://www.scriptivox.com/errors/batch-limit.md)
- [Too many requests in a short time](https://www.scriptivox.com/errors/rate-limited.md) (API: RATE_LIMIT_EXCEEDED)
- [Too many transcriptions are running](https://www.scriptivox.com/errors/too-many-running.md)
- [You have reached your limit for social media links](https://www.scriptivox.com/errors/social-link-limit.md)
- [You've sent the most reports for today](https://www.scriptivox.com/errors/feedback-daily-limit.md)
- [Your AI chat credits are used up](https://www.scriptivox.com/errors/ai-credits-used-up.md)
- [Your storage is full](https://www.scriptivox.com/errors/storage-full.md)
- [Your transcription minutes are used up](https://www.scriptivox.com/errors/minutes-used-up.md)

## Payments and plans

- [A lifetime plan can't be part of a team](https://www.scriptivox.com/errors/lifetime-plan-not-for-teams.md)
- [A lifetime plan on this account was refunded before](https://www.scriptivox.com/errors/lifetime-refunded-before.md)
- [Automatic top-up was turned off](https://www.scriptivox.com/errors/auto-top-up-turned-off.md)
- [Free trials are not available right now](https://www.scriptivox.com/errors/trial-not-available.md)
- [The billing period can't be switched here](https://www.scriptivox.com/errors/billing-period-switch-unavailable.md)
- [The checkout didn't work](https://www.scriptivox.com/errors/checkout-failed.md)
- [The free trial was already used](https://www.scriptivox.com/errors/trial-already-used.md)
- [The lifetime plan is sold out](https://www.scriptivox.com/errors/lifetime-sold-out.md)
- [There is no active subscription to change](https://www.scriptivox.com/errors/no-active-subscription.md)
- [There is no billing history yet](https://www.scriptivox.com/errors/no-billing-account.md)
- [This card can't be used here](https://www.scriptivox.com/errors/card-not-accepted.md)
- [This plan is not available right now](https://www.scriptivox.com/errors/plan-not-available.md)
- [We couldn't keep your plan just now](https://www.scriptivox.com/errors/keep-plan-failed.md)
- [You already have a lifetime plan](https://www.scriptivox.com/errors/lifetime-already-owned.md)
- [You already have an active subscription](https://www.scriptivox.com/errors/subscription-already-active.md)
- [Your API balance is empty](https://www.scriptivox.com/errors/api-no-balance.md) (API: ZERO_BALANCE)
- [Your API balance is too low for this transcription](https://www.scriptivox.com/errors/api-balance-too-low.md) (API: INSUFFICIENT_BALANCE)
- [Your bank asked to confirm a payment](https://www.scriptivox.com/errors/payment-needs-confirming.md)
- [Your last payment didn't go through](https://www.scriptivox.com/errors/payment-did-not-go-through.md)
- [Your payment was declined](https://www.scriptivox.com/errors/card-declined.md)
- [Your plan is already on that billing period](https://www.scriptivox.com/errors/billing-period-already-set.md)
- [Your subscription has a billing issue](https://www.scriptivox.com/errors/subscription-billing-issue.md)

## Account and sign-in

- [An account with this email already exists](https://www.scriptivox.com/errors/email-already-registered.md)
- [Creating your account didn't work](https://www.scriptivox.com/errors/sign-up-failed.md)
- [Enter your two-step sign-in code first](https://www.scriptivox.com/errors/two-step-code-needed.md)
- [Hand over your team before deleting your account](https://www.scriptivox.com/errors/account-delete-hand-over-team.md)
- [Invites are paused right now](https://www.scriptivox.com/errors/invites-paused.md)
- [Please sign in again](https://www.scriptivox.com/errors/sign-in-needed.md)
- [Signing in didn't work](https://www.scriptivox.com/errors/sign-in-failed.md)
- [That is not an invite code](https://www.scriptivox.com/errors/invite-code-invalid.md)
- [The app's request to connect is not valid](https://www.scriptivox.com/errors/authorization-request-invalid.md)
- [The email you typed is not your account's email](https://www.scriptivox.com/errors/account-delete-email-mismatch.md)
- [The link in your email has expired](https://www.scriptivox.com/errors/email-link-expired.md)
- [The quick check that you're a person didn't pass](https://www.scriptivox.com/errors/human-check-failed.md)
- [The two-step sign-in code was wrong](https://www.scriptivox.com/errors/two-step-code-wrong.md)
- [This account can't be deleted here](https://www.scriptivox.com/errors/account-delete-not-possible.md)
- [This invite code can't be used on your account](https://www.scriptivox.com/errors/invite-code-not-eligible.md)
- [Too many invite codes tried today](https://www.scriptivox.com/errors/invite-code-too-many-tries.md)
- [We couldn't find that invite code](https://www.scriptivox.com/errors/invite-code-not-found.md)
- [We couldn't find your account](https://www.scriptivox.com/errors/account-not-found.md)
- [We couldn't send the email](https://www.scriptivox.com/errors/email-not-sent.md)
- [Wrong email or password](https://www.scriptivox.com/errors/wrong-email-or-password.md)
- [You need a free account for this](https://www.scriptivox.com/errors/account-needed.md)
- [You were signed out because your sign-in was used elsewhere](https://www.scriptivox.com/errors/sign-in-used-elsewhere.md)
- [Your account already has an invite code](https://www.scriptivox.com/errors/invite-code-already-set.md)
- [Your account has no email address](https://www.scriptivox.com/errors/account-has-no-email.md)
- [Your account is already set to be deleted](https://www.scriptivox.com/errors/account-delete-already-scheduled.md)
- [Your account is still being set up](https://www.scriptivox.com/errors/account-still-setting-up.md)
- [Your data download couldn't be prepared](https://www.scriptivox.com/errors/data-export-failed.md)

## Teams

- [Handing over this team needs our help](https://www.scriptivox.com/errors/team-hand-over-needs-support.md)
- [Seats can be added after the trial](https://www.scriptivox.com/errors/team-seats-locked-during-trial.md)
- [That link is a team invitation](https://www.scriptivox.com/errors/invite-link-is-team-invite.md)
- [That number of seats isn't possible](https://www.scriptivox.com/errors/team-seat-count-not-allowed.md)
- [That person can't be invited](https://www.scriptivox.com/errors/team-invite-person-unavailable.md)
- [That person can't take over the team](https://www.scriptivox.com/errors/team-hand-over-person-not-eligible.md)
- [The team has no free seats](https://www.scriptivox.com/errors/team-no-free-seats.md)
- [The team owner can't leave the team](https://www.scriptivox.com/errors/team-owner-cannot-leave.md)
- [The team's invitation emails are used up for now](https://www.scriptivox.com/errors/team-invite-limit.md)
- [The team's plan is not active](https://www.scriptivox.com/errors/team-hand-over-plan-inactive.md)
- [This invitation was sent to another email](https://www.scriptivox.com/errors/team-invite-wrong-email.md)
- [This team invitation is not valid](https://www.scriptivox.com/errors/team-invite-invalid.md)
- [You already own a team](https://www.scriptivox.com/errors/already-team-owner.md)
- [You were removed from a team](https://www.scriptivox.com/errors/team-removed.md)
- [You're already in a team](https://www.scriptivox.com/errors/already-in-team.md)
- [You're not in a team](https://www.scriptivox.com/errors/team-not-a-member.md)
- [Your team has ended](https://www.scriptivox.com/errors/team-ended.md)
- [Your team role doesn't allow this](https://www.scriptivox.com/errors/team-role-not-allowed.md)

## Library and transcripts

- [A chat reply is still being written](https://www.scriptivox.com/errors/chat-reply-in-progress.md)
- [Copying didn't work](https://www.scriptivox.com/errors/copy-failed.md)
- [It was changed somewhere else](https://www.scriptivox.com/errors/changed-elsewhere.md)
- [Only the last chat message can be tried again](https://www.scriptivox.com/errors/chat-retry-only-last-message.md)
- [Part of this transcript is locked](https://www.scriptivox.com/errors/transcript-part-locked.md)
- [That automation no longer exists](https://www.scriptivox.com/errors/automation-not-found.md)
- [That folder doesn't exist](https://www.scriptivox.com/errors/folder-not-found.md)
- [That name is already used](https://www.scriptivox.com/errors/name-already-used.md)
- [The automation didn't finish](https://www.scriptivox.com/errors/automation-failed.md)
- [The chat answer was cut off](https://www.scriptivox.com/errors/chat-answer-cut-off.md)
- [The chat can't read this file](https://www.scriptivox.com/errors/chat-file-not-supported.md)
- [The chat file is not ready yet](https://www.scriptivox.com/errors/chat-attachment-not-ready.md)
- [The chat message is too long](https://www.scriptivox.com/errors/chat-message-too-long.md)
- [The export didn't work](https://www.scriptivox.com/errors/export-failed.md)
- [The file couldn't be added to the chat](https://www.scriptivox.com/errors/chat-file-not-added.md)
- [The file is too large for the chat](https://www.scriptivox.com/errors/chat-file-too-large.md)
- [The original recording is no longer stored](https://www.scriptivox.com/errors/original-file-gone.md) (API: SOURCE_EXPIRED)
- [The paragraph is too long](https://www.scriptivox.com/errors/edit-paragraph-too-long.md)
- [The recording couldn't be played](https://www.scriptivox.com/errors/video-playback-failed.md)
- [The same settings give the same transcript](https://www.scriptivox.com/errors/transcribe-again-same-settings.md)
- [The transcript is in the Trash](https://www.scriptivox.com/errors/transcript-in-trash.md)
- [The transcript is not ready yet](https://www.scriptivox.com/errors/transcript-not-ready.md)
- [This certificate is no longer valid](https://www.scriptivox.com/errors/certificate-not-valid.md)
- [This chat is too long](https://www.scriptivox.com/errors/chat-too-long.md)
- [This shared link no longer opens](https://www.scriptivox.com/errors/shared-link-unavailable.md)
- [This transcript can't be edited this way](https://www.scriptivox.com/errors/transcript-not-editable.md)
- [This transcript can't be transcribed again](https://www.scriptivox.com/errors/transcribe-again-unavailable.md)
- [This transcript has no speakers to rename](https://www.scriptivox.com/errors/transcript-has-no-speaker-labels.md)
- [Too many files in one chat message](https://www.scriptivox.com/errors/chat-attachment-limit.md)
- [Transcribe recordings before adding them to the chat](https://www.scriptivox.com/errors/chat-file-is-recording.md)
- [Wait for transcriptions to finish before deleting](https://www.scriptivox.com/errors/delete-blocked-while-transcribing.md)
- [We couldn't find that transcript](https://www.scriptivox.com/errors/transcript-not-found.md) (API: TRANSCRIPTION_NOT_FOUND)
- [You have reached the limit for these](https://www.scriptivox.com/errors/library-item-limit.md)
- [Your only workspace can't be deleted](https://www.scriptivox.com/errors/last-workspace-cannot-be-deleted.md)

## AI apps

- [AI app access is turned off for your account](https://www.scriptivox.com/errors/app-access-off.md)
- [An API key can't use your account's tools in an AI app](https://www.scriptivox.com/errors/api-key-cannot-use-account-tools.md)
- [Invite codes can't be used in this app](https://www.scriptivox.com/errors/invite-code-not-here.md)
- [The AI app's request has expired](https://www.scriptivox.com/errors/ai-app-request-expired.md)
- [The file you attached didn't reach Scriptivox](https://www.scriptivox.com/errors/attached-file-not-received.md)
- [The Scriptivox box in your chat isn't working](https://www.scriptivox.com/errors/in-chat-box-problem.md)
- [This can't be done from this AI app](https://www.scriptivox.com/errors/ai-app-cannot-do-this.md)
- [This chat app can't save files](https://www.scriptivox.com/errors/app-cannot-save-files.md)
- [You have reached the limit of connected apps](https://www.scriptivox.com/errors/connected-apps-limit.md)
- [Your AI app connection doesn't allow this](https://www.scriptivox.com/errors/app-access-level.md)
- [Your AI app's connection to Scriptivox needs signing in again](https://www.scriptivox.com/errors/app-connection-expired.md)

## Developer API

- [Less of the audio was speech than you asked for](https://www.scriptivox.com/errors/speech-below-threshold.md) (API: SPEECH_BELOW_THRESHOLD)
- [No webhook address is set](https://www.scriptivox.com/errors/webhook-url-missing.md)
- [Sign-in for apps is not set up here](https://www.scriptivox.com/errors/sign-in-not-configured.md) (API: ISSUER_UNCONFIGURED)
- [The file name is not valid](https://www.scriptivox.com/errors/filename-invalid.md) (API: INVALID_FILENAME)
- [The idempotency key was already used](https://www.scriptivox.com/errors/request-key-reused.md) (API: IDEMPOTENCY_KEY_CONFLICT)
- [The request body is too large](https://www.scriptivox.com/errors/request-body-too-large.md) (API: PAYLOAD_TOO_LARGE)
- [The request body must be sent as JSON](https://www.scriptivox.com/errors/request-not-json.md) (API: UNSUPPORTED_MEDIA_TYPE)
- [The request is missing something or is not valid](https://www.scriptivox.com/errors/request-invalid.md) (API: INVALID_REQUEST)
- [The request went to the wrong address](https://www.scriptivox.com/errors/request-wrong-address.md)
- [The same request is still running](https://www.scriptivox.com/errors/request-in-progress.md) (API: IDEMPOTENCY_KEY_LOCKED)
- [There is no endpoint at that address](https://www.scriptivox.com/errors/endpoint-not-found.md) (API: NOT_FOUND)
- [This address takes a different request method](https://www.scriptivox.com/errors/method-not-allowed.md) (API: METHOD_NOT_ALLOWED)
- [This can't be done while the job is in this state](https://www.scriptivox.com/errors/action-not-allowed-now.md) (API: CONFLICT)
- [This endpoint has been removed](https://www.scriptivox.com/errors/endpoint-removed.md) (API: ENDPOINT_REMOVED)
- [Your API key is missing or wrong](https://www.scriptivox.com/errors/api-key-invalid.md) (API: INVALID_API_KEY)
- [Your API key was revoked](https://www.scriptivox.com/errors/api-key-revoked.md) (API: API_KEY_REVOKED)
- [Your request was blocked before it reached us](https://www.scriptivox.com/errors/request-blocked.md) (API: FORBIDDEN)
- [Your webhook couldn't be delivered](https://www.scriptivox.com/errors/webhook-not-delivered.md)

## Browser extension

- [A recording is already running](https://www.scriptivox.com/errors/recording-already-running.md)
- [Click the Scriptivox button on the tab first](https://www.scriptivox.com/errors/recording-needs-toolbar-click.md)
- [No audio or video on this page can be sent](https://www.scriptivox.com/errors/page-media-not-available.md)
- [No microphone was found](https://www.scriptivox.com/errors/microphone-not-found.md)
- [No screen or tab was chosen to share](https://www.scriptivox.com/errors/screen-share-not-chosen.md)
- [The browser's permission request was declined](https://www.scriptivox.com/errors/browser-permission-refused.md)
- [The recording couldn't start](https://www.scriptivox.com/errors/recording-could-not-start.md)
- [The recording stopped early](https://www.scriptivox.com/errors/recording-stopped-early.md)
- [The recording would have no sound](https://www.scriptivox.com/errors/recording-no-sound.md)
- [The Scriptivox extension isn't responding](https://www.scriptivox.com/errors/extension-not-responding.md)
- [The video's captions couldn't be read](https://www.scriptivox.com/errors/captions-unreadable.md)
- [This browser can't make this recording](https://www.scriptivox.com/errors/browser-cannot-record.md)
- [This connect page is from an older version of the extension](https://www.scriptivox.com/errors/extension-already-signed-in.md)
- [This tab can't be recorded](https://www.scriptivox.com/errors/tab-cannot-be-recorded.md)
- [Update the Scriptivox extension](https://www.scriptivox.com/errors/extension-update-needed.md)
- [Your browser is blocking the camera](https://www.scriptivox.com/errors/camera-blocked.md)
- [Your browser is blocking the microphone](https://www.scriptivox.com/errors/microphone-blocked.md)
- [Your computer has no room for the recording](https://www.scriptivox.com/errors/computer-storage-full.md)
- [Your microphone or camera was disconnected](https://www.scriptivox.com/errors/device-disconnected.md)
- [Your organisation has turned recording off](https://www.scriptivox.com/errors/blocked-by-organisation.md)
- [Your recording couldn't be sent](https://www.scriptivox.com/errors/recording-not-sent.md)
