Shopping cart price rules: Magento 1 that creates a variable coupon code in PHP

I'm trying to create a coupon code for a client that gets a fixed value from PHP (essentially, it can be a different amount for each client / generation instance).

For the generation of the coupon code, I created a rule and used the code available here:

The only problem is that it seems that the value should be set in the rule.

Is there a way to create coupon codes according to a rule but with different values, or do I have to create a rule every time I want to execute this?