Pular para o conteúdo principal
POST
/
api
/
v1
/
search
/
text-store
/
stores
/
{store_name}
/
texts
Python (SDK)
from openapi import SDK


with SDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:

    res = sdk.search.text_store.add_texts(store_name="<value>", x_api_key_id="<id>", x_user_id="<id>", x_exchange_jwt_external_user_id="<id>", texts=[
        "Wireless noise-cancelling headphones with 30-hour battery life",
        "USB-C charging cable with braided nylon sleeve",
        "Portable 65W GaN wall charger with two USB-C ports",
    ], vectors=[
        [
            0.14,
            -0.07,
            0.31,
        ],
        [
            0.19,
            -0.11,
            0.27,
        ],
        [
            0.09,
            -0.04,
            0.22,
        ],
    ], group="electronics_q1_2026")

    # Handle response
    print(res)
{
  "added_count": 3,
  "message": "Successfully added 3 texts (skipped 0 duplicates)",
  "skipped_count": 0
}

Autorizações

Authorization
string
header
obrigatório

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Cabeçalhos

x-api-key-id
string
obrigatório
x-user-id
string
obrigatório
x-exchange-jwt-external-user-id
string
obrigatório

Parâmetros de caminho

store_name
string
obrigatório

Corpo

application/json

Solicitação para adicionar textos a uma loja.

texts
string[]
obrigatório

Lista de strings de texto para adicionar

Minimum array length: 1
vectors
number[][]
obrigatório

Vetores de incorporação correspondentes a cada texto

Minimum array length: 1
group
string
obrigatório

Identificador de grupo para esses textos

Minimum string length: 1

Resposta

Resposta Bem-Sucedida

Resposta após adicionar textos.

added_count
integer
obrigatório

Número de novos textos inseridos

skipped_count
integer
obrigatório

Número de textos ignorados como duplicatas

message
string
obrigatório

Mensagem de status da operação