众扬汇 AI 开放平台 API 文档

多模态向量嵌入

接口:POST /v1/embeddings 归属:RAG(嵌入、重排序/嵌入(Embeddings) 调用地址:Base URL https://api.allyang.cn(OpenAI 兼容前缀 https://api.allyang.cn/v1)+ 上述路径 鉴权:请求头 Authorization: Bearer <你的令牌>;令牌在控制台「令牌管理」创建 说明:下方为本接口契约。路径、字段名与枚举取值与线上接口一致;叙述文字已按本平台口径重写。价格、并发与限流等数值以控制台及实际返回为准,未确认处标注「待补」。

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/embeddings:
    post:
      summary: 多模态向量嵌入
      description: "把给定输入转成向量表示,便于机器学习模型与算法直接使用;即创建输入文本的嵌入向量。"
      tags:
        - RAG(嵌入、重排序/嵌入(Embeddings)
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
            default: Bearer {{YOUR_API_KEY}}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: "所用模型的 ID。可用模型清单请在本平台「模型广场」查看,实际可用范围以账号所属分组为准。"
                normalized:
                  type: boolean
                embedding_type:
                  type: string
                input:
                  type: array
                  items:
                    type: object
                    properties:
                      text:
                        type: string
                      image:
                        type: string
                    required:
                      - text
                      - image
                  description: "待嵌入的输入文本,可编码为字符串或标记数组。一次请求要传多个输入时,传字符串数组或令牌数组的数组;每条输入不超过 8192 个标记。"
              required:
                - model
                - normalized
                - embedding_type
                - input
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        object:
                          type: string
                        embedding:
                          type: array
                          items:
                            type: number
                        index:
                          type: integer
                  model:
                    type: string
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                      total_tokens:
                        type: integer
                    required:
                      - prompt_tokens
                      - total_tokens
                required:
                  - object
                  - data
                  - model
                  - usage
          headers: {}
      security: []
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []