统一错误码表

所有接口错误响应格式:{ "code": "error_code", "message": "描述", "detail": "可选详情", "trace_id": "追踪ID" }

HTTP状态码code说明
400validation_error请求参数校验失败
401unauthorizedAPI Key 无效或缺失
403nsr_not_authorized税号未授权
403forbidden权限不足
404not_found资源不存在
404task_not_found任务不存在(他人任务同样返回404)
404draft_not_found草稿不存在
409idempotency_conflict幂等键冲突(不同请求体)
422balance_insufficient余额不足
422quota_exhausted配额耗尽
422daily_query_limit_exceeded日查询配额超限
429rate_limitedQPS 限流
409file_not_ready版式文件尚未生成
500internal_error服务器内部错误
503engine_unavailable引擎服务不可达
503engine_timeout引擎请求超时