{
  "openapi": "3.1.0",
  "info": {
    "title": "FetchLayer Core API — Account",
    "version": "1.0.0",
    "description": "Account-scoped endpoints for authenticated users and API keys."
  },
  "servers": [
    {
      "url": "https://api.fetchlayer.dev/fetchlayer"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key",
        "description": "Send your FetchLayer key as Authorization: Bearer ss-your-key."
      }
    }
  },
  "paths": {
    "/me/credits": {
      "get": {
        "operationId": "me-credits",
        "tags": [
          "Account"
        ],
        "summary": "Available credits for the current API key owner",
        "description": "Returns the current available credits for the user that owns the Bearer API key.",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "credits": {
                      "type": "number",
                      "description": "Current available credits."
                    }
                  },
                  "additionalProperties": false
                },
                "examples": {
                  "default": {
                    "value": {
                      "credits": 12450
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid or missing Bearer token"
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    }
  }
}