Direct imaging surveys have led to recent discoveries of Jupiter-like planets that are widely separated from their host stars and cannot be easily explained by leading theories of planet formation. Elemental abundances in the atmospheres of these companions and their hosts have been postulated to reveal formation information. The comparison of the abundances (such as C/O ratios) of these gas giants to their host stars, with predictions of current theoretical models, imply different abundance ratios depending on the formation mechanism. Several active projects are involved in measuring the C/O ratios of the directly imaged planets, involving both ground-based instruments as well as the JWST. However, the companion C/O ratios cannot be interpreted without the corresponding knowledge of the host stars, which have poorly constrained abundances. In addition, measuring the detailed chemical makeup of the host star can allow us to investigate population demographics among the directly imaged planet population and identify possible trends. Optical spectra can be used for the estimation of stellar elemental abundances. To achieve this, we have started a comprehensive optical survey of directly imaged planet host stars to constrain the abundances of 15 elements (C, O, Na, Mg, Si, S, Ca, Sc, Ti, Cr, Mn, Fe, Ni, Zn, Y), and the C/O ratio. We present the first results from this survey, in which we have obtained high-resolution (R~100,000) Automated Planet Finder (APF) optical spectra of 5 F/G-type host stars with well-studied companions. We are able to estimate the elemental abundances up to an accuracy of ~0.1 dex and C/O at an accuracy of ~20%. We also perform a small C/O meta-analysis to show that our results are sufficiently accurate to make comparisons with the C/O ratios of the companions and better constrain their formation scenarios.