I want to parse the openai pricing based on token usage (https://openai.com/api/pricing/) per model.
Is there any convenient API available or community created which may return a map of modelName Vs Cost. for unit tokens.
There’s no official API for OpenAI pricing. One might map names for models into costs manually or use something like Beautiful Soup to scrape the pricing page. Look for community-built APIs or scripts on GitHub.