Add LLM access to your SaaS in 15 minutes
This guide walks you through adding LLM access to your SaaS platform. By the end, your users will each have their own API key with independent rate limits and usage tracking.
What you’ll build
Section titled “What you’ll build”- A management key to control your platform’s keys
- Subscriptions created via API, charged to your card
- Per-user API keys from those subscriptions
- Your users calling our API with their own keys
- Usage monitoring per user
Prerequisites
Section titled “Prerequisites”- A CheapestInference account (create one)
- A saved payment method (add a card from the dashboard or via your first checkout)
Step 1: Get your management key (2 min)
Section titled “Step 1: Get your management key (2 min)”Log into your dashboard and navigate to Keys. Create a Management Key — this authenticates all platform operations.
mk_your_management_key_hereKeep this key secure. It can create subscriptions, keys, and manage billing.
Step 2: Subscribe and create a key (3 min)
Section titled “Step 2: Subscribe and create a key (3 min)”Use the management API to create a subscription and get a service key in one call:
curl -X POST https://api.cheapestinference.com/api/billing/subscribe \ -H "Authorization: Bearer mk_your_management_key" \ -H "Content-Type: application/json" \ -d '{ "planSlug": "pro", "createKey": true, "keyName": "user-alice" }'Response:
{ "success": true, "data": { "subscriptionId": "sub_uuid", "planSlug": "pro", "status": "active", "currentPeriodEnd": "2026-04-24T00:00:00.000Z", "key": { "id": "key_uuid", "name": "user-alice", "apiKey": "sk_live_abc123..." } }}The subscription is charged to your saved card. You can also create additional keys from the same subscription later with POST /api/keys/subscription.
Step 3: Your user makes a request (5 min)
Section titled “Step 3: Your user makes a request (5 min)”Your user hits our API with their key. It’s a standard OpenAI-compatible endpoint — just change the base URL:
Python:
from openai import OpenAI
client = OpenAI( api_key="sk-alice-a8f3e2...", base_url="https://api.cheapestinference.com/v1")
response = client.chat.completions.create( model="Qwen/Qwen3-235B-A22B-Instruct-2507", messages=[{"role": "user", "content": "Hello!"}])
print(response.choices[0].message.content)Node.js:
import OpenAI from 'openai';
const client = new OpenAI({ apiKey: 'sk-alice-a8f3e2...', baseURL: 'https://api.cheapestinference.com/v1',});
const response = await client.chat.completions.create({ model: 'Qwen/Qwen3-235B-A22B-Instruct-2507', messages: [{ role: 'user', content: 'Hello!' }],});
console.log(response.choices[0].message.content);Any OpenAI-compatible SDK works. Python, Node.js, Go, Rust, Java — just change base_url.
Step 4: Monitor usage (5 min)
Section titled “Step 4: Monitor usage (5 min)”List all your keys and their status:
curl https://api.cheapestinference.com/api/usage \ -H "Authorization: Bearer mk_your_management_key"You can also see per-key info in your dashboard.
Step 5: Scale to more users
Section titled “Step 5: Scale to more users”Repeat step 2 for each user. Each call creates a new subscription charged to your card:
# Create subscriptions + keys for your whole teamfor user in alice bob charlie dana; do curl -X POST https://api.cheapestinference.com/api/billing/subscribe \ -H "Authorization: Bearer mk_your_management_key" \ -H "Content-Type: application/json" \ -d "{\"planSlug\": \"standard\", \"createKey\": true, \"keyName\": \"user-$user\"}"doneEach subscription has independent:
- Rate limits (RPM, TPM per plan)
- Budget (its own billing cycle)
- Keys (create multiple keys per subscription)
What’s next
Section titled “What’s next”- Per-key plans — customize rate limits per key
- Management API — full API reference
- Models — see all available models
- Pricing — plan details and limits
Questions? Contact support@cheapestinference.com.