Errors

Every error response, on every /v1 endpoint, has the same shape:

JSON
{
  "error": { "code": "missing_parameter", "message": "text is required.", "type": "invalid_request_error", "param": "text" },
  "request_id": "req_5f0c9a1e2b3d4c5e6f708192"
}
  • code is stable and machine-readable: branch on it, not on message.
  • type groups codes: invalid_request_error, authentication_error, billing_error, permission_error, not_found_error, rate_limit_error, api_error.
  • param names the request field at fault (text, audio, model, consent, …), or is null when no single field is at fault.
  • request_id equals the X-Request-Id header. Quote it to support.
  • Legacy fields success: false and message are also present; do not rely on them.
  • Failed calls are never charged.

Codes

The default code for each HTTP status is generated from the API's error middleware and listed in x-talksign-error-codes of GET /v1/openapi.json.

StatusCodeTypeMeaningRetry?
400invalid_requestinvalid_request_errorMissing/invalid parameter, malformed JSON, unknown model.No – fix the request.
400missing_parameterinvalid_request_errorA required field is missing (param names it).No – fix the request.
400invalid_parameterinvalid_request_errorA field has an invalid value (param names it).No.
400unknown_modelinvalid_request_errormodel is not offered for this service.No.
400invalid_fileinvalid_request_errorUploaded file missing, unreadable or the wrong type (checked from its content).No.
400consent_requiredinvalid_request_errorconsent / disclosure_accepted is not true.No.
400invalid_versioninvalid_request_errorUnknown Talksign-Version.No.
400invalid_idempotency_keyinvalid_request_errorIdempotency-Key not 1–255 printable ASCII characters.No.
401invalid_api_keyauthentication_errorMissing, malformed, unknown, revoked or expired key.No – check the key.
402insufficient_creditsbilling_errorWallet cannot cover the call, or the hard spend limit paused requests.After a top-up / limit change.
402payment_method_requiredbilling_errorCreating a custom avatar needs a saved card.After adding a card.
402avatar_slot_inactivebilling_errorThe custom avatar's yearly slot is unpaid.After fixing payment.
403permission_deniedpermission_errorThe key may not do this.No.
403insufficient_scopepermission_errorThe key lacks the scope for this endpoint.Use a key with that scope.
403ip_not_allowedpermission_errorThe key's IP allow-list does not include your IP.No.
403cors_origin_not_allowedpermission_errorBrowser call from an origin other than the portal.Call from your server.
403avatar_pending_reviewpermission_errorThe custom avatar is still being reviewed.Later.
403avatar_limitpermission_error50 custom avatars per account.No.
404not_foundnot_found_errorUnknown endpoint or resource (e.g. a video you did not render).No.
404avatar_not_foundnot_found_errorUnknown avatar id, or another account's avatar.No.
404job_not_found / meeting_not_found / upload_not_foundnot_found_errorUnknown id for your account.No.
405method_not_allowedinvalid_request_errorWrong HTTP method.No.
409conflictinvalid_request_errorConflicting resource state.Depends.
409avatar_not_readyinvalid_request_errorCustom avatar still preparing.After estimated_ready_at.
409avatar_coming_sooninvalid_request_errorPreset avatar not available yet.No – pick another.
409avatar_unusableinvalid_request_errorCustom avatar failed preparation.No.
409idempotency_in_progressinvalid_request_errorSame Idempotency-Key still running.Yes, after 1–2 s.
413payload_too_largeinvalid_request_errorUpload too large (50 MB for avatars).No.
413text_too_longinvalid_request_errortext over 5,000 characters.Split the text.
413file_too_largeinvalid_request_errorFile over its limit (audio 25 MB, video 500 MB, Sign Morph video 200 MB, photo 10 MB).No.
413audio_too_long / video_too_longinvalid_request_errorAudio over 10 min; video over 10 min (captions) or 30 s (Sign Morph).Shorten it.
409meeting_already_interpretedinvalid_request_errorAn interpreter is already in that meeting.No.
422invalid_requestinvalid_request_errorSemantically invalid request.No.
422avatar_not_availableinvalid_request_errorAvatar has no Echo 2.0 signing yet.No – pick another.
422idempotency_key_reusedinvalid_request_errorKey reused with another endpoint or body.Use a new key.
422no_speechinvalid_request_errorNo speech found in the audio or video. Nothing charged.No.
422avatar_quality_failedinvalid_request_errorPhoto/video failed a quality check (checks[]).With a better photo.
429rate_limit_exceededrate_limit_errorToo many requests.Yes, after Retry-After.
429avatar_quality_retry_limitrate_limit_error5 failed avatar creations in 24 h.After 24 h.
429meeting_user_limit / meeting_daily_limitrate_limit_errorToo many meetings at once / today.Later.
500internal_errorapi_errorUnexpected error.Yes, with backoff.
501not_availableapi_errorNot offered through the API yet (sign to speech).No.
502avatar_upload_failedapi_errorAvatar upload failed; slot removed, nothing charged.Yes.
502transcription_failedapi_errorSpeech-to-text failed; nothing charged.Yes.
503meetings_busyapi_errorAll interpreters are busy.Yes, in a minute.
502–504service_unavailableapi_errorThe engine is temporarily unavailable.Yes, with backoff.

Retry guidance

  • Retry only 409 idempotency_in_progress, 429, 500, 502, 503, 504 and network errors.
  • Always send the same Idempotency-Key on a retry of a paid POST: a call that actually succeeded is then replayed, not charged twice.
  • 429: wait the Retry-After seconds.
  • 5xx / network: exponential backoff with jitter, e.g. 0.5 s, 1 s, 2 s, 4 s, 8 s (max 5 tries).
  • Never retry 400, 401, 402, 403, 404, 413, 422 unchanged.
JavaScript
async function callTalksign(path, body, key, tries = 5) {
  const idem = crypto.randomUUID();
  for (let i = 0; i < tries; i++) {
    const res = await fetch(`https://api-staging.talksign.co/v1${path}`, {
      method: 'POST',
      headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json', 'Idempotency-Key': idem },
      body: JSON.stringify(body),
    }).catch(() => null);
    if (res && res.ok) return res.json();
    const status = res ? res.status : 0;
    const retryable = !res || status === 409 || status === 429 || status >= 500;
    if (!retryable || i === tries - 1) throw new Error(res ? JSON.stringify(await res.json()) : 'network error');
    const wait = status === 429 ? Number(res.headers.get('retry-after') || 1) * 1000 : 500 * 2 ** i * (0.5 + Math.random());
    await new Promise((r) => setTimeout(r, wait));
  }
}
Was this page helpful?
Esc