> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP Server (Tools)

> Launch the cognee-http-server binary or embed it as a library; an axum server exposing the FastAPI surface under /api/v1/*.

An `axum`-based server that exposes the Python FastAPI surface under
`/api/v1/*`. Built from [`cognee-http-server`](https://github.com/topoteretes/cognee-rs/blob/main/crates/http-server/), which
is both a **library** (embed it in any Rust program) and a **standalone binary**
(distinct from `cognee-cli`).

This page is the launch/embed surface. The endpoint specs, auth, pipelines,
websockets, tenancy, and observability live in
[HTTP Server Reference](/rust/http-server).

## Run the binary

```bash theme={null}
cargo build --release -p cognee-http-server --features bin --bin cognee-http-server
cognee-http-server --host 0.0.0.0 --port 8000
```

Launch flags (each has an env fallback): `--host` (`HTTP_API_HOST`, `0.0.0.0`),
`--port` (`HTTP_API_PORT`, `8000`), `--env` (`ENV`), `--cors-allowed-origins`
(`CORS_ALLOWED_ORIGINS`). The full server env surface (auth, body limits,
pipeline registry, notebooks, health probes) is in
[`crates/http-server/src/config.rs`](https://github.com/topoteretes/cognee-rs/blob/main/crates/http-server/src/config.rs) and
summarized in [Configuration: HTTP server](/rust/configuration#http-server).

## Embed the library

```rust theme={null}
let state = AppState::build(config).await?;
let router = cognee_http_server::build_router(state).await?;
// either drive it yourself…
axum::serve(listener, router).await?;
// …or use the helper that binds + serves:
cognee_http_server::run(addr, state).await?;
```

Public entry points: `build_router(AppState)` (assembles the router + middleware +
all sub-routers), `run(addr, AppState)` (binds a listener and serves), and
`AppState`. Routers delegate into `cognee-lib` facades — no business logic is
re-implemented in the server crate. See the
[architecture decisions](https://github.com/topoteretes/cognee-rs/blob/main/docs/http-server/architecture.md) for the dual-surface
design and middleware stack, and [Pluggable Backends](/rust/tools/backends) for how the
server's databases/providers are wired.
