Flow 01 · SaaS managed

SaaS managed path.

Hosted RelayGate in the loop. No infrastructure to operate, receipts in the hosted console, managed upgrades.

Request path

Agent OpenAI client RelayGate managed pii-scrub + metering signed receipt 0.34 ms overhead Model provider any of 10 drivers hosted receipts console

End-to-end call

curl https://api.relaygate.ai/v1/chat/completions \
  -H "Authorization: Bearer rly_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{ "role": "user", "content": "hello" }]
  }'

Policy that makes it work

# policy.yaml
route:
  default: openai
  by_tenant:
    tenant.plan == "pro": anthropic-direct
  rate_limit:
    per_minute: 600

workers:
  - pii-scrub
  - metering
  - audit-log

Observability output

Every request produces a signed receipt; the hosted console aggregates them by tenant, route, and outcome. Prometheus endpoint at /metrics. OTLP traces stream to the hosted collector.

  • Per-tenant token accounting: input and output counted against the tenant ledger.
  • Per-route latency histograms: P50, P95, P99.
  • Receipt search: query by receipt id, tenant id, backend, or annotation.

← back to flows · try it in 5 minutes →