calesthio/OpenMontage · error · RuntimeError

Jimeng API error: code={code}, msg={msg}

Error message

Jimeng API error: code={code}, msg={msg}

What it means

Error "Jimeng API error: code={code}, msg={msg}" thrown in calesthio/OpenMontage.

Source

Thrown at tools/video/jimeng_video.py:402

        return msg

    @staticmethod
    def _json_or_raise(response: Any) -> dict[str, Any]:
        try:
            return response.json()
        except ValueError as exc:
            raise RuntimeError(
                f"Non-JSON response from Jimeng API: HTTP {response.status_code}"
            ) from exc

    @staticmethod
    def _check_code(http_status: int, payload: dict[str, Any]) -> None:
        if http_status < 400:
            code = payload.get("code", 10000)
            if code == 10000:
                return
            msg = payload.get("message", "unknown error")
            raise RuntimeError(f"Jimeng API error: code={code}, msg={msg}")
        code = payload.get("code", "unknown")
        msg = payload.get("message", "unknown error")
        raise RuntimeError(f"Jimeng API error: HTTP {http_status}, code={code}, msg={msg}")

View on GitHub (pinned to 95e1c3d0ab)

Solutions

  1. Look up the returned code/msg in the Jimeng API documentation and correct the offending parameter.
  2. Common causes are invalid credentials, exhausted quota, or an unsupported parameter combination — fix the request and retry.

When it happens

Trigger: The Jimeng API returns a JSON error envelope with a non-zero business code and message.

Common situations: See trigger scenarios.


AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15). Data as JSON: /api/errors/bf1f591ba3ebc8e7. Report an issue: GitHub.