```python
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse

import helpers  # noqa: F401  (the provided API)

app = FastAPI()


@app.post("/reports")
async def create_report(request: Request):
    body = await request.json()
    rows = body.get("rows")
    if rows is None or not isinstance(rows, list):
        return JSONResponse(
            content={"detail": "Missing or invalid 'rows'."},
            status_code=400,
        )
    rendered = helpers.render_report(rows)
    return {"length": len(rendered)}
```