# Is the current model pricing available via the API?

**URL:** https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893
**Category:** API
**Created:** [October 1, 2023, 1:09pm UTC](https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893 "2023-10-01T13:09:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![christian.tischer](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/christian.tischer/32/147268_2.png) [@christian.tischer](https://community.openai.com/u/christian.tischer)
#### Post date: [October 1, 2023, 1:09pm UTC](https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893/1 "2023-10-01T13:09:52Z")

</div>

Hi,

I found this list for the current prices per token for the various models:

> **[Pricing](https://openai.com/pricing)**
>
> Simple and flexible. Only pay for what you use.

It would be very convenient if those prices were available via the API, too.

For instance, it would be great if the below list would also contain the current prices per token, which, afaik, it doesn’t.

```auto
import openai
openai.Model.list()

```

Does someone know whether it is currently possible to obtain the pricing information programmatically?

Thank you for your help!

---

<div class="post-metadata">

### Author: ![christian.tischer](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/christian.tischer/32/147268_2.png) [@christian.tischer](https://community.openai.com/u/christian.tischer)
#### Post date: [October 2, 2023, 6:45am UTC](https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893/3 "2023-10-02T06:45:10Z")

</div>

Thanks a lot for the above code snippet! In fact, I had the same idea to let it parse the web-site. Good to know to this is not so easy. I will then follow your advice and for now manually maintain a little “pricing database” within the code.

---

<div class="post-metadata">

### Author: ![martin.monperrus](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/martin.monperrus/32/128661_2.png) [@martin.monperrus](https://community.openai.com/u/martin.monperrus)
#### Post date: [February 22, 2024, 10:23am UTC](https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893/5 "2024-02-22T10:23:29Z")

</div>

Yes, it would be great to have the current pricing available as API endpoint.

---

<div class="post-metadata">

### Author: ![alexblackwell](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/alexblackwell/32/511517_2.png) [@alexblackwell](https://community.openai.com/u/alexblackwell)
#### Post date: [February 15, 2025, 3:23pm UTC](https://community.openai.com/t/is-the-current-model-pricing-available-via-the-api/406893/6 "2025-02-15T15:23:46Z")

</div>

Also waiting for it… Such a pity there’s no such thing rn
