There are several options to delete data in Settings > General. Each option will require you to confirm your choice in a pop-up alert.
These actions are irreversible.
This will delete all chats on your device and from iCloud, but your settings and API keys will remain.
This will reset all settings to default and delete API keys from the keychain, but your chats will remain.
This will delete all chats from your device and from iCloud. The API key will be deleted from the keychain, and all settings will be reset to default.
Delete all data option, or remove the API keys manually by setting them to an empty value.