Skip to content

Latest commit

 

History

History

docs

README.md

OpenStack Documentation

OpenStack is the control plane for AI requests — a programmable LLM proxy that centralizes authentication, routing, observability, analytics, and billing. It integrates seamlessly with the tools you already use (PostHog, Langfuse, Snowflake, BigQuery, OpenTelemetry, Clerk, Stripe, etc.) instead of requiring you to rebuild them.

What OpenStack Does

  • Authentication & Rate Limiting - Authenticate each request and enforce quotas/rate limits per user
  • Multi-Provider Routing - Route to different model providers (OpenAI, Anthropic, Gemini, Groq, OpenRouter, Together, etc.)
  • Observability & Analytics - Emit structured analytics and observability events for monitoring
  • Workflow Automation - Trigger webhooks, n8n/Zapier integrations, and CRM workflows
  • Usage-Based Billing - Meter and charge for usage with built-in wallet and ledger system

Quick Start

Using the OpenStack SDK

import { Openstack } from "@openstack-ai/sdk";

const openstack = new Openstack(process.env.OPENSTACK_API_KEY);

const response = await openstack.chat.completions.create({
  model: "gpt-4",
  user: "user_123", // Required for auth/quotas
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0].message.content);

Using OpenAI SDK

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OPENSTACK_API_KEY,
  baseURL: "https://api.openstack.ai/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-4",
  user: "user_123", // Required for auth/quotas
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(response.choices[0]?.message?.content);

Using cURL

curl https://api.openstack.ai/v1/chat/completions \
  -H "Authorization: Bearer $OPENSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "user": "user_123",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Important: Always include a stable user identifier via the user field (recommended) or X-Openstack-User header. Keep your API key server-side only.

Documentation Structure

This repository contains the source for OpenStack's documentation:

  • Getting Started

    • index.mdx - Introduction and product overview
    • quickstart.mdx - Step-by-step setup guide
  • Core Concepts

    • core-concepts/proxy.mdx - How the proxy works
    • core-concepts/user-identity.mdx - User authentication and tracking
  • Features

    • features/authentication.mdx - Auth configuration
    • features/monitoring.mdx - Observability setup
    • features/webhooks/ - Webhook configuration and events
  • API Reference

    • api-reference/introduction.mdx - API overview
    • api-reference/chat/completions/ - Chat completion endpoint
    • api-reference/models/ - Models endpoint

Development

This documentation site is built with Mintlify.

# Install dependencies
pnpm install

# Run dev server
pnpm --filter docs dev

# The docs will be available at http://localhost:3002

Support

License

MIT