Skip to content

Account overview

Inspect the authenticated account, current team plan, and billing usage.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using var client = new ResembleAIClient(apiKey);

// Load the signed-in account profile.
var account = await client.SubpackageAccount.GetAccountAsync();
var email = account.Item?.Email;

// Load the first team record returned by the account API.
var team = await GetFirstTeamAsync(client);
var teamName = team.Name;
var teamPlan = team.Plan;

// Load the default project to confirm project management responses are typed.
var project = await GetFirstProjectAsync(client);
var projectName = project.Name;
var projectUuid = project.Uuid;

// Inspect current usage buckets reported by the billing endpoint.
var billingUsage = await client.SubpackageAccount.GetBillingUsageAsync();
var synthesisUsage = billingUsage.Items?.Synth;
var detectionUsage = billingUsage.Items?.Detect;

Console.WriteLine($"Email: {email}");
Console.WriteLine($"Team: {teamName} ({teamPlan})");
Console.WriteLine($"Project: {projectName} [{projectUuid}]");
Console.WriteLine($"Usage: synth={synthesisUsage}, detect={detectionUsage}");