# Create captions

`POST /v1/jobs`

Adds captions to a video in the background and answers `202 Accepted` at once. You get an MP4 with burned-in captions plus SRT and VTT files. Billed at $0.99 / min of video of source video. Send the video as multipart `video` or upload it first with `POST /v1/uploads`.

## Headers

- `Authorization` (string, required): Bearer authentication of the form `Bearer <token>`, where the token is your API key (`sk-live-…` or `sk-test-…`).
- `Idempotency-Key` (string): Any unique string (up to 255 characters). A retry with the same key and body returns the first answer and is never charged twice. See [Idempotency](/docs/idempotency).

## Request body

- `type` (enum, required): Must be `captions`. One of: `captions`.
- `video` (file): MP4, MOV or WebM, up to 500 MB and 10 minutes. Or use `video_upload_id`.
- `video_upload_id` (string): An `upl_…` id from `POST /v1/uploads`, instead of `video`.
- `captions` (array): Your own lines, `{ start, end, text }` in seconds (up to 300). Leave out for an automatic transcript.
- `language` (string): Spoken language of the video.
- `burn_in` (boolean): Burn captions into the MP4. Defaults to `true`.
- `resolution` (enum): Output resolution. One of: `720p`, `1080p`.

## Response

Returns a job. Poll [Get a job](/docs/api/jobs/get) or use a webhook. When `succeeded`, `result` holds:

- `video_url` (string): The captioned MP4 (with your key). `download_url` works without a key for 1 hour.
- `srt_url` (string): Captions as SRT.
- `vtt_url` (string): Captions as WebVTT.
- `lines` (integer): Number of caption lines.
- `transcript` (string): The automatic transcript, when you sent no captions.

## Errors

- 400 Bad request: A required field is missing or a value is not allowed (`invalid_request`).
- 401 Unauthorized: The API key is missing or not valid (`invalid_api_key`).
- 402 Payment required: Your wallet does not have enough funds for this request (`insufficient_credits`). Nothing is charged.
- 404 Not found: Unknown `video_upload_id` (`upload_not_found`).
- 413 Payload too large: The video is too big or too long.
- 429 Too many requests: You hit a rate limit. Wait for `Retry-After` seconds. See [Rate limits](/docs/rate-limits).

## Example request

```bash
curl https://api-staging.talksign.co/v1/jobs \
  -H "Authorization: Bearer $TALKSIGN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "captions",
    "video_upload_id": "upl_0a1b2c3d4e5f60718293a4b5"
  }'
```

## Example response

```json
{
  "id": "job_8c1d2e3f4a5b6c7d8e9f0a1b",
  "object": "job",
  "type": "captions",
  "status": "queued",
  "created_at": "2026-11-22T12:00:00.000Z"
}
```
