Hard to give advice without knowing your business. But here is my experience.
Two years back, I had 2 customers (out of 300) asking for the API. I built it because it was a cool thing to do. I wanted to build a REST API. Fast forward two years, the API is now defunct and has been a complete waste of time. I could’ve saved a few weeks of development time, had I known better.
While you may think you are getting a good deal, since the client is funding it, there are a few things to think about.
Opportunity cost - the time spent building your API can be used elsewhere for the benefit of a larger percentage of your customers
Ongoing support cost - once you build the API for this customer, how easy would it be to renegade on the deal, if you start to believe that it was a mistake.
Distraction - generally an API is built as a stand alone product (unless you build it first and then build your app off it - which is not the case here). This will be a major distraction for you. Building a SaaS business needs laser focus.
Got to fight the “shiny object syndrome” - this is generic advice for all features that you will build for your SaaS. If a large percentage of your customers do not care about a specific feature, it might make more business sense to prioritize on a feature that they do care about.
About whether the customer has control over the API - if you are paying a company top dollar to do custom work for you, I presume you would expect a degree of control. If nothing else, it might be construed as a promise from your side to continue supporting the API, even if this customer is the only one using it.
If you still want to build it, I would suggest getting a bunch of your customers to pre-pay for the API (give them a nice discount for it) and only build the API once you have crossed a minimum threshold.