Skip to content
mini-lab

A whole AI lab, small enough to read.

mini-lab trains a tiny language model, serves it behind an OpenAI-compatible API, and bills every token from prepaid credits. Every piece is open source and short enough to read in an afternoon.

New accounts get $1.00 of credits. No card needed.

mini-1 in the chat app

What is 347 + 58?

used calculator: 347 + 58 = 405

The answer is 405.

Tell me a story about a dog.

Once upon a time, there was a little dog named Max. Max loved to run in the park with his red ball. One day, the ball rolled into a pond, and a kind duck pushed it back to him. Max wagged his tail and they played all afternoon.

Tokens in
41
Tokens out
62
Billed
$0.000114

How the lab fits together

Four stages, one Python package. Each stage feeds the next.

  1. 1 Train

    A small GPT-style transformer learns short children's stories and arithmetic, on a laptop.

    minilab/train

  2. 2 Serve

    An inference server with a KV cache and continuous batching streams tokens as they are sampled.

    minilab/inference

  3. 3 Meter

    An OpenAI-compatible gateway checks API keys, enforces rate limits and bills every token.

    minilab/api

  4. 4 Use

    This platform: API keys, prepaid credits, usage, logs, a playground and a chat app.

    minilab/platform

Your first request

It speaks the OpenAI API, so the official SDKs work as they are: point them at mini-lab's base URL and use a mini-lab key.

Read the quickstart
curl https://mini-lab.sitesolide.fr/v1/chat/completions \
  -H "Authorization: Bearer $MINILAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "mini-1", "messages": [{"role": "user", "content": "What is 347 + 58?"}]}'

Pricing

Prepaid credits, charged per token. You only pay for what the model reads and writes.

See all models
ModelContextInput, per 1M tokensOutput, per 1M tokens
mini-1 256 tokens $0.50 $1.50

Get a key and make your first call.

$1.00 of free credits is plenty for thousands of tiny stories.

Create an account