The transition from specialised AI to a superintelligence is getting close. There is therefore an urgent need for a code of ethics for the era of AI – a digital humanism that involves the constructive interaction between humans and digital machines including a future superintelligence.