BerriAI/litellm · error · BlackForestLabsError

Image generation failed: {status}

Error message

Image generation failed: {status}

What it means

Error "Image generation failed: {status}" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/black_forest_labs/image_edit/handler.py:372

                raise BlackForestLabsError(
                    status_code=response.status_code,
                    message=f"Polling failed: {response.text}",
                )

            data = response.json()
            status = data.get("status")

            verbose_logger.debug("BFL poll status: %s", status)

            if status == "Ready":
                return response
            elif status in [
                "Error",
                "Failed",
                "Content Moderated",
                "Request Moderated",
            ]:
                raise BlackForestLabsError(
                    status_code=400,
                    message=f"Image generation failed: {status}",
                )

            time.sleep(interval)

        raise BlackForestLabsError(
            status_code=408,
            message=f"Polling timed out after {max_wait} seconds",
        )

    async def _poll_for_result_async(
        self,
        initial_response: httpx.Response,
        headers: dict,
        async_client: AsyncHTTPHandler,
        max_wait: float = DEFAULT_MAX_POLLING_TIME,
        interval: float = DEFAULT_POLLING_INTERVAL,

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. The BFL image job failed; check inputs and the BFL dashboard for details.

When it happens

Trigger: Thrown at litellm/llms/black_forest_labs/image_edit/handler.py:372 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15). Data as JSON: /api/errors/bb0633b8de368dfb. Report an issue: GitHub.