Both of these contraindications are controversial 
Poorly controlled psychosis
Severe liver disease such as cirrhosis
Pregnancy
Active substance use disorder (for serial ketamine injections)
Age less than 3 months

Side effects
At anesthetic doses, 10–20% of adults (1–2% of children) experience adverse psychiatric reactions that occur during emergence from anesthesia, ranging from dreams and dysphoria to hallucinations and emergence delirium. Psychotomimetic effects decrease adding lamotrigine and nimodipine and can be counteracted by pretreatment with a benzodiazepine or propofol. Ketamine anesthesia commonly causes tonic-clonic movements (greater than 10% of people) and rarely hypertonia. Vomiting can be expected in 5–15% of the patients; pretreatment with propofol mitigates it as well. Laryngospasm occurs only rarely with ketamine. Ketamine, generally, stimulates breathing; however, in the first 2–3 minutes of a high-dose rapid intravenous injection it may cause a transient respiratory depression.At lower sub-anesthetic doses, psychiatric side effects are prominent. Most people feel strange, spacey, woozy, or a sense of floating, or have visual distortions or numbness. Also very frequent (20–50%) are difficulty speaking, confusion, euphoria, drowsiness, and difficulty concentrating. The symptoms of psychosis such as going into a hole, disappearing, feeling as if melting, experiencing colors, and hallucinations are described by 6–10% of people. Dizziness, blurred vision, dry mouth, hypertension, nausea, increased or decreased body temperature, or feeling flushed are the common (>10%) non-psychiatric side effects. All these adverse effects are most pronounced by the end of the injection, dramatically reduced 40 minutes afterward, and completely disappear within 4 hours after the injection.
Some daily users reported withdrawal symptoms, primarily anxiety, shaking, sweating, and palpitations, following the attempts to stop. Cognitive deficits as well as increased dissociation and delusion symptoms were observed in frequent recreational users of ketamine. Interactions
Ketamine potentiates the sedative effects of propofol and  midazolam. Naltrexone potentiates psychotomimetic effects of a low dose of ketamine, while lamotrigine and nimodipine decrease them. Clonidine reduces the increase of salivation, heart-rate and blood-pressure during ketamine anesthesia and decreases the incidence of nightmares.Clinical observations suggest that benzodiazepines may diminish the antidepressant effects of ketamine. It appears most conventional antidepressants can be safely combined with ketamine. Pharmacology
Pharmacodynamics
Mechanism of action
Antagonism of the NMDA receptor is responsible for the anesthetic, analgesic, and psychotomimetic effects of ketamine. NMDA receptor antagonism results in analgesia by preventing central sensitization in dorsal horn neurons; in other words, ketamines actions interfere with pain transmission in the spinal cord.The mechanism of action of ketamine in alleviating depression is not well understood, and is an area of active investigation. Possible mechanisms include direct action on the NMDA receptor, downstream effects on regulators such as BDNF and mTOR, and effects of ketamines metabolites such as hydroxynorketamine. It is not clear whether NMDA receptor is solely responsible for this action or interactions with other receptors are also necessary. It is not also not clear whether ketamine alone is sufficient for the antidepressive action or its metabolites also are important.