In the ConfigureServices method of Startup.cs, register the Client:
using NytApiClient;
// ...
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton(sp =>
{
var client = Client.For<INytApiClient>();
client.ApiKey = "YOUR_NYT_API_KEY";
return client;
});
// ...
}