Skip to content

Your First Governed LLM Call

If the gateway is up and running, this takes about two minutes: get an API key, change one base URL, send a request.

  1. Create an API key.

    In the Admin Console (http://localhost:3002), open Resource Groups, select a group that has models assigned (the trial bundle seeds a default group with enabled OpenAI models), and go to its API Keys tab. Click Create, give the key a name, and choose access mode shared (a group-bound key anyone on the team can use) or user (tied to one end user).

    Resource group API Keys tab in the Admin Console

    The full key — sk_brutor_api_ followed by 43 URL-safe characters — is shown once, on creation. Copy it now; only its SHA-256 hash is stored.

    Terminal window
    export BRUTOR_API_KEY="sk_brutor_api_..."

    An API key carries everything the gateway needs: it resolves your tenant and resource group, and with it your model access, budgets and guardrails. No X-Tenant-ID header required.

  2. Send a chat completion.

    The gateway speaks the OpenAI wire format at /v1/proxy/llm and the native Anthropic Messages format at /v1/messages. The examples use gpt-5.2, which the trial bundle seeds as enabled — list what you can use with GET /v1/proxy/llm/models, and substitute any model name from that list.

    Terminal window
    curl http://localhost:8100/v1/proxy/llm/chat/completions \
    -H "Authorization: Bearer $BRUTOR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
    "model": "gpt-5.2",
    "messages": [
    {"role": "user", "content": "In one sentence: why route LLM calls through a gateway?"}
    ]
    }'

    Response (standard OpenAI shape — your app cannot tell a gateway answered):

    {
    "id": "chatcmpl-...",
    "object": "chat.completion",
    "model": "gpt-5.2",
    "choices": [
    {
    "index": 0,
    "message": {
    "role": "assistant",
    "content": "Routing LLM calls through a gateway gives you one place to enforce security, cost and audit controls across every model and team."
    },
    "finish_reason": "stop"
    }
    ],
    "usage": {
    "prompt_tokens": 21,
    "completion_tokens": 24,
    "total_tokens": 45
    }
    }

    Add "stream": true for SSE streaming. The API key also works in an X-API-Key header instead of Authorization: Bearer.

Success moment: open the Admin Console → Mission Control. Your request is already there — model, token counts, cost in dollars and latency in milliseconds, attributed to your API key’s resource group.

That one request went through the full governance pipeline on the way to the provider:

  1. Authentication & attribution — the key resolved to your tenant and resource group; access to gpt-5.2 was checked against the group’s model bindings.
  2. Guardrails ran — any input checks bound to your group (PII, prompt injection, secrets…) scanned the prompt before it left the building; output checks scanned the answer.
  3. Budgets and limits were checked — token/dollar budgets and requests-per-minute caps for your group. Near a limit, the response carries an X-Usage-Warning header; over it, you get 429 with Retry-After.
  4. Usage was metered — tokens and cost written to the usage ledger under your group and model.
  5. An audit trail was written — a proxy-log row with a correlation ID (returned to you as the X-Correlation-Id response header) and, if compliance frameworks are enabled, the matching compliance tags.

Your application saw none of this — just an OpenAI-shaped response.