Skip to content

Introduction

BVE Gateway is an OpenAI-compatible API gateway that proxies requests to the Fuelix AI platform. It runs as a Cloudflare Worker on the edge with no cold-start latency.

Base URL: https://api.bve.me/v1

OpenAPI spec: https://api.bve.me/openapi.json

  • Accepts OpenAI-format requests from any client or SDK
  • Authenticates callers with hashed API keys stored in Cloudflare D1
  • Enforces per-minute, per-day, and per-month request quotas using Cloudflare Durable Objects
  • Forwards requests to Fuelix and streams responses back without buffering
  • Records usage asynchronously via ctx.waitUntil
MethodPathAuth
GET/healthNone
GET/openapi.jsonNone
GET/v1/modelsAPI key
POST/v1/chat/completionsAPI key
POST/v1/completionsAPI key
POST/v1/embeddingsAPI key
POST/admin/api-keysAdmin key
GET/admin/api-keysAdmin key
POST/admin/api-keys/:id/revokeAdmin key
GET/admin/usageAdmin key
  • API keys are never stored in plain text. Only sha256(key + pepper) is stored.
  • Streaming SSE responses pass through without bufferingresponse.body is piped directly.
  • Rate limiting uses a Cloudflare Durable Object (ApiKeyLimiter) per key. If the DO fails, the request is allowed (fail-open) to avoid blocking legitimate traffic.
  • Usage is recorded asynchronously — it does not add latency to the request path.