Live on Mac Mini M4

LLM Gateway

OpenAI-compatible API serving local chat, embeddings, speech-to-text, and text-to-speech. One key, private dev capacity, zero cloud inference cost.

Models
5
Endpoints
5
Source
Live
Cost
$0

Quick Start

Python (OpenAI SDK)

# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://llm.maxpetrusenko.com/v1",
    api_key="your-api-key",
)

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

# Vision-language
response = client.chat.completions.create(
    model="shizhengpt",
    messages=[{"role": "user", "content": [
        {"type": "text", "text": "Analyze visible tongue features as JSON."},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}},
    ]}],
    max_tokens=2048,
)
print(response.choices[0].message.content)

# Embeddings
embeddings = client.embeddings.create(
    model="nomic-embed-text:latest",
    input="search query",
)
print(f"Dimensions: {len(embeddings.data[0].embedding)}")

curl

# Chat
curl https://llm.maxpetrusenko.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen3:8b","messages":[{"role":"user","content":"Hello!"}]}'

# Text-to-Speech
curl https://llm.maxpetrusenko.com/v1/audio/speech \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"Hello from the gateway."}' \
  --output speech.wav

JavaScript / TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://llm.maxpetrusenko.com/v1",
  apiKey: "your-api-key",
});

const res = await client.chat.completions.create({
  model: "qwen3:8b",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(res.choices[0].message.content);

Models

Current source of truth. Authenticated GET /v1/models returns the live model list. This table reflects the gateway as verified on 2026-06-29.
ModelTypeUse forDetails
qwen3:8bChatRouting, summaries, classification, lightweight dev tasksLocal Ollama model. Prefer cloud models for quality-critical reasoning, code generation, or agent-brain decisions.
nomic-embed-text:latestEmbeddingSemantic search, RAG retrieval, local indexingLocal Ollama embedding model.
shizhengptVision-languageTCM tongue image observationsLocal ShizhenGPT-7B-VL service on the mini.
whisperSTTAudio transcriptionwhisper.cpp base.en, Apple Silicon optimized
piperTTSSpeech synthesispiper-tts, en_US lessac medium voice

Endpoints

POST/v1/chat/completions

Send messages, get completions. Supports chat models and shizhengpt image+text messages.

{
  "model": "qwen3:8b",
  "messages": [{"role": "user", "content": "Explain quantum computing"}],
  "temperature": 0.7
}
POST/v1/embeddings

Generate vector embeddings for text. Returns 768-dimensional vectors.

{
  "model": "nomic-embed-text:latest",
  "input": "Your text here"
}
POST/v1/audio/transcriptions

Transcribe audio files to text. Send as multipart/form-data with a file field.

curl https://llm.maxpetrusenko.com/v1/audio/transcriptions \
  -H "Authorization: Bearer YOUR_KEY" \
  -F "[email protected]"
POST/v1/audio/speech

Convert text to speech. Returns a WAV audio file.

{
  "input": "Text you want spoken aloud."
}
GET/v1/models

List all available models.

GET/health

Health check. No authentication required.

Authentication

All endpoints (except /health and /docs) require a bearer token:

Authorization: Bearer your-api-key
Need a key? Contact [email protected]

Notes

Single-tenant. This runs on a 16GB Mac Mini. One generation model is loaded at a time, and first request after a model swap can be slow. Embedding model coexists with generation models. Best for dev, prototyping, local retrieval, STT/TTS, routing, and personal projects. Use cloud models for complex reasoning, agent brain, code generation, and quality-critical production work.