diff --git a/apps/api/v1-openapi.json b/apps/api/v1-openapi.json index 6cd2b3da..5b57e511 100644 --- a/apps/api/v1-openapi.json +++ b/apps/api/v1-openapi.json @@ -719,7 +719,89 @@ } } } + }, + "/credit-usage": { + "get": { + "summary": "Get remaining credits for the authenticated team", + "operationId": "getCreditUsage", + "tags": [ + "Billing" + ], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": true + }, + "data": { + "type": "object", + "properties": { + "remaining_credits": { + "type": "number", + "description": "Number of credits remaining for the team", + "example": 1000 + } + } + } + } + } + } + } + }, + "404": { + "description": "Credit usage information not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string", + "example": "Could not find credit usage information" + } + } + } + } + } + }, + "500": { + "description": "Server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "example": false + }, + "error": { + "type": "string", + "example": "Internal server error while fetching credit usage" + } + } + } + } + } + } + } } + } }, "components": { "securitySchemes": {