curl --location --request POST 'https://api.getmetal.io/v1/apps/{appId}/tunings' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}'
{
"data": {
"id": "1",
"app": "app-123",
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}
}
Create Tuning
This endpoint creates an index for an app.
POST
/
v1
/
apps
/
{appId}
/
tunings
curl --location --request POST 'https://api.getmetal.io/v1/apps/{appId}/tunings' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}'
{
"data": {
"id": "1",
"app": "app-123",
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}
}
Auth Headers
string
required
An API key for your org.
string
required
A Client ID for your org.
Params
string
required
The App ID
Body
string
required
Embedding ID A
string
required
Embedding ID B
number
required
Closeness score. Either
-1, 0, or 1Response
Tuning Object
curl --location --request POST 'https://api.getmetal.io/v1/apps/{appId}/tunings' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}'
{
"data": {
"id": "1",
"app": "app-123",
"idA": "embedding-1",
"idB": "embedding-2",
"label": -1
}
}