# Overview

Base URL: `https://api-staging.talksign.co/v1`.
All request and response bodies are JSON unless noted. Every endpoint needs
`Authorization: Bearer <key>` unless marked **public**. Prices below are the current
list prices; the authoritative, generated list is in "Pricing and billing" and in
`x-talksign-billing` of `GET /v1/openapi.json`.

Common to every endpoint:

- Response header `X-Request-Id` (an incoming well-formed `X-Request-Id` is echoed).
- Response header `Talksign-Version`; the request header of the same name is optional
  ("Versioning").
- The key needs the endpoint's scope ("Scopes and IP allow-lists").
- Rate-limit headers (see "Rate limits").
- Errors use the envelope in "Errors". `401 invalid_api_key`,
  `429 rate_limit_exceeded` and `5xx` can happen on any authenticated endpoint.
- Test keys get sample responses with `Talksign-Test-Mode: true` and are never billed
  ("Test mode").

Paid endpoints additionally:

- Accept `Idempotency-Key` ("Idempotency").
- Reserve funds before work starts (`402 insufficient_credits` if the wallet is short)
  and charge only 2xx responses ("Pricing and billing").
- Return `usage: { type, durationSeconds, costUsd, walletRemainingUsd }`.
- Limit `text` to 5,000 characters (`413 text_too_long`, nothing charged).

## Shared sign request fields

Used by realtime, studio and the combined endpoint.

| Field | Type | Required | Notes |
|---|---|---|---|
| `text` | string | yes | 1–5,000 characters of text or transcribed speech. |
| `language` | string | no | `asl` (default) or `bsl`. |
| `avatar` | string | no | Preset id (`arthur` default, `amara`; `elena`, `daniel` coming soon) or one of your custom avatar ids (24-character hex, e.g. `6650f1c2a9b8d7e6f5a4b3c2`). |
| `avatar_id` | string | no | Alias of `avatar`. |
| `model` | string | no | `echo-2.0` (the only and default speech-to-sign model). Any other value returns `400`. |
| `durationSeconds` | number | no | Length hint, max 3600. Billing uses the server-measured sign video length when available, else the larger of this and the spoken-length estimate of `text`. |
| `config` | object | no | Advanced options. `config.signLanguage` / `config.avatarId` are fallbacks for `language` / `avatar`. |

Avatar errors for sign endpoints (nothing charged): `404 avatar_not_found` (unknown id
or another account's avatar), `409 avatar_coming_soon`, `409 avatar_not_ready`,
`409 avatar_unusable`, `403 avatar_pending_review`, `402 avatar_slot_inactive`,
`422 avatar_not_available` (no Echo 2.0 signing for this avatar). If your custom avatar
is still preparing the requested language, the call uses `arthur` and adds `notice` and
`requested_avatar` to `data`.

