# Generated by ShowAPI OpenAPI generator
# source: market/3100
# generated-at: 2026-06-26T06:48:47.429Z
openapi: 3.0.3
info:
  title: 三六零智脑连接器
  description: “360智脑”为360自研千亿参数大语言模型，在此前多项测评中已具备认知智能通用大模型能力。
  termsOfService: https://www.showapi.com/helpcenter/view#/4019/2
  version: 1.0.0
servers:
  - url: https://route.showapi.com
paths:
  /3100-7:
    x-pointCode: 7
    x-mode: pass_through
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: 风险控制
      description: 判断输入的文本是否敏感
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: 代表本次请求的唯一标记
                  model:
                    type: string
                    description: 使用的模型
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        flagged:
                          type: boolean
                          description: 是否敏感
                        categories:
                          type: object
                          properties:
                            abuse:
                              type: boolean
                              description: 辱骂不文明类命中情况
                            commercialviolations:
                              type: boolean
                              description: 侵犯商业利益命中情况
                            discrimination:
                              type: boolean
                              description: "\t歧视类命中情况"
                            infringement:
                              type: boolean
                              description: 侵犯个人隐私、荣誉权等命中情况
                            polity:
                              type: boolean
                              description: 政治敏感类命中情况
                            prohibition:
                              type: boolean
                              description: 违法违禁类命中情况
                            sexual:
                              type: boolean
                              description: 色情污秽类命中情况
                            violence:
                              type: boolean
                              description: 暴力、恐怖类命中情况
                          description: 各个风险类型命中情况
                        category_scores:
                          type: object
                          properties:
                            abuse:
                              type: number
                              description: 辱骂不文明类分数
                            commercialviolations:
                              type: number
                              description: 侵犯商业利益分数
                            discrimination:
                              type: number
                              description: 歧视类分数
                            infringement:
                              type: number
                              description: 侵犯个人隐私、荣誉权等分数
                            polity:
                              type: number
                              description: 政治敏感类分数
                            prohibition:
                              type: number
                              description: 违法违禁类分数
                            sexual:
                              type: number
                              description: 色情污秽类分数
                            violence:
                              type: number
                              description: 暴力、恐怖类分数
                          description: 各个风险类型分数情况
                    description: 敏感结果
      operationId: 3100_7_POST
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: array
                  items:
                    type: string
                model:
                  type: string
                user:
                  type: string
                scene:
                  type: string
                security_level:
                  type: integer
  /3100-6:
    x-pointCode: 6
    x-mode: pass_through
    x-read-timeout: 60
    x-connect-timeout: 20
    post:
      summary: 图像
      description: 根据输入的 prompt 生成图像
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: 状态
                  generationTime:
                    type: number
                    description: 耗时，以秒为单位
                  output:
                    type: array
                    items:
                      type: string
                    description: 生成的图片链接，如果生成数少于指定的数，一般是因为部分图片涉及敏感被过滤
                  meta:
                    type: object
                    properties:
                      H:
                        type: number
                        description: 图像高度
                      W:
                        type: number
                        description: 图像宽度
                      guidance_scale:
                        type: number
                        description: 提示词强度
                      n_samples:
                        type: number
                        description: 一次请求生成的图片数
                      negative_prompt:
                        type: string
                        description: 用于图像生成的负向 prompt
                      prompt:
                        type: string
                        description: 用于图像生成的 prompt
                      seed:
                        type: number
                        description: 种子
                      steps:
                        type: number
                        description: 采样步数
                    description: meta 数据
      operationId: 3100_6_POST
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                style:
                  type: string
                prompt:
                  type: string
                negative_prompt:
                  type: string
                guidance_scale:
                  type: number
                height:
                  type: integer
                width:
                  type: integer
                num_inference_steps:
                  type: integer
                samples:
                  type: integer
                seed:
                  type: integer
                enhance_prompt:
                  type: boolean
  /3100-5:
    x-pointCode: 5
    x-mode: pass_through
    x-read-timeout: 36
    x-connect-timeout: 5
    post:
      summary: 语义相似度
      description: 根据输入一条查询内容和一组内容，计算待查询内容和这组内容里每一条的相似度
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: number
                          description: 代表本次结果在 data 里的下标值
                        input_text:
                          type: string
                          description: 输入的内容
                        score:
                          type: number
                          description: 相似度的值
                    description: 返回结果，一个结构体数组，每个元素对应 input 的每一项输入
                  model:
                    type: string
                    description: 本次调用使用的模型名
                  object:
                    type: string
                    description: 暂未使用
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: number
                        description: 输入 token 消耗量
                      total_tokens:
                        type: number
                        description: 总 token 消耗量
                    description: token 消耗量
      operationId: 3100_5_POST
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                text:
                  type: array
                  items:
                    type: string
                model:
                  type: string
  /3100-4/{model}:
    x-pointCode: 4
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    parameters:
      - name: model
        in: path
        description: 指定的模型名
        required: true
        schema:
          type: string
    get:
      summary: 模型详情
      description: 获取指定的模型详情
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
      operationId: 3100_4_GET
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
  /3100-3:
    x-pointCode: 3
    x-mode: mapping
    x-read-timeout: 5
    x-connect-timeout: 5
    get:
      summary: 模型
      description: 展示可用的模型列表和信息
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: 模型名
                        object:
                          type: string
                          description: 代表本项数据的类型
                    description: 返回结果，一个结构体数组
                  object:
                    type: string
                    description: 代表本项数据的类型
      operationId: 3100_3_GET
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
  /3100-2:
    x-pointCode: 2
    x-mode: pass_through
    x-read-timeout: 5
    x-connect-timeout: 5
    post:
      summary: 向量
      description: 根据输入的内容，生成向量表示
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        embedding:
                          type: array
                          items:
                            type: number
                        index:
                          type: number
                        object:
                          type: string
                    description: 代表本次结果在 data 里的下标值
                  model:
                    type: string
                    description: 返回的向量结果，是一个浮点数数组
                  object:
                    type: string
                    description: 暂未使用
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: number
                        description: 输入 token 消耗量
                      total_tokens:
                        type: number
                        description: 总 token 消耗量
                    description: token 消耗量
      operationId: 3100_2_POST
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: array
                  items:
                    type: string
                model:
                  type: string
  /3100-1:
    x-pointCode: 1
    x-mode: pass_through
    x-read-timeout: 20
    x-connect-timeout: 5
    post:
      summary: 聊天
      description: 根据提供的会话信息，返回模型生成的对话内容
      responses:
        "200":
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: object
                          properties:
                            role:
                              type: string
                              description: 生成内容的角色
                            content:
                              type: string
                              description: 具体的生成内容
                          description: 非流式返回时才有该字段。返回结果
                        finish_reason:
                          type: string
                          description: 一般是空字符串；当命中敏感词时，该字段值是 content_filter
                        index:
                          type: number
                          description: 代表本次结果在 choices 里的下标值，目前不支持批量，因此该值是 0
                        delta:
                          type: object
                          properties:
                            content:
                              type: string
                              description: 具体的生成内容
                          description: 流式返回时才有该字段。返回结果
                    description: 返回结果，一个结构体数组，目前不支持批量，因此正常返回时数组内含一个元素
                  created:
                    type: number
                    description: 时间戳，值是服务端接收到请求时的时间戳，以秒计
                  id:
                    type: string
                    description: 服务端生成的 uuid，代表本次请求 id，业务方可以记录方便排查问题
                  model:
                    type: string
                    description: 本次调用使用的模型名
                  object:
                    type: string
                    description: 暂未使用
                  usage:
                    type: object
                    properties:
                      completion_tokens:
                        type: number
                        description: 输出 token 消耗量
                      prompt_tokens:
                        type: number
                        description: 输入 token 消耗量
                      total_tokens:
                        type: number
                        description: 总 token 消耗量
                    description: 非流式返回时才有该字段。token 消耗量
      operationId: 3100_1_POST
      parameters:
        - name: ds_id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        description: |-
          入参示例原文（含注解）：

          ```json5
          {    //测试时请删除此注释，详细参数说明在【产品说明】中
          	"model":"360GPT_S2_V9",
             "messages":[
               {
               	"role":"user",
                 "content":"你是谁？"
               }
             ]
          }
          ```
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 测试时请删除此注释，详细参数说明在【产品说明】中
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                      content:
                        type: string
components:
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: appKey
      description: 从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp
security:
  - AppKeyAuth: []
externalDocs:
  url: https://www.showapi.com/apiGateway/view/3100?tab=book
x-apiCode: "3100"
x-is-own: true
x-is-op: true
