Skip to content · تخطَّ إلى المحتوى
نبرة Nabra

Using the API

Error handling

The error envelope and what each code means.

Every error uses one envelope, so clients handle failures in one place:

503
HTTP/1.1 503 Service Unavailable

{
  "error": {
    "code": "extraction_unavailable",
    "message": "Cannot reach Ollama at http://localhost:11434.",
    "details": { "transcription": "بدي ٢ شاورما ووجبة زنجر" }
  }
}
StatusCodeMeaning
400invalid_context`context` is not valid JSON, or names unknown fields.
400unsupported_localeAn override (`locale` / `dialect`) the service does not know. Leave both out for auto.
401unauthorizedMissing or wrong API key (when the server requires one).
403read_only_schemaBuilt-in schemas cannot be overwritten or deleted.
404unknown_schema / unknown_sessionNo such schema or version (details list what exists), or the session expired.
409version_existsThat schema version is saved with different content. Save a new version.
409session_conflict / session_schema_mismatch / session_turn_limitTwo inputs at once, a different schema than the session's, or too many inputs.
413audio_too_large / audio_too_long / text_too_longOver the size or duration limit.
415unsupported_media_typeNot an accepted audio type.
422invalid_schemaThe schema (saved or inline) is not valid. `details.errors` lists each problem with its path.
422invalid_audio / no_speech / invalid_request / invalid_reviewUnreadable audio, silence, a malformed request, or a review value of the wrong shape.
429rate_limitedToo many requests this minute.
503extraction_unavailableThe language model is unavailable. `details.transcription` still carries what was heard.
504timeoutProcessing exceeded the request timeout.

Limits

LimitDefaultSetting
Audio size25 MBMAX_AUDIO_SIZE_MB
Audio duration120 sMAX_AUDIO_SECONDS — probed before transcription
Text input4,000 charactersMAX_TEXT_CHARS
Request timeout180 sREQUEST_TIMEOUT_SECONDS
Concurrency1 job at a time (queued)MAX_CONCURRENT_JOBS — CPU speech recognition
Schema size60 fields, 3 levels deepChecked when a schema is saved or sent inline
Sessions30 min idle, 20 inputsSESSION_TTL_MINUTES, MAX_SESSION_TURNS — in memory
Rate limitOff by defaultRATE_LIMIT_PER_MINUTE per key or IP