- OpenAI通用接口
- 全能模型接口
- kimi
- 通义千问
- 智谱
- 秘塔搜索
- 讯飞星火
- 海螺
- deepseek
- Openai
- Suno(音乐)
- Midjourney(绘画)
- Flux(绘图)
- Recraft(绘图)
- Ideogram(绘画)
- Luma(视频)
- Runway(视频)
- 可灵(视频)
创建嵌入
测试中
POST
https://api.ecovai.cn/v1/embeddings
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
string
必需
input
string
必需
示例
{
"model": "text-embedding-3-large",
"input": "The food was delicious and the waiter..."
}
示例代码
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://api.ecovai.cn/v1/embeddings' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "text-embedding-3-large",
"input": "The food was delicious and the waiter..."
}'
返回响应
🟢200成功
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": "string",
"data": [
{
"object": "string",
"embedding": [
0
],
"index": 0
}
],
"model": "string",
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}
修改于 2024-09-27 07:40:38