Sunan Abi Dawud, Book 29, Hadith 15 (Abu Dawud 3870)

Narrated Abdullah ibn Amr ibn al-'As:

I heard the Messenger of Allah (ﷺ) say: If I drink an antidote, or tie an amulet, or compose poetry, I am the type who does not care what he does. Abu Dawud said: THis was peculiar to the Prophet (ﷺ), but some people have allowed to use it, i.e. antidote.