Skip to main content
When a request fails, the API returns a JSON error response:
{
    "error": {
        "type": "content_filter",
        "message": "The request was rejected because it was considered high risk"
    }
}

Error List

400 — Bad Request

error typeerror messageDescription
content_filterThe request was rejected because it was considered high riskContent moderation rejected the request. Your input or generated content may contain unsafe or sensitive content.
invalid_request_errorInvalid request: {error_details}Invalid request, usually due to incorrect format or missing required parameters.
invalid_request_errorInput token length too longThe token count in the request exceeds the model’s maximum context length.
invalid_request_errorYour request exceeded model token limit : {max_model_length}The sum of input tokens and max_tokens exceeds the model’s maximum length.
invalid_request_errorInvalid purpose: only ‘file-extract’ acceptedThe purpose field is incorrect; currently only ‘file-extract’ is accepted.
invalid_request_errorFile size is too large, max file size is 100MB, please confirm and re-upload the fileThe uploaded file exceeds the size limit.
invalid_request_errorFile size is zero, please confirm and re-upload the fileThe uploaded file is empty.
invalid_request_errorThe number of files you have uploaded exceeded the max file count {max_file_count}, please delete previous uploaded filesTotal file count exceeded. Delete unused files and retry.

401 — Authentication Error

error typeerror messageDescription
invalid_authentication_errorInvalid AuthenticationAuthentication failed. Check that your API Key is correct.
incorrect_api_key_errorIncorrect API key providedAuthentication failed. Check that your API Key is provided and correct.
If you use a Key from platform.kimi.com on platform.kimi.ai (or vice versa), you will receive a 401 error. Keys from the two platforms are completely independent and cannot be mixed.

403 — Permission Denied

error typeerror messageDescription
permission_denied_errorThe API you are accessing is not openThe API you are trying to access is not yet available.
permission_denied_errorYou are not allowed to get other user infoAccessing other users’ information is not allowed.

404 — Not Found

error typeerror messageDescription
resource_not_found_errorNot found the model {model-id} or Permission deniedThe model does not exist or you do not have access.

429 — Rate Limit / Quota Exceeded

error typeerror messageDescription
engine_overloaded_errorThe engine is currently overloaded, please try again laterToo many concurrent requests. Try again later or upgrade your tier.
exceeded_current_quota_errorYour account {organization-id}<{ak-id}> is suspended, please check your plan and billing detailsAccount balance insufficient; account suspended.
exceeded_current_quota_errorYou exceeded your current token quota: <{organization_id}> {token_credit}, please check your account balanceToken quota exceeded. Check your account balance.
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization max concurrency: {Concurrency}, please try again after {time} secondsConcurrency limit reached. Wait and retry.
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization max RPM: {RPM}, please try again after {time} secondsRPM rate limit reached. Wait and retry.
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization TPM rate limit, current:{current_tpm}, limit:{max_tpm}TPM rate limit reached. Wait and retry.
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization TPD rate limit,current:{current_tpd}, limit:{max_tpd}TPD rate limit reached. Wait and retry.

500 — Server Error

error typeerror messageDescription
server_errorFailed to extract file: {error}File extraction failed. Please retry.
unexpected_outputinvalid state transitionInternal error. Please contact support.

Troubleshooting

  • 401 errors: Verify you are using the correct platform’s API Key
  • 429 errors: Reduce concurrency or upgrade your tier. See Recharge and Rate Limits
  • 500 errors: Retry later. If the issue persists, contact support