This may not be the best way but I have done this with Azure DevOps build/release pipelines. It did not involve API documentation so I can't speak to whether this would work for that. For what it's worth:
Assuming each repo has its own Markdown files and images...
Create a build pipeline for each repo that publishes its contents as an artifact.
Create a release pipeline...

...that downloads each artifact to one place.

DocFx provides a release pipeline task. Add that to the release pipeline.
Create a universal docfx.json
in a central place. Include paths to each of the downloaded artifacts.
Point the DocFx release pipeline task to the docfx.json
file.
To apply a custom template, create a repo for the template and follow the same steps: publish it as an artifact, download it with the release pipeline, and reference the directory with the docfx.json
.