func NewAPIWithHost(ctx context.Context, cfg *Config, h host.Host) (*API, error) {
    api := API{
        config: cfg,
    }
    capi, err := common.NewAPIWithHost(ctx, &cfg.Config, h, api.routes)