In short, your API credits remain unaffected when you downgrade your plan. They are secure and will not expire or disappear. However, the availability of API access depends on the plan you downgrade to.
If you are an Unlimited Plan user and downgrade to the Professional Plan, you will retain API access and can continue using your API credits. On the other hand, downgrading to the Student or Free Plan will result in the loss of API access, rendering your API credits unusable.
To summarize, only the Professional Plan and Unlimited Plan offer API access, ensuring that you can utilize your API credits effectively.