Quickstart
Tokens.Pay gives you one prepaid key for 16 models. The API is OpenAI-compatible: keep your SDK, change the base URL and the key.
1. Get a key
- Sign in with a Gridheap Account and add credit: any amount from $5 to $500, plus a 5% fee (minimum $0.79).
- Copy your key when it is shown, right after payment. It starts with
rk_and is shown once; store it in your password manager or secret store. - Export it for the samples on these pages:
export TOKENS_PAY_KEY="rk_…"
2. Point your SDK at the base URL
- Base URL
https://api.airuntime.dev/v1- Header
Authorization: Bearer rk_…- Model
- A model id from the model list, such as
deepseek-flash
Your code calls AI Runtime at api.airuntime.dev directly; requests never pass through Tokens.Pay.
3. Make your first call
curl
curl https://api.airuntime.dev/v1/chat/completions \
-H "Authorization: Bearer $TOKENS_PAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-flash",
"messages": [{"role": "user", "content": "Say hello in five words."}]
}'
Python
from openai import OpenAI
import os
client = OpenAI(base_url="https://api.airuntime.dev/v1", api_key=os.environ["TOKENS_PAY_KEY"])
reply = client.chat.completions.create(
model="deepseek-flash",
messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(reply.choices[0].message.content)
Node
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.airuntime.dev/v1", apiKey: process.env.TOKENS_PAY_KEY });
const reply = await client.chat.completions.create({
model: "deepseek-flash",
messages: [{ role: "user", content: "Say hello in five words." }],
});
console.log(reply.choices[0].message.content);
The answer is a standard chat completion. It also carries airuntime.cost_usd_micros: what this request cost, in millionths of a dollar. At DeepSeek V4.1 Flash’s list price that is $0.15 per 1M input tokens and $0.60 per 1M output tokens.