I have two routes, one is for generating image, and another one is uploading and creating a row in DB. So I am wondering if we can use the generating image route after the creating row in DB.
You can use createCaller to call another route server-side, but we generally recommend you pull the necessary logic out into functions and call those instead. Calling a procedure from a procedure means running the middleware chain again which is just unnecessary work