# Create sign clips

`POST /v1/speech-to-sign/realtime`

A playlist of short sign clips to play back to back, for live use. Send `text`, or `multipart/form-data` with an `audio` file (up to 10 minutes, 25 MB) to have it transcribed first. Billed at $0.33 / min of sign video produced.

## 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).
- `Talksign-Version` (string): Optional dated API version. See [Versioning](/docs/authentication#versioning).

## Request body

- `text` (string, required): The text to sign, 1 to 5,000 characters. Words without a sign are fingerspelled or swapped for a synonym.
- `language` (enum): The sign language to sign in. ASL (`asl`) is live and is the default. One of: `asl`.
- `avatar` (string): Who signs. A preset id (defaults to `arthur`) or one of your custom avatar ids. `elena` and `daniel` are coming soon and return `409`. One of: `arthur`, `amara`.
- `model` (enum): The signing model. Defaults to `echo-2.0`, the only one. Any other value returns `400`. One of: `echo-2.0`.
- `durationSeconds` (number): Length hint in seconds, max 3600. Billing uses the measured video length when available.

## Response

Returns the playlist in `data`. Play per word: `in_url`, then `url` between `active_start_s` and `active_end_s`, then `out_url`; loop `idle.url` between sentences.

- `glosses` (string[]): Sign words in signing order.
- `playlist` (array): One clip per sign: `gloss`, `url`, `in_url`, `out_url`, `active_start_s`, `active_end_s`, `alphaUrl` (matte for transparent backgrounds), `tier`, `transition`.
- `idle` (object): `{ url, expires_at }`: the rest-pose loop, or `null`.
- `expires_at` (string): Every URL works until at least this time (6 to 12 hours).
- `has_missing` (boolean): `true` when a word had no clip (its `url` is `null`).

## 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.
- 413 Payload too large: `text` is longer than 5,000 characters (`text_too_long`). Nothing is charged.
- 429 Too many requests: You hit a rate limit. Wait for `Retry-After` seconds. See [Rate limits](/docs/rate-limits).
- 503 Service unavailable: The signing engine is busy. Retry with backoff.

## Example request

```bash
curl https://api-staging.talksign.co/v1/speech-to-sign/realtime \
  -H "Authorization: Bearer $TALKSIGN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, how are you?",
    "language": "asl",
    "avatar": "arthur"
  }'
```

## Example response

```json
{
  "success": true,
  "data": {
    "language": "asl",
    "avatar": "arthur",
    "text": "Hello, how are you?",
    "glosses": [
      "HELLO",
      "HOW",
      "YOU"
    ],
    "playlist": [
      {
        "gloss": "HELLO",
        "url": "https://…/HELLO.mp4?…",
        "in_url": "https://…/HELLO.in.mp4?…",
        "out_url": "https://…/HELLO.out.mp4?…",
        "active_start_s": 0.6667,
        "active_end_s": 1.5333,
        "tier": "TIER_1_EXACT"
      }
    ],
    "idle": {
      "url": "https://…/_IDLE.mp4?…",
      "expires_at": "2026-11-22T18:00:00.000Z"
    },
    "expires_at": "2026-11-22T18:00:00.000Z",
    "has_missing": false
  },
  "usage": {
    "type": "speech-to-sign/realtime",
    "durationSeconds": 2,
    "costUsd": 0.02,
    "walletRemainingUsd": 49.98
  }
}
```
