API Reference¶
Complete API documentation for StrataRouter Core and Runtime.
Reference Sections¶
Python SDK
Complete Python API reference for Router, Route, RouteResult, and RuntimeConfig.
Rust Crate
Native Rust API reference for stratarouter-core and stratarouter-runtime crates.
REST API
HTTP REST endpoints for language-agnostic integration with any application.
gRPC API
High-performance binary protocol for low-latency service-to-service communication.
CLI Reference
Command-line interface for managing routes, running diagnostics, and deployments.
Configuration
Full YAML and environment variable configuration reference with all options explained.
Quick Links¶
Python SDK
Complete Python API reference for all classes and methods.
→
Rust Crate
Native Rust crate documentation with full type signatures.
→
REST API
OpenAPI-documented HTTP endpoints for routing and management.
→
CLI Reference
All `stratarouter` CLI commands, flags, and examples.
→
Error Codes
Complete error code reference with causes and resolution steps.
→
Changelog
Version history, breaking changes, and migration guides.
→
API Overview¶
Core API¶
The Core API provides fast, accurate semantic routing decisions.
from stratarouter import Router, Route
router = Router(dimension=384)
router.add_route(Route("billing"))
router.build_index(embeddings)
result = router.route(query, embedding)
Key Classes: Router · Route · RouteResult · RouterConfig
Runtime API¶
The Runtime API provides production execution with caching, batching, and observability.
from stratarouter_runtime import CoreRuntimeBridge, RuntimeConfig
config = RuntimeConfig(cache_enabled=True, batch_enabled=True)
bridge = CoreRuntimeBridge(config)
result = await bridge.execute(decision, context)
Key Classes: CoreRuntimeBridge · RuntimeConfig · ExecutionResult · LLMClientRegistry
API Stability¶
| API | Status | Notes |
|---|---|---|
| Core Python API | Stable | Production-ready, semver guaranteed |
| Core Rust API | Stable | Production-ready, semver guaranteed |
| Runtime Python API | Beta | Minor breaking changes possible |
| REST API | Beta | Versioned via /v1/ prefix |
| gRPC API | Alpha | Schema may change in upcoming releases |
Version Information¶
Current Version: 0.3.0 (January 2026)
See Changelog for the full version history and migration guides.