def METHOD_NAME(config: GatewayConfig) -> GatewayAPI:
    """
    Create the GatewayAPI app from the gateway configuration.
    """
    app = GatewayAPI(
        config=config,
        title="MLflow Gateway API",
        description="The core gateway API for reverse proxy interface using remote inference "
        "endpoints within MLflow",
        version=VERSION,
        docs_url=None,
    )
    @app.get("/", include_in_schema=False)
    async def index():
        return RedirectResponse(url="/docs")
    @app.get("/favicon.ico", include_in_schema=False)
    async def favicon():
        for directory in ["build", "public"]:
            favicon = Path(__file__).parent.parent.joinpath(
                "server", "js", directory, "favicon.ico"
            )
            if favicon.exists():
                return FileResponse(favicon)
        raise HTTPException(status_code=404, detail="favicon.ico not found")
    @app.get("/docs", include_in_schema=False)
    async def docs():
        return get_swagger_ui_html(
            openapi_url="/openapi.json",
            title="MLflow Gateway API",
            swagger_favicon_url="/favicon.ico",
        )
    @app.get(MLFLOW_GATEWAY_HEALTH_ENDPOINT)
    async def health() -> HealthResponse:
        return {"status": "OK"}
    @app.get(MLFLOW_GATEWAY_CRUD_ROUTE_BASE + "{route_name}")
    async def get_route(route_name: str) -> Route:
        if matched := app.get_dynamic_route(route_name):
            return matched
        raise HTTPException(
            status_code=404,
            detail=f"The route '{route_name}' is not present or active on the server. Please "
            "verify the route name.",
        )
    @app.get(MLFLOW_GATEWAY_CRUD_ROUTE_BASE)
    async def search_routes(page_token: Optional[str] = None) -> SearchRoutesResponse:
        if page_token is not None:
            start_idx = SearchRoutesToken.decode(page_token).index
        else:
            start_idx = 0
        end_idx = start_idx + MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE
        routes = list(app.dynamic_routes.values())
        result = {"routes": routes[start_idx:end_idx]}
        if len(routes[end_idx:]) > 0:
            next_page_token = SearchRoutesToken(index=end_idx)
            result["next_page_token"] = next_page_token.encode()
        return result
    return app