EndPointType file Don't forget to put your API key in it! var baseURL: URL { guard let url = URL(string: "https://api.openweathermap.org/data/2.5/") else { fatalError("baseURL could not be configured.") } return url } then make a instance of router.swift file in your code private let router = Router() for enum with cases about specific api URL It will make your router more dynamic! Don't forget extension to EndPointType! enum YourAPI { case first(country: String) case second(time: Int) case third(name: String) } extension YourAPI: EndPointType { var path: String { switch self { case .first(let country): return "\(country).json" case .second(let time):