All tutorials

Your first 5 minutes with Ringside

5 min

By the end you'll have made a real chat completion from curl, swapped to the OpenAI SDK, tagged a call with an FC-Customer, and watched the spend show up in your dashboard.

Prerequisites
  • • A Ringside account (sign up at ringside.fightclub.pro/register)
  • • curl on your machine (already installed on macOS + Linux)
  • • Python 3.9+ if you want to run Step 3
  • • 5 minutes and a terminal
01
Step 1

Get an API key

// mint a Bearer token

Open the Ringside dashboard at ringside.fightclub.pro/app/api-keys and click Create key. Copy the token immediately. It's shown exactly once.

Export it in your shell as FC_API_KEY so every call in this tutorial picks it up automatically.

What just happened

Bearer tokens authenticate server-to-server. For browser calls you'll later mint short-lived Client Tokens off one of these. For now, keep this server-side.

~/ringside
02
Step 2

Make your first call

// curl /v1/chat/completions

Ringside speaks OpenAI's wire format. This request would be identical against OpenAI's endpoint. Only the host changes.

The response echoes the standard chat-completion envelope: an id, the assistant message, and a usage block with token counts.

What just happened

Model refs need a prefix: fc:<provider>/<model> for a direct model (e.g. fc:openai/gpt-4o-mini), slot:<alias> for a dev-defined alias, or match:<selector> for a declarative pick. A bare name like gpt-4o returns 400 invalid_model_ref.

~/ringside
03
Step 3

Swap to the OpenAI SDK

// point base_url at Ringside

No Ringside SDK needed. Any OpenAI-compatible client works by pointing base_url at https://api.fightclub.pro/v1.

The same pattern works with the Node SDK, LangChain, LlamaIndex, Vercel AI SDK, and every other library that accepts a custom base URL.

What just happened

Zero-line migration: if your code already uses the OpenAI SDK, changing base_url (and the key) is the entire diff. You can flip it back at any time.

~/ringside
04
Step 4

Tag the call, see it in the dashboard

// add FC-Customer header

Attach an FC-Customer header to any call and Ringside creates the Customer on the fly if it doesn't already exist.

Then hit /v1/customers/<id> and you'll see the month-to-date spend update. Open the dashboard to see the same thing rendered in the UI.

What just happened

FC-Customer is your unit of metering. Attach it to every call you make on behalf of a real end-user and you get per-customer spend, budgets, and billable amounts for free.

~/ringside

You built it.

You have an API key, a working curl + SDK call, and a tagged Customer whose spend you can see in the dashboard. Everything else in Ringside (budgets, webhooks, assistants, batches) is layered on top of exactly this primitive.