Embeddings
>-
Generate vector embeddings for one or more inputs using an OpenAI-compatible embeddings model.
Authorization
bearerAuth Bearer token authentication using API keys
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/embeddings" \ -H "Content-Type: application/json" \ -d '{ "input": "The food was delicious and the waiter was friendly.", "model": "text-embedding-3-small" }'{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0
],
"index": 0
}
],
"model": "string",
"usage": {
"prompt_tokens": 0,
"total_tokens": 0
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}{
"error": {
"message": "string",
"type": "string",
"param": "string",
"code": "string"
}
}How is this guide?
Last updated on