Lighthouse implements the standard [Eth2 Beacon Node API
specification][OpenAPI]. Please follow that link for a full description of each API endpoint.
> **Warning:** the standard API specification is still in flux and the Lighthouse implementation is partially incomplete. You can track the status of each endpoint at [#1434](https://github.com/sigp/lighthouse/issues/1434).
## Starting the server
A Lighthouse beacon node can be configured to expose a HTTP server by supplying the `--http` flag. The default listen address is `127.0.0.1:5052`.
The following CLI flags control the HTTP server:
-`--http`: enable the HTTP server (required even if the following flags are
provided).
-`--http-port`: specify the listen port of the server.
-`--http-address`: specify the listen address of the server.
-`--http-allow-origin`: specify the value of the `Access-Control-Allow-Origin`
header. The default is to not supply a header.
The schema of the API aligns with the standard Eth2 Beacon Node API as defined
at [github.com/ethereum/eth2.0-APIs](https://github.com/ethereum/eth2.0-APIs).
An interactive specification is available [here][OpenAPI].
### CLI Example
Start the beacon node with the HTTP server listening on [http://localhost:5052](http://localhost:5052):
```bash
lighthouse bn --http
```
## HTTP Request/Response Examples
This section contains some simple examples of using the HTTP API via `curl`.
All endpoints are documented in the [Eth2 Beacon Node API
specification][OpenAPI].
### View the head of the beacon chain
Returns the block header at the head of the canonical chain.
```bash
curl -X GET "http://localhost:5052/eth/v1/beacon/headers/head" -H "accept: