cURL
curl --location 'https://api.inworld.ai/ml/v1alpha/embedding:embed' \
--header "Authorization: Basic $INWORLD_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"inputs": [
{
"text": "Hello Inworld!"
}
],
"model": {
"model": "sentence-transformers/paraphrase-multilingual-mpnet-base-v2",
"serviceProvider": "SERVICE_PROVIDER_INWORLD"
}
}'{
"embeddings": [
{
"values": [
-0.0034770966,
0.014472961,
-0.0031032562,
0.043792725,
0.033081055,
0.003566742,
-0.048217773,
0.03970337,
0.023040771,
0.006038666
]
}
]
}Embeddings
Create embeddings
Generates embeddings for the given text input.
POST
/
ml
/
v1alpha
/
embedding:embed
cURL
curl --location 'https://api.inworld.ai/ml/v1alpha/embedding:embed' \
--header "Authorization: Basic $INWORLD_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"inputs": [
{
"text": "Hello Inworld!"
}
],
"model": {
"model": "sentence-transformers/paraphrase-multilingual-mpnet-base-v2",
"serviceProvider": "SERVICE_PROVIDER_INWORLD"
}
}'{
"embeddings": [
{
"values": [
-0.0034770966,
0.014472961,
-0.0031032562,
0.043792725,
0.033081055,
0.003566742,
-0.048217773,
0.03970337,
0.023040771,
0.006038666
]
}
]
}Authorizations
Should follow the format Basic {credentials}. The {credentials} consists of the Base64-encoded string of the API key and the secret in the format key:secret. You can create a key in one command with the Inworld CLI: inworld workspace add-key.
Body
application/json
Request message for Embed method. Contains the input texts and model configuration for the embeddings request
Response
A successful response message for Embed method
List of embeddings generated from the input messages
Show child attributes
Show child attributes
Was this page helpful?
⌘I