Skip to main content
POST
/
v1
/
data
/
embedding
curl --request POST \
  --url https://api.example.com/v1/data/embedding \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": [
    {
      "id": 1,
      "metadata": "A",
      "text": "hello"
    },
    {
      "id": 2,
      "metadata": "B",
      "text": "world"
    }
  ],
  "embedding_config": [
    {
      "embedding_target": "dense_vector",
      "embedding_type": "dense"
    },
    {
      "embedding_target": "sparse_vector",
      "embedding_type": "sparse"
    }
  ],
  "embedding_source": "text"
}
'
{
  "code": 200,
  "data": {
    "elapsed_time": 1,
    "inserted_record_batches": 1,
    "inserted_row_count": 1
  },
  "exception": null,
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Include the token in the Authorization header as 'Bearer '

Body

application/json
data
any[]
required

List of Data that will be inserted into the table.

embedding_source
string
required

Name of the column to get text for embedding. ex) text, metadata, etc.

embedding_config
object[] | null

Embedding type to use. "dense" or "sparse".

embedding_target
string | null

Name of the column to store the embedding vector. The embedding vector generated from the embedding source will be added to the column specified by the embedding target. The embedding target column must be a vector column. ex) feature, embedding, etc.

Response

Success to insert data with embedding

code
integer<int32>
required

HTTP status code.

Required range: x >= 0
success
boolean
required

Whether the request was successful.

data
object
exception
object