calesthio/OpenMontage · error · RuntimeError

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

Error message

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

What it means

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

Source

Thrown at tools/video/jimeng_video.py:405

    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. Check the HTTP status: 401/403 means credentials, 429 means rate limit (back off and retry), 5xx means a Jimeng-side outage (retry later).
  2. Use the code and msg fields to identify the specific failure and adjust the request accordingly.

When it happens

Trigger: The Jimeng API returns an HTTP error status together with a business code and message in the response body.

Common situations: See trigger scenarios.


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