{
  "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": "prompt",
      "description": "浩瀚提示词生成 API"
    }
  ],
  "paths": {
    "/v1/prompt": {
      "post": {
        "tags": [
          "prompt"
        ],
        "summary": "按意图、角色与场景生成含变量占位的结构化提示词",
        "operationId": "prompt",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string"
                  },
                  "scene": {
                    "type": "string"
                  },
                  "output": {
                    "type": "string",
                    "enum": [
                      "markdown",
                      "json",
                      "text"
                    ],
                    "default": "markdown"
                  }
                },
                "required": [
                  "intent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 0
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "prompt": {
                          "type": "string"
                        },
                        "structure": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "variables": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "40001 无效 API Key"
          },
          "429": {
            "description": "触发限频"
          }
        }
      },
      "get": {
        "tags": [
          "prompt"
        ],
        "summary": "查询结果 / 获取元数据",
        "operationId": "prompt_get",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "申请后由系统下发"
      }
    }
  }
}