APIs are generally not free, but they are pretty easy to use rest calls and very low cost for small volumes - I've paid up to$40/month for my bot but once it slowed down to ordinary levels of usage it's probably under $10/mo.
It's not clear to me whether you want to use AI to summarize or reword content based on individual audience and platform technical needs, or if you want to AI to design and format it for you and apply all the correct markup or formatting markers. I wouldn't do that with AI unless it's very simple because the AI won't be consistent with non-specific tasks.
If I were looking to do this, I'd create a sort of design template to drop text into, then I'd have the AI pull out and reword the text for each section - possibly this could be a single prompt or multiple depending on the template complexity. You'd probably want different prompts for each social due to different technical requirements and possibly different audiences.
I'd also put in a lot of work with the prompts to make sure you get it fairly good at outputting what you want without any back and forth to make adjustments. Only when I had templates and prompts I was really happy with would I try automating it, and even then I'd never pipe the output directly to social media without human review because even the best prompts will have bad output from time to time.
That all being said, I'm not sure what your workflow is and I might be overcomplicating it.