FYI: How to reach Chat Completions API examples in docs

The other day I was looking for a syntax for Chat Completions API, but couldn’t find it anymore. So I thought of letting people know of this little trick.

Currently if you enter some topics, there will only be Responses API examples:

Only responses examples

But in some pages like this one, there is still a Responses x Completions toggler:

API Mode Selector

After toggling it to completions, if you visit the previous page, the examples will be using chat completions:

Chat completions

Alternatively, you can also add the parameter ?api-mode=chat or api-mode=responses at the end of some urls to switch modes.

It would be nice if OpenAI were to fix this and allow the selector back, as it was before.

This is very helpful @aprendendo.next! Agree that the previous selector was quite nice.