πŸš€Start free with 10,000 API requests/month includedβ†’
Platform features

Secure your AI stack without slowing it down

Bastio combines real-time security controls, detection, and analytics with a drop-in developer experience.

Security & Control
Enforce policies, govern regions, and keep audit trails without slowing teams down.
  • Inline policy gates with org/tenant scoping
  • Least-privilege key management and rotation
  • Compliance-ready logs and traceability
Cost Optimization
Reduce LLM spend via caching, bot-mitigation, and price-aware routing.
  • Designed for 30–70% API cost savings
  • Response caching and rate controls
  • Real-time savings analytics
Multi‑Provider Fallback
Automatic failover across providers (e.g. OpenAI β†’ Anthropic) for resilient uptime.
  • Health checks and graceful degradation
  • Model & provider routing policies
  • No code changes for your app
Policy Enforcement
Inline allow/deny rules, model guards, and tier-based gates with target <10ms overhead.
Threat Detection
Injection, jailbreak, AI botting, scraping, and abuse detection with layered heuristics & LLM checks.
PII & Data Loss Prevention
Identify and redact sensitive data in prompts and responses with configurable policies.
Key Management
Per-provider key vault with rotation, scoping, and least-privilege by environment.
Gateway & Caching
Drop-in proxy for OpenAI, Anthropic, Gemini, Mistral, and more with response caching.
Geolocation Controls
Country and region rules, IP reputation, and quarantine workflows for risky traffic.
Lists & Rules
Managed allow/block lists, custom regex, and structured rule sets for granular control.
Analytics & Audit
Live logs, cost savings, usage breakdowns, and searchable audit trails for compliance.

Every feature you need to secure AI

From PII protection to cost optimization, discover the specific capabilities that solve your challenges.

OpenAI‑compatible proxy

Easy integration

Point your OpenAI client to our gateway and keep your code. Use your Bastio API key via the X-API-Key header for request analytics and policy controls.

  • Drop‑in base URL replacement
  • Per‑org policy enforcement and logging
  • Multi‑provider routing with failover
cURL
curl -X POST https://api.bastio.com/v1/chat/completions   -H "Content-Type: application/json"   -H "X-API-Key: YOUR_BASTIO_API_KEY"   -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role":"user","content":"Hello"}]
  }'
TypeScript (fetch)
const res = await fetch("https://api.bastio.com/v1/chat/completions", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": process.env.BASTIO_API_KEY!,
  },
  body: JSON.stringify({
    model: "gpt-4o-mini",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
const data = await res.json();

SDKs β€” Coming soon

First‑class TypeScript SDK with models, guards, and streaming helpers is on the way.

// bastio.ts (coming soon)
import { Bastio } from "@bastio/sdk";

const bastio = new Bastio({ apiKey: process.env.BASTIO_API_KEY });
const resp = await bastio.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello" }],
});

Want an SDK for your language? Get in touch and tell us what you need.