{"model":"Baichuan-Text-Embedding","input":"The food was delicious and the waiter..."}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/v1/embeddings' \
--header'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "Baichuan-Text-Embedding",
"input": "The food was delicious and the waiter..."
}'
Responses
🟢200Create embeddings
application/json
Body
object
string
required
data
array [object {3}]
required
object
string
optional
embedding
array[number]
optional
index
integer
optional
model
string
required
usage
object
required
prompt_tokens
integer
required
total_tokens
integer
required
Example
{"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}}