function apiRouter({
	dir = "./app/api/routes",
	base = "/api",
	handler = fileURLToPath(new URL("./api-handler.js", import.meta.url)),
	plugins = async () => [],
	...options
} = {}) {
	return {
		type: "http",
		name: "api",
		...options,
		base,
		routes: apiRoutes({ dir }),
		handler,
		target: "server",
		plugins: async () => [
			tsconfigPaths(),
			config("env-vars", {
				envPrefix: "PRIVATE_",
			}),
			...(((await plugins?.()) ?? []).filter(Boolean) ?? []),
		],
	};
}
@param {{ plugins?: () => (import('vinxi').Plugin[] | Promise<import('vinxi').Plugin[]>); dir?: string; style?: any; base?: string; handler?: string }} param0
@returns {Partial<import('vinxi').RouterSchema>}