> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiapi.xiaoliu.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建嵌入

> 将文本转换为高维向量表示



## OpenAPI

````yaml /api-reference/embeddings/create-embeddings.json POST /v1/embeddings
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
  description: API 文档，支持绘图、语音生成、视频生成、音乐生成等多种 AIGC 接口。
servers:
  - url: https://aiapi.xiaoliu.fun
    description: 生产服务器
security:
  - bearerAuth: []
paths:
  /v1/embeddings:
    post:
      tags:
        - 嵌入模型
      summary: 创建嵌入
      description: 将文本转换为高维向量表示
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 模型名称
                input:
                  type: string
                  description: 要转化的文本
              required:
                - model
                - input
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        embedding:
                          type: array
                          items:
                            type: number
                        index:
                          type: integer
                        object:
                          type: string
                  model:
                    type: string
                  usage:
                    type: object
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````