Factored out api.h.