Infrastructure · :4000

Platform capabilities for any service

Any HTTP service gets LLM, EventBus, Cache, and Storage through a single endpoint. Providers swap in config — consumers stay untouched.

REST API
Workflow
Marketplace
your-service
Gateway:4000
llmOpenAI
eventBusRedis
storageS3

потребители не меняются · провайдер меняется в конфиге

Platform API

One endpoint. All adapters.

POST /platform/v1/:adapter/:method — nine adapters with a clear method allowlist. Streaming automatic when the method returns AsyncIterable.

Documentation
bash
# Cart service pushes an event — no Redis SDK, no Kafka client
POST /platform/v1/eventBus/publish
Authorization: Bearer <token>
Content-Type: application/json

{
  "args": ["order.created", {
    "orderId": "ord-9f2a",
    "total":   149.90
  }]
}

# 200 OK
{ "ok": true, "result": null, "durationMs": 3 }
bash
# OpenAI-compatible — "model" is a tier, not a model name
POST /llm/v1/chat/completions
Authorization: Bearer <token>
Content-Type: application/json

{
  "model":    "medium",
  "messages": [{ "role": "user", "content": "Classify this ticket" }],
  "stream":   true
}

# Swap Anthropic → OpenAI in kb.config.json — this request stays the same
AI Gateway

OpenAI-compatible. No vendor lock-in.

The model field is a tier (small · medium · large), not a model name. The LLM Router resolves the tier to a concrete adapter. Swap the provider in config — all calls pick it up automatically.

Documentation
Telemetry

Events from any service. No schema.

POST /telemetry/v1/ingest — up to 500 events per batch, dot-notation types, free-form payload. Writes to IAnalytics — SQLite, DuckDB, or file.

Documentation
bash
# Any service sends events — free-form payload, dot-notation type
POST /telemetry/v1/ingest
Authorization: Bearer <token>
Content-Type: application/json

{
  "events": [{
    "source":  "cart-service",
    "type":    "order.completed",
    "payload": { "orderId": "ord-9f2a", "total": 149.90 },
    "tags":    { "env": "prod", "region": "eu" }
  }]
}

# Up to 500 events per batch. Goes to IAnalytics — SQLite, DuckDB, or file.
Try it now

One port. All capabilities.

Providers swap in config — services stay untouched. Gateway starts with the platform.

Gateway — KB Labs