The Nexa SDK uses structured error codes to help users diagnose and resolve issues encountered during model inference or system operation.
Use this document to quickly look up the meaning of any returned error code.

Common Errors (100xxx)

General-purpose errors related to invalid input, memory allocation, or unsupported operations.
Error CodeNameDescription
-100000ML_ERROR_COMMON_UNKNOWNUnknown error
-100001ML_ERROR_COMMON_INVALID_INPUTInvalid input parameters or handle
-100003ML_ERROR_COMMON_MEMORY_ALLOCATIONMemory allocation failed
-100004ML_ERROR_COMMON_FILE_NOT_FOUNDFile not found or inaccessible
-100007ML_ERROR_COMMON_NOT_INITIALIZEDLibrary not initialized
-100013ML_ERROR_COMMON_NOT_SUPPORTEDOperation not supported
-100201ML_ERROR_COMMON_MODEL_LOADModel loading failed
-100203ML_ERROR_COMMON_MODEL_INVALIDInvalid model format
-100301ML_ERROR_COMMON_EMBEDDING_GENERATIONEmbedding generation failed
-100302ML_ERROR_COMMON_EMBEDDING_DIMENSIONInvalid embedding dimension
-100401ML_ERROR_COMMON_RERANK_FAILEDReranking failed
-100402ML_ERROR_COMMON_RERANK_INPUTInvalid reranking input
-100501ML_ERROR_COMMON_IMG_GENERATIONImage generation failed
-100502ML_ERROR_COMMON_IMG_PROMPTInvalid image prompt
-100503ML_ERROR_COMMON_IMG_DIMENSIONInvalid image dimensions

LLM Errors (200xxx)

Errors encountered during language model tokenization or text generation.
Error CodeNameDescription
-200001ML_ERROR_LLM_TOKENIZATION_FAILEDTokenization failed
-200004ML_ERROR_LLM_TOKENIZATION_CONTEXT_LENGTHContext length exceeded
-200101ML_ERROR_LLM_GENERATION_FAILEDText generation failed
-200103ML_ERROR_LLM_GENERATION_PROMPT_TOO_LONGInput prompt too long

VLM Errors (300xxx)

Errors related to processing images and audio in vision-language models.
Error CodeNameDescription
-300001ML_ERROR_VLM_IMAGE_LOADImage loading failed
-300002ML_ERROR_VLM_IMAGE_FORMATUnsupported image format
-300101ML_ERROR_VLM_AUDIO_LOADAudio loading failed
-300102ML_ERROR_VLM_AUDIO_FORMATUnsupported audio format
-300201ML_ERROR_VLM_GENERATION_FAILEDMultimodal generation failed

OCR Errors (400xxx)

Issues specific to text detection and recognition from images.
Error CodeNameDescription
-400001ML_ERROR_OCR_DETECTIONOCR text detection failed
-400002ML_ERROR_OCR_RECOGNITIONOCR text recognition failed
-400003ML_ERROR_OCR_MODELOCR model error

ASR Errors (500xxx)

Errors encountered while transcribing audio using automatic speech recognition.
Error CodeNameDescription
-500001ML_ERROR_ASR_TRANSCRIPTIONASR transcription failed
-500002ML_ERROR_ASR_AUDIO_FORMATUnsupported ASR audio format
-500003ML_ERROR_ASR_LANGUAGEUnsupported ASR language

TTS Errors (600xxx)

Issues related to speech synthesis, voice selection, or audio format output.
Error CodeNameDescription
-600001ML_ERROR_TTS_SYNTHESISTTS synthesis failed
-600002ML_ERROR_TTS_VOICETTS voice not found
-600003ML_ERROR_TTS_AUDIO_FORMATTTS audio format error