{
  "openapi": "3.1.0",
  "info": {
    "title": "浩瀚选题打分 API",
    "version": "1.0.0",
    "summary": "按账号定位对候选内容四维打分（时效/相关/可口播/差异化），自动剔除禁用题材并做同事件去重",
    "description": "按账号定位对候选内容四维打分（时效/相关/可口播/差异化），自动剔除禁用题材并做同事件去重 免费额度申请制开通，申请入口：https://skyaibi.com/developer.html",
    "contact": {
      "name": "浩瀚数据晟财（北京）科技有限公司",
      "url": "https://skyaibi.com/"
    }
  },
  "servers": [
    {
      "url": "https://skyaibi.com",
      "description": "生产环境"
    }
  ],
  "tags": [
    {
      "name": "topics",
      "description": "浩瀚选题打分 API"
    }
  ],
  "paths": {
    "/v1/topics/rank": {
      "post": {
        "tags": [
          "topics"
        ],
        "summary": "按账号定位对候选内容四维打分（时效/相关/可口播/差异化），自动剔除禁用题材并做同事件去重",
        "operationId": "topics_rank",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "positioning": {
                    "type": "string"
                  },
                  "tone": {
                    "type": "string"
                  },
                  "topic_preferences": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "banned_topics": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "candidates": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        },
                        "account": {
                          "type": "string"
                        },
                        "published": {
                          "type": "string"
                        },
                        "summary": {
                          "type": "string"
                        },
                        "body": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "title"
                      ]
                    }
                  },
                  "want": {
                    "type": "integer",
                    "default": 4,
                    "minimum": 1,
                    "maximum": 20
                  }
                },
                "required": [
                  "label",
                  "candidates"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 0
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "selected": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "index": {
                                "type": "integer"
                              },
                              "event": {
                                "type": "string"
                              },
                              "angle": {
                                "type": "string"
                              },
                              "score": {
                                "type": "object"
                              },
                              "has_body": {
                                "type": "boolean"
                              }
                            }
                          }
                        },
                        "rejected": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "note": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "40001 无效 API Key"
          },
          "429": {
            "description": "触发限频"
          }
        }
      },
      "get": {
        "tags": [
          "topics"
        ],
        "summary": "查询结果 / 获取元数据",
        "operationId": "topics_rank_get",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "申请后由系统下发"
      }
    }
  }
}