Skip to content

Interactive API Reference

The ChronosVector REST API is documented using the OpenAPI 3.1 specification, auto-generated from Rust source code via utoipa.

The interactive API explorer is available at /swagger-ui when the server is running.

Terminal window
# Start the server
cargo run -p cvx-server
# Open in browser
open http://localhost:3000/swagger-ui
MethodPathDescription
POST/v1/ingestBatch ingest temporal points
Terminal window
curl -X POST http://localhost:3000/v1/ingest \
-H "Content-Type: application/json" \
-d '{
"points": [
{"entity_id": 1, "timestamp": 1000000, "vector": [0.1, 0.2, 0.3]},
{"entity_id": 1, "timestamp": 2000000, "vector": [0.4, 0.5, 0.6]}
]
}'
Terminal window
curl -X POST http://localhost:3000/v1/query \
-H "Content-Type: application/json" \
-d '{
"vector": [0.1, 0.2, 0.3],
"k": 5,
"alpha": 0.8,
"query_timestamp": 1500000,
"filter": {"type": "range", "start": 1000000, "end": 3000000}
}'
Terminal window
curl "http://localhost:3000/v1/entities/1/velocity?timestamp=1500000"
Terminal window
curl "http://localhost:3000/v1/entities/1/prediction?target_timestamp=5000000"

The raw OpenAPI JSON spec is available at:

  • Runtime: GET /api-docs/openapi.json (from running server)
  • Static: /openapi.json (bundled with docs)
  • Generate: cargo run -p cvx-api --bin gen_openapi