The present invention provides a sustained release formulation of an active pharmaceutical ingredient (“API”). In particular, the sustained release formulation is adapted for topical administration or administration via injection and comprises a nanoemulsion of oil-in-water. In some embodiments, the API is an ophthalmic API. The present invention also provides a method for treating an eye disorder using a sustained release formulation. In one particular embodiment, the invention provides methods for treating dry eye syndrome using a sustained release formulation comprising a nanoemulsion of oil-in-water and alpha 2 adrenergic agonist, pharmaceutically acceptable salt thereof or a mixture thereof.