API Endpoints

Gateway Endpoints

GET /.well-known/ohttp-gateway

Returns the gateway’s public key configuration.

Response:

The response is a binary blob containing the serialized OHTTP key configuration per RFC 9458 Section 3.

Example:

curl https://gateway.ohttp.info/.well-known/ohttp-gateway \
  -o gateway-keys.bin

POST /ohttp

Decapsulates an OHTTP request and returns an encapsulated response.

Request:

Response:

Error Responses:

Relay Endpoints

POST /ohttp

Forwards an encapsulated OHTTP request to the gateway.

Request:

Response:

CORS:

Example with ohttp-ts:

const response = await fetch('https://relay.ohttp.info/ohttp', {
  method: 'POST',
  headers: { 'Content-Type': 'message/ohttp-req' },
  body: encapsulatedRequest
});

Error Format

All errors follow RFC 9457 Problem Details:

{
  "type": "https://ohttp.info/problems/invalid-media-type",
  "title": "Invalid Media Type",
  "status": 415,
  "detail": "Expected message/ohttp-req"
}

Rate Limits

No rate limits are currently enforced. This may change as usage grows.

Size Limits