Skip to content

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.

  • 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
  • A CheapestInference account (create one)
  • A saved payment method (add a card from the dashboard or via your first checkout)

Log into your dashboard and navigate to Keys. Create a Management Key — this authenticates all platform operations.

mk_your_management_key_here

Keep 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:

Terminal window
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.

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.

List all your keys and their status:

Terminal window
curl https://api.cheapestinference.com/api/usage \
-H "Authorization: Bearer mk_your_management_key"

You can also see per-key info in your dashboard.

Repeat step 2 for each user. Each call creates a new subscription charged to your card:

Terminal window
# Create subscriptions + keys for your whole team
for 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\"}"
done

Each subscription has independent:

  • Rate limits (RPM, TPM per plan)
  • Budget (its own billing cycle)
  • Keys (create multiple keys per subscription)

Questions? Contact support@cheapestinference.com.