Endpoint
POST /v1/embeddings
Headers
Authorization: 必填 示例:Bearer $API_KEYContent-Type: 必填 示例:application/json
Request example
{
"input": "The food was delicious and the waiter...",
"model": "text-embedding-ada-002",
"encoding_format": "float"
}
Responses
200: 成功
OpenAPI specification
openapi: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/v1/embeddings:
post:
summary: 创建嵌入
deprecated: false
description: 官方文档见:https://platform.openai.com/docs/api-reference/embeddings/create
tags:
- 模型调用/嵌入(embedding)
parameters:
- name: Authorization
in: header
description: ''
required: true
example: Bearer $API_KEY
schema:
type: string
- name: Content-Type
in: header
description: ''
required: true
example: application/json
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
input:
anyOf:
- type: string
- type: array
items:
type: string
model:
type: string
encoding_format:
type: string
required:
- model
- encoding_format
x-apifox-orders:
- input
- model
- encoding_format
example:
input: The food was delicious and the waiter...
model: text-embedding-ada-002
encoding_format: float
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties: {}
headers: {}
x-apifox-name: 成功
security: []
x-apifox-folder: 模型调用/嵌入(embedding)
x-apifox-status: developing
x-run-in-apifox: https://app.apifox.com/web/project/5443699/apis/api-282444769-run
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
