{"model":"text-embedding-ada-002","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://model-bridge.okeeper.com/v1/embeddings' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "text-embedding-ada-002",
"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":"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}}