The 2008 blog post announcing the ArcGIS Server JS API says:
Everyone can use the ArcGIS JavaScript API. There is no fee for using the ArcGIS JavaScript API or deploying an application built with it.
But Esri's Web Mapping Pricing page says "Contact us for pricing".
Which is correct?