SMLL Docs

AI Inference

An OpenAI-compatible endpoint at ai.smll.io, billed from your SMLL balance.

SMLL exposes an OpenAI-compatible API at https://ai.smll.io/v1. Any tool that speaks the OpenAI API works with it, including the official SDKs, most editor extensions, and coding agents.

Usage is billed from your workspace balance alongside your other resources, so there is no separate account or card to manage.

Create a key

API keys live in your workspace settings under API keys. A key must carry the ai:inference scope to use the AI endpoint. Keys are shown once, so store it somewhere safe.

Make a request

curl https://ai.smll.io/v1/chat/completions \
  -H "Authorization: Bearer $SMLL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-32b",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.smll.io/v1",
    api_key="sk-...",
)

response = client.chat.completions.create(
    model="qwen3-32b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ai.smll.io/v1",
  apiKey: process.env.SMLL_API_KEY,
});

const response = await client.chat.completions.create({
  model: "qwen3-32b",
  messages: [{ role: "user", content: "Hello" }],
});

Streaming

Streaming works as usual. Token counts arrive with the final chunk, so a streamed request is billed exactly like a non-streamed one.

stream = client.chat.completions.create(
    model="qwen3-32b",
    messages=[{"role": "user", "content": "Write a haiku"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

Endpoints

EndpointPurpose
GET /v1/modelsList available models with pricing and context limits
POST /v1/chat/completionsChat completions, streamed or not
POST /v1/completionsLegacy text completions
POST /v1/embeddingsEmbeddings

Billing

You are charged per token at the rates shown on the AI page in your workspace, and in GET /v1/models. Input and output are priced separately.

Inference is prepaid. When your balance reaches zero the endpoint returns 402 Payment Required and stops immediately, rather than running up a debt. Top up from Billing to resume.

Usage appears on the AI page within a few minutes, broken down by day and model.

Rate limits

Keys are rate limited per minute on requests, tokens, and concurrent requests. Exceeding a limit returns 429 with a Retry-After header. If you need higher limits, contact support.

Errors

Errors use the OpenAI error shape, so existing client error handling works.

StatusMeaning
401Key is missing, revoked, expired, or lacks the ai:inference scope
402Workspace balance is exhausted
404Unknown model, or a model not currently available
429Rate limit exceeded, retry after the interval given
503No capacity available for that model right now

On this page