Skip to content

Generate

This example assumes using JasperAI; is in scope and apiKey contains your JasperAI API key.

1
2
3
4
5
6
7
8
9
var apiKey =
    Environment.GetEnvironmentVariable("JASPERAI_API_KEY") is { Length: > 0 } value
        ? value
        : throw new AssertInconclusiveException("JASPERAI_API_KEY environment variable is not found.");

using var client = new JasperAIClient(apiKey);

// The client provides access to all Jasper AI API endpoints
// through sub-clients: Command, Tasks, Knowledge, Voices, Styles, Documents, Users, Audiences, Usage.