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


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

    res = sdk.search.text_store.add_texts(store_name="<value>", 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
}

Documentation Index

Fetch the complete documentation index at: https://docs.mka1.com/llms.txt

Use this file to discover all available pages before exploring further.

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-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

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 a serem adicionadas

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 pulados como duplicatas

message
string
obrigatório

Mensagem de status da operação