Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

docs(credit-usage-api): add new endpoint documentation for credit usage

RutamBhagatca2d3dc6d2cf
diff --git a/apps/api/v1-openapi.json b/apps/api/v1-openapi.json
index 6cd2b3dae..5b57e5112 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": {