curl --location --request POST 'https://api.getmetal.io/v1/index/bulk' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"data": [
{
"index": "index-id",
"text": "Ozzy is the best vocalist of all time",
"id": "my-unique-id1",
"metadata": {
"band": "Black Sabbath",
"year": 1970
}
},
{
"index": "index-id",
"text": "Dave Mustain disagrees",
"id": "my-unique-id2",
"metadata": {
"band": "Megadeth",
"year": 1983
}
}
]
}'
{
"data": {
"ids": [
"my-unique-id1",
"my-unique-id2"
]
}
}
🧬 Embedding Documents
Add Documents (bulk)
This endpoint generates and stores a Document(embedding) with the inputted data in bulk.
POST
/
v1
/
index
/
bulk
curl --location --request POST 'https://api.getmetal.io/v1/index/bulk' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"data": [
{
"index": "index-id",
"text": "Ozzy is the best vocalist of all time",
"id": "my-unique-id1",
"metadata": {
"band": "Black Sabbath",
"year": 1970
}
},
{
"index": "index-id",
"text": "Dave Mustain disagrees",
"id": "my-unique-id2",
"metadata": {
"band": "Megadeth",
"year": 1983
}
}
]
}'
{
"data": {
"ids": [
"my-unique-id1",
"my-unique-id2"
]
}
}
Auth Headers
string
required
An API key for your org.
string
required
A Client ID for your org.
Body
array
required
data
Data Object
string
required
Index ID
string
Identifier for your embedding. Must be between 3 - 256 chars and consist of
numbers, letters, or
-. If not provided, a random ID will be generated.string
Text to be embedded. Must be between 3 - 10,000 chars.
string
Image URL
number[]
Custom Embeddings
object
Additional metadata for the document.
curl --location --request POST 'https://api.getmetal.io/v1/index/bulk' \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <client-id>' \
--data-raw '{
"data": [
{
"index": "index-id",
"text": "Ozzy is the best vocalist of all time",
"id": "my-unique-id1",
"metadata": {
"band": "Black Sabbath",
"year": 1970
}
},
{
"index": "index-id",
"text": "Dave Mustain disagrees",
"id": "my-unique-id2",
"metadata": {
"band": "Megadeth",
"year": 1983
}
}
]
}'
{
"data": {
"ids": [
"my-unique-id1",
"my-unique-id2"
]
}
}