OpenAI-compatible API serving local chat, embeddings, speech-to-text, and text-to-speech. One key, private dev capacity, zero cloud inference cost.
# 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)}")
# 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
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);
GET /v1/models returns the live model list. This table reflects the gateway as verified on 2026-06-29.
| Model | Type | Use for | Details |
|---|---|---|---|
qwen3:8b | Chat | Routing, summaries, classification, lightweight dev tasks | Local Ollama model. Prefer cloud models for quality-critical reasoning, code generation, or agent-brain decisions. |
nomic-embed-text:latest | Embedding | Semantic search, RAG retrieval, local indexing | Local Ollama embedding model. |
shizhengpt | Vision-language | TCM tongue image observations | Local ShizhenGPT-7B-VL service on the mini. |
whisper | STT | Audio transcription | whisper.cpp base.en, Apple Silicon optimized |
piper | TTS | Speech synthesis | piper-tts, en_US lessac medium voice |
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
}
Generate vector embeddings for text. Returns 768-dimensional vectors.
{
"model": "nomic-embed-text:latest",
"input": "Your text here"
}
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]"
Convert text to speech. Returns a WAV audio file.
{
"input": "Text you want spoken aloud."
}
List all available models.
Health check. No authentication required.
All endpoints (except /health and /docs) require a bearer token:
Authorization: Bearer your-api-key