Skip to main content

Workspace Quotas

Check resource quotas and remaining capacity for a workspace.

List Quotas

GET/v1/workspaces/{workspaceId}/quotas

Query Parameters

ParameterTypeDescription
usageTypeKeystringFilter by usage type (e.g., images)
pageintegerPage number
sizeintegerItems per page

Example

Check before you build

Call this endpoint at the start of any workflow that will generate content or images to verify your workspace has sufficient quota remaining. The availableAmount field is the most useful for this check — it accounts for both the monthly limit and any bonus or spillover credits.

API and UI share the same quotas

Token and image usage via the REST API, the MCP server, or any other integration is deducted from the same workspace quotas as usage through the neuroflash app. There is no separate API allowance.

curl "https://app.neuroflash.com/api/usage-service/v1/workspaces/{workspace_id}/quotas" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
"data": [
{
"id": "quota-uuid-123",
"workspaceId": "workspace-uuid",
"usageTypeKey": "images",
"bonusAmount": 0,
"spilloverAmount": 0,
"usedAmount": 12,
"usedAmountDaily": 3,
"dailyRefreshed": "2024-06-15",
"availableAmount": 88,
"limitAmount": 100,
"limitAmountDaily": 50,
"fairUseLimitReached": false
}
],
"page": {
"size": 20,
"totalElements": 1,
"totalPages": 1,
"currentPage": 1
}
}

Response Fields

FieldTypeDescription
usageTypeKeystringUsage type identifier (e.g. tokens, images)
limitAmountintegerMonthly limit for this usage type
limitAmountDailyintegerDaily limit. Resets at midnight UTC.
usedAmountintegerTotal consumed in the current billing cycle
usedAmountDailyintegerConsumed since midnight UTC today
availableAmountintegerRemaining capacity in the current cycle
bonusAmountintegerBonus credits added on top of the plan base
spilloverAmountintegerUnused credits carried over from the previous cycle
fairUseLimitReachedbooleanWhether the fair use policy threshold has been reached
dailyRefreshedstringDate the daily counter last reset (ISO date)
Daily limits apply independently

If usedAmountDaily reaches limitAmountDaily, requests will fail until midnight UTC even if availableAmount is still positive. Check both fields when diagnosing unexpected failures.

List Usage Types

GET/v1/usage-types

Returns all metered resource types available in the system. Use this to discover valid usageTypeKey values for filtering quota responses.

Example

curl "https://app.neuroflash.com/api/usage-service/v1/usage-types" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response

{
"data": [
{
"id": "c01a5fac-89a9-49a6-9392-80c6bb3322a4",
"key": "images",
"displayName": "Images",
"fairUsePolicyLimit": null,
"permissionKeyDailyLimit": "maxImagesPerDay",
"permissionKeyMonthlyLimit": "maxImagesPerMonth"
},
{
"id": "2bfd44d4-700d-48b1-8c15-676f1cca0763",
"key": "tokens",
"displayName": "Tokens",
"fairUsePolicyLimit": null,
"permissionKeyDailyLimit": "maxAiOutputTokensPerDay",
"permissionKeyMonthlyLimit": "maxAiOutputTokensPerMonth"
}
],
"page": {
"size": 20,
"totalElements": 2,
"totalPages": 1,
"currentPage": 1
}
}