Should we create as many number of files as there are number of apis in nextjs

In next js we have to create a seperate file for each new api like for /user there will be user.js with a seperate handler. And a seperate one for /user/goldmember. Will it not create too much files? Is there another way?