Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you get the context window of Open AI models?

Tags:

openai-api

Is there a specific API call to get the context window of each model open ai offers? I have printed out openai.Models.list() and there isn't any context window member in the json spit out.

like image 905
jebarpg Avatar asked Dec 04 '25 23:12

jebarpg


1 Answers

That information would probably best fit in the OpenAI API endpoint:

GET https://api.openai.com/v1/models

But the API reference shows it doesn't currently return the model's context window :(

Seems like the best available "source of truth" for this information is the Models page in the documentation.

like image 96
Paweł Bulwan Avatar answered Dec 08 '25 18:12

Paweł Bulwan