Welcome to Microsoft Q&A! Thanks for posting the question.
I don't see any way to convert ARM template to terraform script but you can use the ARM template that can be deployed using terraform command resource_group_template_deployment. I don't see any APIM terraform command to achieve this.
Github Terraform Repository: https://github.com/terraform-providers/terraform-provider-azurerm