Skip to main content
POST
/
api
/
v1
/
search
/
graphrag
/
stores
/
{store_name}
/
documents
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.search.graphrag.ingestGraphRAGDocuments({
    storeName: "<value>",
    xApiKeyId: "<id>",
    xUserId: "<id>",
    xExchangeJwtExternalUserId: "<id>",
    ingestGraphRAGDocumentsRequest: {
      documents: [
        {
          documentId: "doc_001",
          text: "Atlas Infrastructure Group owns Rivera Logistics.",
          metadata: {
            "source": "benchmark",
          },
        },
      ],
    },
  });

  console.log(result);
}

run();
{
  "chunk_count": 1,
  "document_count": 1,
  "edge_count": 1,
  "entity_count": 2,
  "processing_time_ms": 42
}

Authorizations

Authorization
string
header
required

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>.

Headers

x-api-key-id
string
required
x-user-id
string
required
x-exchange-jwt-external-user-id
string
required

Path Parameters

store_name
string
required

Body

application/json
documents
GraphRAGDocument · object[]
required
Minimum array length: 1

Response

Successful Response

document_count
integer
required
chunk_count
integer
required
entity_count
integer
required
edge_count
integer
required
processing_time_ms
integer
required