Welcome to the Wefugees community and thank you for sharing your question.
A similar case was discussed on this platform before. You may want to check the answer of the following thread for more information.
In sum, there is no law which guarantees the issuing of a residence permit in your case. It will be at the discretion of the the immigration office. The acknowledgment of the paternity (Vaterschaftsanerkennung) and the shared custody for the kids will play a significant role. You will probably need to prove, that living as a family in your country of origin or another safe country is not possible.
I hope this helps and don’t hesitate to get back to us with any further questions.
All the best,