IronStratum

Quickstart

From zero to your first generated token in five steps: create a key, export two environment variables, and call the API with curl.

1 — Create an API key

Sign in to the console and open API Keys (/keys). Name the key and create it — the plaintext key is shown exactly once (sk-ironstratum-…). Copy it somewhere safe: the console stores only a digest, so a lost key is revoked-and-recreated, never recovered.

2 — Export your credentials

export IRONSTRATUM_API_KEY=sk-ironstratum-your-key-here
export IRONSTRATUM_BASE_URL=https://api.ironstratum.com

Every example in these docs addresses the API through $IRONSTRATUM_BASE_URL, so the same lines run against production or a local stack with one env flip.

3 — Your first completion

curl -sS -w '\n%{http_code}\n' $IRONSTRATUM_BASE_URL/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -d '{
    "model": "qwen3.8-27b",
    "messages": [{"role": "user", "content": "Say hello in one word."}],
    "max_tokens": 24
  }'

A 200 arrives with the response envelope: choices[0].message.content carries the text, and usage reports token counts plus usage.cost — your charge at our published retail, computed by us, never a surprise.

4 — Stream a completion

curl -N -sS -w '\n%{http_code}\n' $IRONSTRATUM_BASE_URL/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $IRONSTRATUM_API_KEY" \
  -d '{
    "model": "qwen3.8-27b",
    "messages": [{"role": "user", "content": "Count from one to five."}],
    "stream": true,
    "max_tokens": 48
  }'

Server-sent events stream as data: {…} lines — each a chat completion chunk — ending with a final usage chunk and then data: [DONE]. The streaming guide covers the chunk shapes.

5 — Use any OpenAI SDK

The API is OpenAI-compatible: point an existing OpenAI SDK at us by setting base_url to https://api.ironstratum.com/v1 and api_key to your sk-ironstratum-… key. No new client, no codepath fork.

Retries are safe

One line before you ship: send an Idempotency-Key header on any request a network retry might duplicate, and a retry replays the original response instead of double-billing you. The idempotency guide explains the model — nobody else offers this for inference.