Quickstart
Everything on AxForge speaks the OpenAI API shape. If you have used the OpenAI SDK, you already know this API. The only changes are the base URL, your key, and the model name. Four steps to your first streamed token.
1. Create an AxForge account
Create an account. Your API key is created with it. Every new account includes 3M free serverless tokens every 30 days.
2. Copy your API key from the console
Your key is on the API keys page of the console. It is pinned to eu-se-1 · Stockholm, and all inference for the key runs in that region.
3. Add the model to your platform
Your keys reach the models on your platform. Open the Models page,
pick the model, here Qwen3.8 27B, and press Add to my models. A model you remove from your platform stops
answering your keys until you add it again; a call to it answers 403 model_not_on_platform.
4. Send your first request
Point the SDK you already use at https://api.axforge.ai/v1. The examples use the official
OpenAI SDK, unchanged. Set AXFORGE_API_KEY to your key first (the shell tabs below
show how), so the key never sits in your code:
# pip install openai · the key is read from AXFORGE_API_KEY, never written here
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.axforge.ai/v1", api_key=os.environ["AXFORGE_API_KEY"])
r = client.chat.completions.create(
model="qwen3.8-27b",
max_tokens=60,
messages=[{"role": "user", "content": "Say hello from Stockholm in one sentence."}],
)
print(r.choices[0].message.content)
// npm i openai · save as first.mjs, run: node first.mjs
// the key is read from AXFORGE_API_KEY, never written here
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.axforge.ai/v1", apiKey: process.env.AXFORGE_API_KEY });
const r = await client.chat.completions.create({
model: "qwen3.8-27b",
max_tokens: 60,
messages: [{ role: "user", content: "Say hello from Stockholm in one sentence." }],
});
console.log(r.choices[0].message.content);
Or straight from a terminal:
# your API key, from API Keys
export AXFORGE_API_KEY="YOUR_KEY"
curl https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"qwen3.8-27b","max_tokens":60,"messages":[{"role":"user","content":"Say hello from Stockholm in one sentence."}]}'
# your API key, from API Keys
$env:AXFORGE_API_KEY = "YOUR_KEY"
$call = @{
Method = "Post"
Uri = "https://api.axforge.ai/v1/chat/completions"
Headers = @{ Authorization = "Bearer $env:AXFORGE_API_KEY" }
ContentType = "application/json"
Body = '{"model":"qwen3.8-27b","max_tokens":60,"messages":[{"role":"user","content":"Say hello from Stockholm in one sentence."}]}'
}
(Invoke-RestMethod @call).choices[0].message.content
REM your API key, from API Keys
set AXFORGE_API_KEY=YOUR_KEY
curl.exe https://api.axforge.ai/v1/chat/completions ^
-H "Authorization: Bearer %AXFORGE_API_KEY%" ^
-H "Content-Type: application/json" ^
-d "{\"model\":\"qwen3.8-27b\",\"max_tokens\":60,\"messages\":[{\"role\":\"user\",\"content\":\"Say hello from Stockholm in one sentence.\"}]}"
Every one of these was run on the system it names before it was printed here.
In PowerShell 7 (pwsh) the bash line works too; in Windows
PowerShell 5.1, the one that opens by default, it cannot. $PSVersionTable.PSVersion
tells you which you are in.
What comes back is the standard shape, with the tokens you were billed for in usage (this is a real answer, recorded 2026-09-18; the ids and the wording will differ):
{
"id": "chatcmpl-a76c352750b8914a",
"object": "chat.completion",
"model": "qwen3.8-27b",
"choices": [{ "index": 0, "finish_reason": "stop",
"message": { "role": "assistant", "content": "Hello from Stockholm!" } }],
"usage": { "prompt_tokens": 20, "completion_tokens": 5, "total_tokens": 25 }
}No answer? Run the self-test (one click in the console tells you which step failed and how to fix it), and the errors & limits page lists every status the API returns.
Stream a completion
# pip install openai · the key is read from AXFORGE_API_KEY
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.axforge.ai/v1", api_key=os.environ["AXFORGE_API_KEY"])
stream = client.chat.completions.create(
model="qwen3.8-27b",
stream=True,
messages=[{"role": "user", "content": "Hello from Stockholm"}],
)
for chunk in stream:
if chunk.choices:
print(chunk.choices[0].delta.content or "", end="", flush=True)
print()
// npm i openai · save as stream.mjs, run: node stream.mjs
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.axforge.ai/v1", apiKey: process.env.AXFORGE_API_KEY });
const stream = await client.chat.completions.create({
model: "qwen3.8-27b",
stream: true,
messages: [{ role: "user", content: "Hello from Stockholm" }],
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
console.log();
Streaming sends one chat.completion.chunk per token as server-sent events. The first two look like this, and the last one carries usage:
data: {"object":"chat.completion.chunk","choices":[{"delta":{"role":"assistant","content":""}}]}
data: {"object":"chat.completion.chunk","choices":[{"delta":{"content":"Hello"}}]}The model is Qwen3.8 27B at €0.12 / 1M input tokens and €0.62 / 1M output tokens (launch pricing), with a 262,144-token context. Streaming responses include usage.
Everything else behind the same key
| Capability | Endpoint | Model name |
|---|---|---|
| Chat, tools, vision | /v1/chat/completions | qwen3.8-27b |
| Embeddings (1024-dim) | /v1/embeddings | qwen3-embed |
| Image generation | /v1/images/generations | ernie-image-turbo |
| Image editing | /v1/images/edits | flux2-klein-4b |
| Speech to text | /v1/audio/transcriptions | whisper |
| Text to speech | /v1/audio/speech | piper |
| Music generation | /v1/audio/music | minimax-music3 |
| Documents to text (OCR) | /v1/ocr | ocr-eu |
Each has its own page in these docs with request and response shapes and practical guidance, and a product page on Serverless Models.
Zero retention, verifiable
Prompts and completions are processed in memory in the EU, never written to disk, logged, retained, or used for training. Only request metadata (token counts, timestamps, status) is kept for billing. The commitment in full: axforge.ai/privacy; the data-residency evidence is in the Trust Centre.