IronStratum

Quickstart

From zero to your first generated token in five steps. Create a key, export two 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. 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. 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. The usage object reports token counts plus usage.cost. That is 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 is a chat completion chunk. The stream ends 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. Set 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. A retry then replays the original response instead of double-billing you. The idempotency guide explains the model. Nobody else offers this for inference.