返回文档首页

API

API 参考

Design Extractor 后端提供认证、配额管理和用户信息服务。以下接口主要供 Pro / Max 订阅用户和内部前端调用。

Base URL

https://api.getwebdesign.top

所有请求均需携带 Cookie(credentials: include)以维持会话状态。

GET/api/auth/me需登录

获取当前登录用户的基本信息、订阅计划和账户状态。

Response Example

{
  "user": {
    "email": "user@example.com",
    "display_name": "User Name",
    "avatar_url": "https://lh3.googleusercontent.com/...",
    "tier": "free" | "pro" | "max"
  }
}
GET/api/quota/status需登录

查询当前用户的月度分析额度使用情况和剩余配额。

Response Example

{
  "used": 12,
  "limit": 50,
  "tier": "pro"
}
POST/api/auth/logout需登录

清除当前会话,注销登录状态。

Response Example

{ "success": true }
GET/api/auth/google

发起 Google OAuth 登录流程。成功后重定向到指定的 success URL,失败则重定向到 failure URL。

Request Example

GET /api/auth/google?success=https://getwebdesign.top/dashboard&failure=https://getwebdesign.top/login?error=1

Response Example

302 Redirect to Google OAuth consent screen