Skip to main content

Documentation Index

Fetch the complete documentation index at: https://s2.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Clients can interact with S2 at its public http endpoints, primarily with JSON bodies conforming to its OpenAPI spec. Data plane endpoints also support Protobuf.

Authentication

The API requires a Bearer access token to authenticate requests. S2 SDKs take care of supplying it automatically. If you are using curl, you can provide it with -H "Authorization: Bearer ${S2_ACCESS_TOKEN}".
The first usage of an access token on a connection may experience a latency overhead for verification, typically tens of milliseconds. Subsequent requests will not incur such an overhead.

Compression

To optimize network usage, S2 supports compressed request and response bodies with the following algorithms:
  • zstd preferred
  • gzip
Standard HTTP semantics around Content-Encoding and Accept-Encoding apply.

Encryption

Encrypted streams require the s2-encryption-key header to specify the encoded key for append and read requests.