It's not currently possible to change the product price from the storefront using AJAX. The admin API can be used to update product pricing, but this isn't necessarily meant to update pricing on-the-fly, since product pricing will be preserved for a short time if a customer enters the checkout with that item.
If you detail what you're looking to build, I'd be happy to offer some suggestions.
We manufacture custom products from variants the user selects in our app. They can select from literally 1,000's of product combinations. In other platforms this would be considered a configurable product or a bundled product. Shopify, however, has a limitation on how many variants a single product can have, so we cannot go down this road.
Currently, we dump the user's product selections into the Shopify Cart via the Shopify Ajax API, but they are line items. This works just fine, but for marketing purposes we need to have a single product SKU/Barcode/GTIN that we could call e.g. "Your Manufactured Product", which would be the cumulative price of all of the products they have selected that ultimately will become one final, but unique product after manufacturing. The end goal is to have one product that user's can review.
Likely, the answer is Shopify just can't do this, but I wanted to ask. I know we could create through the Shopify Admin API a short lived product and give these products any price we want, but then we would litter our Shopify store with 1,000's of these short lived custom products every day and need to implement garbage cleanup. This would be messy.
Having the ability to have one product and adjust the price in the cart for the user's sessions only, using the Shopify Ajax API, but not the actual product in admin would solve this issue for us.