checkQuotas
checkQuotas: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: { "application/json": { [key: string]: unknown } };
};
responses: {
"200": {
content: {
"application/json": {
allowed: boolean;
quotas: {
exceeded: boolean;
id: string;
limit: number;
metric: string;
name: string;
period: string;
remaining: number;
used: number;
}[];
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
checkRateLimits
checkRateLimits: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: { "application/json": { [key: string]: unknown } };
};
responses: {
"200": {
content: {
"application/json": {
allowed: boolean;
rateLimits: {
exceeded: boolean;
id: string;
limit: number;
name: string;
remaining: number;
reset: number;
window: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
createQuota
createQuota: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
dimensionFilters: { [key: string]: unknown };
limitValue: number;
metric: "total_tokens" | "total_events" | "total_cost_cents";
name: string;
period: "hour" | "day" | "week" | "month";
};
};
};
responses: {
"201": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
id: string;
limitValue: number;
metric: string;
name: string;
period: string;
projectId: string;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
createQuotaAlert
createQuotaAlert: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { quotaId: string };
query?: undefined;
};
requestBody?: { content: { "application/json": { threshold: number } } };
responses: {
"201": {
content: {
"application/json": {
createdAt: string;
id: string;
lastTriggeredAt?: string | null;
quotaId: string;
threshold: number;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
createRateLimit
createRateLimit: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
dimensionFilters: { [key: string]: unknown };
enabled: boolean;
limitValue: number;
name: string;
window: "hour" | "second" | "minute";
};
};
};
responses: {
"201": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
enabled: boolean;
id: string;
limitValue: number;
name: string;
projectId: string;
updatedAt: string;
window: string;
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
deleteQuota
deleteQuota: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: { "application/json": { success: boolean } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
deleteQuotaAlert
deleteQuotaAlert: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { alertId: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: { "application/json": { success: boolean } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
deleteRateLimit
deleteRateLimit: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: { "application/json": { success: boolean } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getCustomerUsage
getCustomerUsage: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { customerId: string };
query: { endDate: string; startDate: string };
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
customerId: string;
totalCostCents: number;
totalEvents: number;
totalInputTokens: number;
totalOutputTokens: number;
totalTokens: number;
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getProject
getProject: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
id: string;
name: string;
organizationId: string;
slug: string;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getQuota
getQuota: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
id: string;
limitValue: number;
metric: string;
name: string;
period: string;
projectId: string;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getQuotaAlert
getQuotaAlert: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { alertId: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
id: string;
lastTriggeredAt?: string
| null;
quotaId: string;
threshold: number;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getQuotaAlertHistory
getQuotaAlertHistory: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { alertId: string };
query?: { cursor?: string; limit?: string };
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": { hasMore: boolean; nextCursor: string
| null } & {
data: {
currentUsage: number;
id: string;
limitValue: number;
percentage: number;
quotaAlertId: string;
quotaId: string;
threshold: number;
triggeredAt: string;
webhookResponseCode: number | null;
webhookStatus: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getRateLimit
getRateLimit: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
enabled: boolean;
id: string;
limitValue: number;
name: string;
projectId: string;
updatedAt: string;
window: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getUsageBreakdown
getUsageBreakdown: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query: {
customerId?: string;
endDate: string;
eventType?: string;
groupBy: "model" | "customer_id" | "event_type" | "provider";
model?: string;
startDate: string;
};
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
data: {
dimension?: string
| null;
totalCostCents: number;
totalEvents: number;
totalInputTokens: number;
totalOutputTokens: number;
totalTokens: number;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getUsageSummary
getUsageSummary: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query: {
customerId?: string;
endDate: string;
eventType?: string;
model?: string;
startDate: string;
};
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
totalCostCents: number;
totalEvents: number;
totalInputTokens: number;
totalOutputTokens: number;
totalTokens: number;
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
getUsageTimeseries
getUsageTimeseries: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query: {
customerId?: string;
endDate: string;
eventType?: string;
interval: "hour" | "day" | "week";
model?: string;
startDate: string;
};
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": {
data: {
timestamp: string;
totalCostCents: number;
totalEvents: number;
totalInputTokens: number;
totalOutputTokens: number;
totalTokens: number;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
ingestEvent
ingestEvent: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
costCents?: number;
customerId: string;
eventType: string;
idempotencyKey?: string;
inputTokens?: number;
latencyMs?: number;
model?: string;
outputTokens?: number;
properties?: { [key: string]: unknown };
provider?: string;
timestamp?: string;
totalTokens?: number;
};
};
};
responses: {
"201": {
content: { "application/json": { id: string } };
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
ingestEventBatch
ingestEventBatch: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
events: {
costCents?: number;
customerId: string;
eventType: string;
idempotencyKey?: string;
inputTokens?: number;
latencyMs?: number;
model?: string;
outputTokens?: number;
properties?: { [key: string]: unknown };
provider?: string;
timestamp?: string;
totalTokens?: number;
}[];
};
};
};
responses: {
"201": {
content: { "application/json": { count: number } };
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
listEvents
listEvents: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: {
cursor?: string;
customerId?: string;
eventType?: string;
limit?: string;
model?: string;
};
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": { hasMore: boolean; nextCursor: string
| null } & {
data: {
costCents?: number | null;
createdAt: string;
customerId: string;
eventType: string;
id: string;
inputTokens?: number | null;
latencyMs?: number | null;
model?: string | null;
outputTokens?: number | null;
properties: { [key: string]: unknown };
provider?: string | null;
totalTokens?: number | null;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
listQuotaAlerts
listQuotaAlerts: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { quotaId: string };
query?: { cursor?: string; limit?: string };
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": { hasMore: boolean; nextCursor: string
| null } & {
data: {
createdAt: string;
id: string;
lastTriggeredAt?: string | null;
quotaId: string;
threshold: number;
updatedAt: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
listQuotas
listQuotas: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: { cursor?: string; limit?: string };
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": { hasMore: boolean; nextCursor: string
| null } & {
data: {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
id: string;
limitValue: number;
metric: string;
name: string;
period: string;
projectId: string;
updatedAt: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
listRateLimits
listRateLimits: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: { cursor?: string; limit?: string };
};
requestBody?: undefined;
responses: {
"200": {
content: {
"application/json": { hasMore: boolean; nextCursor: string
| null } & {
data: {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
enabled: boolean;
id: string;
limitValue: number;
name: string;
projectId: string;
updatedAt: string;
window: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
trackUsage
trackUsage: {
parameters: {
cookie?: undefined;
header?: undefined;
path?: undefined;
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
costCents?: number;
customerId: string;
eventType: string;
idempotencyKey?: string;
inputTokens?: number;
latencyMs?: number;
model?: string;
outputTokens?: number;
properties?: { [key: string]: unknown };
provider?: string;
timestamp?: string;
totalTokens?: number;
};
};
};
responses: {
"201": {
content: {
"application/json": {
allowed: boolean;
id: string;
quotas: {
exceeded: boolean;
id: string;
limit: number;
metric: string;
name: string;
period: string;
remaining: number;
reset: number;
used: number;
}[];
rateLimits: {
exceeded: boolean;
id: string;
limit: number;
name: string;
remaining: number;
reset: number;
window: string;
}[];
};
};
headers: { [name: string]: unknown };
};
"400": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"429": {
content: {
"application/json": {
allowed: boolean;
error: string;
quotas?: {
exceeded: boolean;
id: string;
limit: number;
metric: string;
name: string;
period: string;
remaining: number;
reset: number;
used: number;
}[];
rateLimits?: {
exceeded: boolean;
id: string;
limit: number;
name: string;
remaining: number;
reset: number;
window: string;
}[];
};
};
headers: { [name: string]: unknown };
};
};
}
updateQuota
updateQuota: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
dimensionFilters?: { [key: string]: unknown };
limitValue?: number;
metric?: "total_tokens" | "total_events" | "total_cost_cents";
name?: string;
period?: "hour" | "day" | "week" | "month";
};
};
};
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
id: string;
limitValue: number;
metric: string;
name: string;
period: string;
projectId: string;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
updateQuotaAlert
updateQuotaAlert: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { alertId: string };
query?: undefined;
};
requestBody?: { content: { "application/json": { threshold?: number } } };
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
id: string;
lastTriggeredAt?: string | null;
quotaId: string;
threshold: number;
updatedAt: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}
updateRateLimit
updateRateLimit: {
parameters: {
cookie?: undefined;
header?: undefined;
path: { id: string };
query?: undefined;
};
requestBody?: {
content: {
"application/json": {
dimensionFilters?: { [key: string]: unknown };
enabled?: boolean;
limitValue?: number;
name?: string;
window?: "hour" | "second" | "minute";
};
};
};
responses: {
"200": {
content: {
"application/json": {
createdAt: string;
dimensionFilters: { [key: string]: unknown };
enabled: boolean;
id: string;
limitValue: number;
name: string;
projectId: string;
updatedAt: string;
window: string;
};
};
headers: { [name: string]: unknown };
};
"401": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
"404": {
content: { "application/json": { error: string } };
headers: { [name: string]: unknown };
};
};
}