curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will be embedded", "id": "my-unique-id", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" }}'
Copy
Ask AI
{ "data": { "id": "my-unique-id", "text": "text that will be embedded", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" } }}
🧬 Embedding Documents
Add Document
This endpoint generates and stores a Document(embedding) with the inputted data.
POST
/
v1
/
index
Copy
Ask AI
curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will be embedded", "id": "my-unique-id", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" }}'
Copy
Ask AI
{ "data": { "id": "my-unique-id", "text": "text that will be embedded", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" } }}
curl --location --request POST 'https://api.getmetal.io/v1/index' \--header 'Content-Type: application/json' \--header 'x-metal-api-key: <api-key>' \--header 'x-metal-client-id: <client-id>' \--data-raw '{ "index": "index-id", "text": "text that will be embedded", "id": "my-unique-id", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" }}'
Copy
Ask AI
{ "data": { "id": "my-unique-id", "text": "text that will be embedded", "createdAt": "2023-03-17T17:21:13.163Z", "metadata": { "fieldA": "my custom value", "fieldB": "my other custom value" } }}