You can find the option to log out of all active sessions across all devices in the Settings page located in ChatGPT or the OpenAI developer platform security settings.
ChatGPT
To log out of all active sessions on ChatGPT across all devices:
Select your profile icon on the top-right corner of the page.
Click on Settings in the pop-up menu.
In the Settings modal, select Security and click on Log out all. You will be immediately logged out of the existing session.

Please note that it may take up to 30 minutes for other active ChatGPT sessions to be logged out.
API Platform
To log out of all active sessions on the API Platform across all devices:
Select gear icon on the top-right corner of the page. .
Click on Your Profile under the options available at the left of the page.
Under the Security tab, click on Log out all. You will be immediately logged out of the existing session.
Please note that all active API Platform sessions across all devices will be immediately closed.