Api-key pricing issue, not able to select pricing model

I find no way to select any particular pricing mentioned at https://openai.com/api/pricing/ for api-key usage. How do we select to use GPT-3.5 Turbo instead of GPT-4o for api-key usage to reduce cost?

Welcome to the Forum!

You cannot directly link an API key to a specific model. You would simply specify the desired model in the API request. That said and while I have not implemented this myself, you could certainly develop other internal technical controls on your end that would prevent the use of certain models for API calls.

Does that answer your question?

@jr.2509 is correct that you can’t directly specify an API key is only valid for a particular model and that you must always specify the model you are calling in the actual request.

That said, if you’re concerned about an API key which is shared among several people working on a project being used to call more expensive models you can at the project level restrict which models are allowed to be used in the project. This has the side-effect of restricting the models which may be used with any project-specific API keys.



for any project other than the default project, you can block or allow any combination of models you want for that project.

1 Like