Skip to content
Sign in

Errors And Limits

Expect explicit auth, quota, and upstream failures.

These APIs share the same team API key system, but their runtime error surfaces differ. Thai ASR enforces request and concurrent-session limits directly; Reading Score mainly returns validation or upstream-transcription failures; Shared LLM can surface model saturation; TTS can return model/language validation or synthesis runtime failures; Video Flashcards can return upload, credit, URL-safety, or async job failures; LTX23 and KDCN Video can return validation, configuration, upstream timeout, or async job failure responses.

FieldTypeRequiredNotes
401HTTPThai ASR + Reading Score + Shared LLM + TTS + Video Flashcards + LTX23 Video + KDCN VideoMissing or invalid API key.
400HTTPTTS + Video Flashcards + LTX23 Video + KDCN VideoInvalid JSON or multipart body, missing required text/prompt/image/video fields, unsupported model or language pairing, invalid learning direction, seed, duration, aspect ratio, resolution, model option, or media source.
402HTTPVideo FlashcardsThe caller does not have enough credits to start the flashcard generation job.
413HTTPVideo FlashcardsThe uploaded or downloaded video exceeds the configured file size or duration limit.
429HTTP / WS closeThai ASRRequest-per-minute limit or concurrent-session limit exceeded. WebSocket clients can see close code `4429`.
4401WS closeThai ASRWebSocket authentication failed.
503HTTPThai ASR + Reading Score + Shared LLM + KDCN VideoPolicy lookup, public model configuration, or the upstream ASR / transcription / LLM runtime was unavailable.
502HTTPTTS + Video Flashcards + LTX23 Video + KDCN VideoThe Next.js public route could not reach the Django/TTS/Video Flashcards/LTX23/KDCN upstream, or the upstream timed out.
500HTTPTTS + Video FlashcardsThe backend accepted the request but the synthesis, flashcard, or runtime task returned an immediate server-side failure.
429HTTPShared LLMThe shared LLM runtime or upstream worker was saturated.
1011WS closeThai ASRUnexpected server-side streaming failure.

Thai ASR quota notes

  • The HTTP config and session routes can reject requests when the team request bucket is exhausted.
  • The WebSocket service can reject or close sessions when concurrent-session limits are exceeded.
  • Daily audio quota is checked during streaming as audio accumulates.

Reading Score validation notes

  • student_audio is required.
  • You must send at least one of reference_text or reference_audio.
  • language must resolve to Thai. Other values are rejected.

TTS validation notes

  • text is required and capped at 200 characters.
  • Vietnamese must use vieneu_v2, qwen_viet_tts, or omnivoice.
  • Malay and Lao must use omnivoice.

Video Flashcards validation notes

  • learning_direction must be one of the documented direction ids.
  • Upload requests require video_file; URL requests require url.
  • Direct video URLs must be publicly reachable and cannot resolve or redirect to private networks.

KDCN validation notes

  • model must resolve to a `kdcn:` model from `/api/kdcn/v1/models`.
  • Model-specific required fields are driven by the catalog; send exact fields through options when common fields are not enough.
  • Media URLs must be public, same-site `/uploads/...`, or base64 data URLs; remote private-network hosts are rejected.