Fireworks.ai has very competitive pricing and an extensive API as documented at https://readme.fireworks.ai/reference/createchatcompletion