{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proteiniq-io/json-schema/proteiniq-io-account-schema.json",
  "title": "Account",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/proteiniq-io-api-openapi.json#/components/schemas/Account",
  "type": "object",
  "required": [
    "object",
    "workspace",
    "limits",
    "api_key"
  ],
  "properties": {
    "object": {
      "const": "account"
    },
    "workspace": {
      "type": "object",
      "required": [
        "id",
        "plan",
        "credits"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "plan": {
          "type": "object",
          "required": [
            "tier",
            "paid"
          ],
          "properties": {
            "tier": {
              "type": "string"
            },
            "paid": {
              "type": "boolean"
            }
          }
        },
        "credits": {
          "type": "object",
          "required": [
            "available"
          ],
          "properties": {
            "available": {
              "type": "number"
            }
          }
        }
      }
    },
    "limits": {
      "type": "object",
      "required": [
        "active_jobs",
        "concurrent_jobs",
        "public_api_rate_limit"
      ],
      "properties": {
        "active_jobs": {
          "type": "integer"
        },
        "concurrent_jobs": {
          "type": "object",
          "required": [
            "max",
            "remaining"
          ],
          "properties": {
            "max": {
              "type": "integer"
            },
            "remaining": {
              "type": "integer"
            }
          }
        },
        "public_api_rate_limit": {
          "type": "object",
          "description": "Request budget for this API key on the workspace plan.",
          "required": [
            "limit",
            "window_seconds"
          ],
          "properties": {
            "limit": {
              "type": "integer"
            },
            "window_seconds": {
              "type": "integer"
            }
          }
        },
        "public_api_workspace_rate_limit": {
          "type": "object",
          "description": "Request budget shared by every API key in the workspace.",
          "required": [
            "limit",
            "window_seconds"
          ],
          "properties": {
            "limit": {
              "type": "integer"
            },
            "window_seconds": {
              "type": "integer"
            }
          }
        }
      }
    },
    "api_key": {
      "type": "object",
      "required": [
        "id",
        "env",
        "prefix",
        "scopes"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "env": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}