API REFERENCE · BETA

One familiar endpoint.

Use the OpenAI SDK or plain HTTP. The base URL is your deployed Vlad origin plus /api/v1.

Authentication

After Stripe Checkout, send the Checkout Session ID to POST /api/v1/key/provision. The server rechecks that payment succeeded and that product metadata matches before signing a key. Send it as a Bearer token.

Authorization: Bearer vlad_sk_…

Treat keys as secrets. Provisioning is deterministic, so a paid session can recover its key.

POST/api/v1/chat/completions

Accepts non-streaming OpenAI-style chat requests. The proxy forwards the requested live catalog model and asks OpenRouter for cost accounting.

CURL
curl https://vlad.unicornco.fun/api/v1/chat/completions \
  -H "Authorization: Bearer $VLAD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}],"max_tokens":512}'
JS
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.VLAD_API_KEY,
  baseURL: "https://vlad.unicornco.fun/api/v1",
});

const result = await client.chat.completions.create({
  model: "openai/gpt-4.1-mini",
  messages: [{ role: "user", content: "Hello" }],
  max_tokens: 512,
});
PY
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["VLAD_API_KEY"],
    base_url="https://vlad.unicornco.fun/api/v1",
)
result = client.chat.completions.create(
    model="openai/gpt-4.1-mini",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=512,
)
GET/api/v1/models

Public, normalized mirror of OpenRouter's complete live model catalog, cached for five minutes.

GET/api/v1/key/balance

Requires Bearer authentication. Returns USD balance as integer microdollars and a six-decimal display string.

Stable errors

{"error":{"type":"invalid_request_error","code":"max_tokens_exceeded","message":"max_tokens must be 4096 or less","request_id":"req_…"}}

Error payloads never include stack traces, upstream keys, signing secrets, or Stripe metadata.

Beta limits

  • Complete current OpenRouter model catalog
  • 1 MB request body
  • max_tokens ≤ 4096
  • stream: true rejected
  • Exact CORS origin allowlist
  • No uptime SLA or model availability guarantee
  • Do not issue concurrent calls with the same key during the single-instance beta