Creating decks with programming language

Hi,
I’m looking for a way to create decks automatically with pre-created template is it possible to do it? I have been trying with genanki but the API doesnt allow me to add multiple imgs…