7 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.
GET /ai-usage/org/{orgId}/summary
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
Response 200 (application/json)
{
plan: "agency" | "enterprise" | "entry" | "entry_plus" | "free" | "pro" | "starter" | "studio_plus";
periodStart: string;
periodEnd: string;
periodSource: "calendar";
daysRemaining: number;
creditsIncluded: number;
creditsUsed: number;
creditsRemaining: number;
percentUsed: number;
customBudgetCents: any;
hardStopEnabled: boolean;
overagesEnabled: boolean;
dailyAverageCents: number;
projectedMonthEndCents: number;
withinBudget: boolean;
aiEnabled: boolean;
maxRequestTokens: number;
maxOutputTokens: number;
planCredits: {
included: number;
remaining: number;
};
boughtCredits: {
remaining: number;
};
ok: boolean;
creditLimit: number;
}
GET /ai-usage/org/{orgId}/verament
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
period | query | string | No |
Response 200 (application/json)
{
period: {
key: "current" | "previous";
start: string;
end: string;
};
tiers: any[];
credits: {
used: number;
included: number;
};
byDay: {
date: string;
credits: {
lite: number;
max: number;
standard: number;
verament: number;
};
partial?: boolean;
}[];
generations: {
total: number;
succeeded: number;
failed: number;
successRate: null | number;
failedCreditsCharged: number;
};
failuresByCode: {
code: string;
count: number;
}[];
}
GET /ai-usage/org/{orgId}/history
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
days | query | string | No |
Response 200 (application/json)
{
ok: boolean;
orgId: string;
periodStart: string;
periodEnd: string;
history: {
date: string;
requests: number;
totalTokens: number;
costCents: number;
creditsCharged: number;
}[];
}
GET /ai-usage/org/{orgId}/breakdown
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
Response 200 (application/json)
{
ok: boolean;
orgId: string;
periodStart: string;
periodEnd: string;
byFeature: {
featureTag: string;
requests: number;
totalTokens: number;
costCents: number;
creditsCharged: number;
}[];
byModel: {
model: string;
requests: number;
totalTokens: number;
costCents: number;
creditsCharged: number;
}[];
byTaskType: {
taskType: string;
requests: number;
totalTokens: number;
costCents: number;
creditsCharged: number;
}[];
}
GET /ai-usage/org/{orgId}/recent
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
limit | query | string | No |
offset | query | string | No |
Response 200 (application/json)
{
ok: boolean;
orgId: string;
requests: {
id: string;
projectId: null | string;
userId: null | string;
taskType: string;
featureTag: null | string;
environment: null | string;
promptTokens: number;
completionTokens: number;
totalTokens: number;
costCents: number;
requestId: null | string;
cached: boolean;
createdAt: string (date-time);
model: string;
creditsCharged: number;
}[];
pagination: {
limit: number;
offset: number;
total: number;
};
}
GET /ai-usage/org/{orgId}/exhaustion-events
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
limit | query | string | No |
Response 200 (application/json)
{
ok: boolean;
orgId: string;
events: {
id: string;
creditsUsed: number;
creditsIncluded: number;
plan: string;
requestId: null | string;
featureTag: null | string;
createdAt: string (date-time);
}[];
}
GET /ai-usage/org/{orgId}/rollups
| Parameter | In | Type | Required |
|---|
orgId | path | string | Yes |
limit | query | string | No |
Response 200 (application/json)
{
ok: boolean;
orgId: string;
rollups: {
id: string;
periodStart: string (date-time);
periodEnd: string (date-time);
creditsIncluded: number;
creditsUsed: number;
creditsRemaining: number;
percentUsed: number;
totalTokens: number;
totalRequests: number;
totalCostCents: number;
updatedAt: string (date-time);
}[];
}