{
    "openapi": "3.0.3",
    "info": {
        "title": "todaybing OpenAPI",
        "description": "必应壁纸开放接口。注册用户可在 https://www.todaybing.com/setting/api 申请 API Key；\nhistory / future / feeds 需有效会员。旧路径 /api/today 不受影响。",
        "version": "1.0.0",
        "contact": {
            "name": "todaybing",
            "url": "https://www.todaybing.com"
        }
    },
    "servers": [
        {
            "url": "https://www.todaybing.com",
            "description": "生产"
        }
    ],
    "tags": [
        {
            "name": "meta",
            "description": "平台与密钥信息"
        },
        {
            "name": "free",
            "description": "免费接口（Key 可选）"
        },
        {
            "name": "pro",
            "description": "会员接口（Key + 有效会员）"
        }
    ],
    "paths": {
        "/api/v1": {
            "get": {
                "tags": [
                    "meta"
                ],
                "summary": "能力清单",
                "operationId": "v1Index",
                "security": [],
                "responses": {
                    "200": {
                        "description": "端点与鉴权说明"
                    },
                    "503": {
                        "description": "平台未启用"
                    }
                }
            }
        },
        "/api/v1/openapi.json": {
            "get": {
                "tags": [
                    "meta"
                ],
                "summary": "本 OpenAPI 文档",
                "operationId": "openapiJson",
                "security": [],
                "responses": {
                    "200": {
                        "description": "OpenAPI 3.0 JSON",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/me": {
            "get": {
                "tags": [
                    "meta"
                ],
                "summary": "当前 Key / 配额 / 会员状态",
                "operationId": "me",
                "security": [
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Key、scopes、quota、rate、membership_active",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "缺少或无效 Key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/today": {
            "get": {
                "tags": [
                    "free"
                ],
                "summary": "今日壁纸（图片流或 JSON）",
                "description": "行为对齐 /api/today。有 Key 时计入配额与限流。",
                "operationId": "today",
                "security": [
                    [],
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "parameters": [
                    {
                        "name": "size",
                        "in": "query",
                        "required": false,
                        "description": "hd | fhd | mhd | 1200p",
                        "schema": {
                            "type": "string",
                            "default": "hd"
                        }
                    },
                    {
                        "name": "formate",
                        "in": "query",
                        "required": false,
                        "description": "json 时返回元数据，缺省返回图片流",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "图片流或 JSON 元数据",
                        "content": {
                            "image/jpeg": {
                                "schema": {
                                    "type": "string",
                                    "format": "binary"
                                }
                            },
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "限流或日配额用尽"
                    }
                }
            }
        },
        "/api/v1/image": {
            "get": {
                "tags": [
                    "free"
                ],
                "summary": "图片代理（参数同 /api/images）",
                "operationId": "image",
                "security": [
                    [],
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "图片流"
                    }
                }
            }
        },
        "/api/v1/history": {
            "get": {
                "tags": [
                    "pro"
                ],
                "summary": "历史壁纸（中国区，按日）",
                "operationId": "history",
                "security": [
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": true,
                        "description": "YYYYMMDD，例 20230101",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data: title, articleUrl, area, copyright, date, image…",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "缺少或非法 date",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "未授权",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "非会员或会员过期 / scope 不足",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "该日无数据",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "限流或配额",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/future": {
            "get": {
                "tags": [
                    "pro"
                ],
                "summary": "未来壁纸列表",
                "description": "条数随会员档位 futureCount 变化。",
                "operationId": "future",
                "security": [
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data: 数组（title, copyright, date, image, articleUrl…）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "未授权",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "非会员或会员过期",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "限流或配额",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/v1/feeds": {
            "get": {
                "tags": [
                    "pro"
                ],
                "summary": "全球各区今日最新 feeds",
                "operationId": "feeds",
                "security": [
                    {
                        "ApiKeyBearer": []
                    },
                    {
                        "ApiKeyQuery": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "data: 数组（articleUrl, area, image, copyright, title, date）",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "未授权",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "非会员或会员过期",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "限流或配额",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyBearer": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "API Key",
                "description": "Authorization: Bearer <api_key>（格式 tb_live_… / tb_test_…，类似 OpenAI sk-）"
            },
            "ApiKeyQuery": {
                "type": "apiKey",
                "in": "query",
                "name": "app_key",
                "description": "查询参数 app_key=<api_key>"
            }
        }
    },
    "x-todaybing": {
        "console": "https://www.todaybing.com/setting/api",
        "human_docs": "https://www.todaybing.com/api/docs",
        "landing": "https://www.todaybing.com/api",
        "legacy_today": "https://www.todaybing.com/api/today",
        "scopes": {
            "basic": [
                "today",
                "image",
                "me"
            ],
            "pro": [
                "history",
                "future",
                "feeds"
            ]
        },
        "rate_limit_headers": [
            "X-RateLimit-Limit",
            "X-RateLimit-Remaining",
            "X-RateLimit-Reset"
        ]
    }
}