Dynamically add Options in Attributes(datatype - choice)
Is this a one-time operation you are trying to do? Or are you expecting to do this every time a page loads and needs to view this dropdown?
If you are dynamically changing the values based on other fields in the form, i dont recommend using calling your API to populate your dropdown. Instead load all possible options into your dropdown and filter them using javascript. There is are .removeOption() and .addOption() functions in JS.
If this is a one-time data load of options, you could use a C# console app to do this using the XRM Sdk. You should be able to create a field or global optionset and set the options. But my follow up would be that if you have more than 10 options, and have dynamically changing criteria - is there a reason you arent loading this data into another table and using a Lookup to reference it? There are PCF controls that can make the lookup look like a dropdown if thats the issue.