Documentation

Build on the edge.

Everything you need to route, cache and secure traffic with Cerebium. Authenticate once, configure as code, deploy globally.

Quickstart

Create a project, attach an origin and serve your first request through the edge in under five minutes.

1. Authenticate

Export your project token and call the management API at https://api.cerebium.ru/v1.

# set your project token
export CEREBIUM_TOKEN="crb_live_..."

curl https://api.cerebium.ru/v1/projects \
  -H "Authorization: Bearer $CEREBIUM_TOKEN"

2. Attach an origin

curl -X POST https://api.cerebium.ru/v1/origins \
  -H "Authorization: Bearer $CEREBIUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "primary", "host": "origin.example.com", "shield": true }'

3. Define a route

curl -X POST https://api.cerebium.ru/v1/routes \
  -H "Authorization: Bearer $CEREBIUM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "match": "/api/*",
    "origin": "primary",
    "cache": { "ttl": 60, "swr": 600 },
    "rate_limit": { "rpm": 1200 }
  }'

API reference

MethodEndpointDescription
GET/v1/projectsList projects for the current token.
POST/v1/originsRegister an upstream origin.
POST/v1/routesCreate a routing & cache rule.
POST/v1/purgeInvalidate cache by surrogate key.
GET/v1/metricsFetch RED metrics per route.

Resources

Routing guide

Host, path and header matching with precedence rules and examples.

Caching strategies

TTL, stale-while-revalidate and surrogate-key invalidation patterns.

Security rules

Configure the WAF, rate limits and bot mitigation per route.