Create Embeddings
This method lets you generate a vector representation of a given input. It is compatible with the OpenAI endpoint for creating embeddings.
Request
URI
POST
https://{api_host}/api/v1/compatibility/openai/v1/embeddings
COPY
Request Body
EmbeddingsRequestPayload
of type(s)
application/json
Required
Show optional properties
{
"input": [
"hello",
"world"
],
"model": "model-to-use"
}
{
"model": "string"
}
input
Required
input
string
model
Required
ID of the embeddings model to use.
Responses
200
Successful Response
Returns
EmbeddingsResponsePayload
of type(s)
application/json
"EmbeddingsResponsePayload Object"
string
object
Optional
Constraints:
default: list
object
array of
object
data
Required
data
string
model
Required
model
object
usage
Required
usage
400
Invalid model endpoint specified or model endpoint not ready.
Operation doesn't return any data structure
404
Unknown model endpoint requested.
Operation doesn't return any data structure
422
Validation Error
Returns
HTTPValidationError
of type(s)
application/json
"HTTPValidationError Object"
array of
object
detail
Optional
detail
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"input":"{}","model:"string"}' https://{api_host}/api/v1/compatibility/openai/v1/embeddings
Open Ai Compatibility Operations
GET
List Models
POST
Create Embeddings
POST
Create Completion
POST
Create Chat Completion