- 发出请求
- 模型接口
- 完成对象
- OpenAI接口
- 文本生成(通用)POST
- 图片理解(通用)POST
- 图片生成(gpt-image-1)POST
- 图片生成(dall-e-3)POST
- 图片编辑(edits接口)POST
- 图片编辑(网页版)POST
- Web search(联网搜索)POST
- Responses APIPOST
- Function callingPOST
- response_formatPOST
- N测试POST
- 创建文本嵌入POST
- 批量创建嵌入POST
- 文本转语音(TTS)POST
- 语音转文本(STT)POST
- 音频翻译 POST
- Audio接口(输出)POST
- Audio接口(输入)POST
- 内容补全接口POST
- gpt-image-1(网页版)POST
- 图片变体生成POST
- 创建内容审核POST
- 列出模型GET
- 文生图接口
- Realtime (实时语音、对话)
- Anthropic Claude
- 谷歌Gemini
- Midjourney
- GPTs 相关
- 文生音乐
- 文生视频
- Rerank API
- Python配置方式
- 帮助中心
- 回收站
批量创建嵌入
主站接口①
主站接口①
POST
https://api2.aigcbest.top/v1
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
string
必需
input
string
必需
示例
{
"input": [
"The food was delicious",
"The waiter was friendly"
],
"model": "text-embedding-3-large",
"encoding_format": "float"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api2.aigcbest.top/v1/embeddings' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": [
"The food was delicious",
"The waiter was friendly"
],
"model": "text-embedding-3-large",
"encoding_format": "float"
}'
返回响应
🟢200Create embeddings
application/json
Body
object
string
必需
data
array [object {3}]
必需
object
string
可选
embedding
array[number]
可选
index
integer
可选
model
string
必需
usage
object
必需
prompt_tokens
integer
必需
total_tokens
integer
必需
示例
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.0023064255,
-0.009327292,
.... (1536 floats total for ada-002)
-0.0028842222
],
"index": 0
}
],
"model": "text-embedding-ada-002",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}
修改于 2025-05-08 01:12:59