<!-- source: https://secondlayer.tools/docs/api-reference#get-open-api-spec -->

## This document

`GET /v1/openapi.json`

The OpenAPI 3.1 description of this instance, as JSON. It describes the instance's own mode: a self-hosted instance includes the `/api` write plane, the hosted archive leaves it out.

### Responses

- `200` The OpenAPI document
- `401` This bind requires the instance token, and it was missing or wrong

### Example

```bash
curl https://api.secondlayer.tools/v1/openapi.json \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Secondlayer Public API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:3800",
      "description": "Local instance"
    }
  ],
  "tags": [
    {
      "name": "streams",
      "description": "Raw event firehose, chain tip, and reorg history"
    }
  ],
  "paths": {},
  "components": {}
}
```
