# Get account credits

Source: https://docs.recoupable.dev/api-reference/accounts/credits-get

Retrieve the current credit balance for an account. Returns the remaining credits along with the plan-derived monthly total and used count, plus a flag…

## GET /api/accounts/{id}/credits

Full OpenAPI specification: https://docs.recoupable.dev/spec/accounts.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://docs.recoupable.dev/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recoup API - Accounts",
    "description": "API documentation for the Recoup platform - an AI agent platform for the music industry",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/accounts/{id}/credits": {
      "get": {
        "operationId": "getAccountsByIdCredits",
        "description": "Retrieve the current credit balance for an account. Returns the remaining credits along with the plan-derived monthly total and used count, plus a flag indicating whether the account is on a pro plan (directly or via an organization). Credits refill monthly; the `timestamp` field reflects the last refill or balance update.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The unique identifier (UUID) of the account. Must be the authenticated account or another accessible via organization membership.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Credit balance retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCreditsResponse"
                },
                "examples": {
                  "free": {
                    "summary": "Free with an unavailable balance timestamp",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": 3330000,
                      "total_credits": 3330000,
                      "used_credits": 0,
                      "is_pro": false,
                      "plan": "free",
                      "task_limit": 1,
                      "min_cadence_minutes": 10080,
                      "timestamp": null
                    }
                  },
                  "starter": {
                    "summary": "Paid Starter: is_pro remains false",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": 15000000,
                      "total_credits": 20000000,
                      "used_credits": 5000000,
                      "is_pro": false,
                      "plan": "starter",
                      "task_limit": 3,
                      "min_cadence_minutes": 1440,
                      "timestamp": "2026-10-01T12:00:00Z"
                    }
                  },
                  "directPro": {
                    "summary": "Direct Pro",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": 292450000,
                      "total_credits": 300000000,
                      "used_credits": 7550000,
                      "is_pro": true,
                      "plan": "pro",
                      "task_limit": null,
                      "min_cadence_minutes": 60,
                      "timestamp": "2026-10-01T12:00:00Z"
                    }
                  },
                  "organizationPro": {
                    "summary": "Effective Pro through an organization",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": 292450000,
                      "total_credits": 300000000,
                      "used_credits": 7550000,
                      "is_pro": true,
                      "plan": "pro",
                      "task_limit": null,
                      "min_cadence_minutes": 60,
                      "timestamp": "2026-10-01T12:00:00Z"
                    }
                  },
                  "aboveAllotment": {
                    "summary": "Extra credits above the allowance: used_credits is zero",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": 325000000,
                      "total_credits": 300000000,
                      "used_credits": 0,
                      "is_pro": true,
                      "plan": "pro",
                      "task_limit": null,
                      "min_cadence_minutes": 60,
                      "timestamp": "2026-10-01T12:00:00Z"
                    }
                  },
                  "negativeBalance": {
                    "summary": "Signed balance: usage display can exceed the allowance",
                    "value": {
                      "account_id": "11111111-1111-4111-8111-111111111111",
                      "remaining_credits": -1000,
                      "total_credits": 3330000,
                      "used_credits": 3331000,
                      "is_pro": false,
                      "plan": "free",
                      "task_limit": 1,
                      "min_cadence_minutes": 10080,
                      "timestamp": "2026-10-01T12:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - invalid or missing authentication",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCreditsErrorResponse"
                },
                "example": {
                  "error": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - account not accessible to the authenticated account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountCreditsErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountCreditsResponse": {
        "type": "object",
        "required": [
          "account_id",
          "remaining_credits",
          "total_credits",
          "used_credits",
          "is_pro",
          "timestamp",
          "plan",
          "task_limit",
          "min_cadence_minutes"
        ],
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the account this balance belongs to.",
            "example": "11111111-1111-4111-8111-111111111111"
          },
          "remaining_credits": {
            "type": "integer",
            "description": "Balance in integer micro-dollars. Can exceed the plan allowance after a top-up or be negative. This is a balance, not a lifetime-spend total.",
            "example": 292450000
          },
          "total_credits": {
            "type": "integer",
            "minimum": 0,
            "description": "Monthly refill floor in integer micro-dollars: Free 3,330,000; Starter 20,000,000; Pro 300,000,000. Top-ups can put remaining credits above this floor.",
            "example": 300000000
          },
          "used_credits": {
            "type": "integer",
            "minimum": 0,
            "description": "max(0, total_credits - remaining_credits). A balance-derived display, not lifetime or period ledger spend.",
            "example": 7550000
          },
          "is_pro": {
            "type": "boolean",
            "description": "True when the account is on a pro plan, directly via an account subscription or via an organization subscription.",
            "example": true
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "ISO 8601 timestamp from the balance record; null when unavailable.",
            "example": "2026-10-01T12:00:00Z"
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "starter",
              "pro"
            ],
            "example": "pro"
          },
          "task_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Enabled scheduled-task limit; null means unlimited.",
            "example": null
          },
          "min_cadence_minutes": {
            "type": "integer",
            "description": "Minimum allowed cadence: Free 10080, Starter 1440, Pro 60.",
            "example": 60
          }
        },
        "example": {
          "account_id": "11111111-1111-4111-8111-111111111111",
          "remaining_credits": 292450000,
          "total_credits": 300000000,
          "used_credits": 7550000,
          "is_pro": true,
          "plan": "pro",
          "task_limit": null,
          "min_cadence_minutes": 60,
          "timestamp": "2026-10-01T12:00:00Z"
        },
        "description": "Current plan-derived allowance and balance in integer micro-dollars. Extra credits can exceed the allowance; used_credits is max(0, total_credits - remaining_credits), not ledger spend. The response preserves the signed balance. Null task_limit means unlimited."
      },
      "AccountCreditsErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error message.",
            "example": "Account not found"
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Recoup API key. [Learn more](/quickstart#api-keys)."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
