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 910111213141516171819202122232425
usingvarclient=newResembleAIClient(apiKey);// Load the signed-in account profile.varaccount=awaitclient.SubpackageAccount.GetAccountAsync();varemail=account.Item?.Email;// Load the first team record returned by the account API.varteam=awaitGetFirstTeamAsync(client);varteamName=team.Name;varteamPlan=team.Plan;// Load the default project to confirm project management responses are typed.varproject=awaitGetFirstProjectAsync(client);varprojectName=project.Name;varprojectUuid=project.Uuid;// Inspect current usage buckets reported by the billing endpoint.varbillingUsage=awaitclient.SubpackageAccount.GetBillingUsageAsync();varsynthesisUsage=billingUsage.Items?.Synth;vardetectionUsage=billingUsage.Items?.Detect;Console.WriteLine($"Email: {email}");Console.WriteLine($"Team: {teamName} ({teamPlan})");Console.WriteLine($"Project: {projectName} [{projectUuid}]");Console.WriteLine($"Usage: synth={synthesisUsage}, detect={detectionUsage}");