In the WordPress API is there a way to set the width of the post/page container

It’s totally up the the theme developer, and whether or not the theme properly uses $content_width to match their post/page content width would depend on the theme, and any other ways the theme made the width available would also depend on the theme.

I’d suggest building sliders so that they are responsive, then it won’t matter what the width of the content is. Most themes are responsive these days, and their content width would only be accurate for desktop anyway.