# Nostr Relay WebSocket Interface

**Canonical:** https://apis.io/apis/nostr/relay-interface/  
**Provider:** Nostr — https://apis.io/providers/nostr/  
**Base URL:** wss://relay.example  
**Documentation:** https://github.com/nostr-protocol/nips/blob/master/11.md

Nostr Relay WebSocket Interface is one of 4 APIs that [Nostr](https://apis.io/providers/nostr/) publishes on the [APIs.io](https://apis.io/) network, described by an AsyncAPI event-driven specification. Tagged areas include Relay, WebSocket, strfry, khatru, and nostream. The published artifact set on APIs.io includes an AsyncAPI specification.

A Nostr relay is a WebSocket server that accepts signed events, stores them subject to its own policy, and responds to subscription filters from clients. The relay surface is intentionally minimal: no accounts, no shared state, no canonical ordering. Operators choose retention, content policy, paid-access, and authentication (NIP-42) independently. Reference implementations include strfry (C++), nostream (TypeScript), and khatru (Go).

## Machine-readable artifacts (6)

- **Specification** — https://github.com/nostr-protocol/nips/blob/master/01.md
- **RelayInfo** — https://github.com/nostr-protocol/nips/blob/master/11.md
- **AsyncAPI** — https://raw.githubusercontent.com/api-evangelist/nostr/refs/heads/main/asyncapi/nostr-asyncapi.yml
- **ReferenceImplementation** — https://github.com/hoytech/strfry
- **ReferenceImplementation** — https://github.com/Cameri/nostream
- **ReferenceImplementation** — https://github.com/fiatjaf/khatru

## Other Nostr APIs (3)

- [Nostr Protocol (NIP-01)](https://apis.io/apis/nostr/nostr-protocol/)
- [Nostr Implementation Possibilities (NIPs)](https://apis.io/apis/nostr/nostr-nips/)
- [nostr-tools JavaScript Library](https://apis.io/apis/nostr/nostr-tools/)

## Tags

Relay, WebSocket, strfry, khatru, nostream

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/nostr/relay-interface/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/nostr/.
