omniserve-native
Auth
Optional. When the server is started with OMNISERVE_NATIVE_SECRET, send it as a secret header or Authorization: Bearer. Priority via X-Omniserve-Tier: paid | sub | free | background.
Chat
/v1/chat/completionscurl localhost:8791/v1/chat/completions -d '{
"messages": [{"role": "user", "content": "hello"}],
"max_tokens": 128, "stream": true
}'Streaming uses SSE chunks in the OpenAI chat.completion.chunk shape, ending with data: [DONE]. Non-streaming returns chat.completion with usage, cached_prompt_tokens, and timings.elapsed_ms.
/v1/completions/api/v1/generate — text-generator.io compatibility/api/v1/generate-large — large-generation alias/api/v1/autocomplete — low-latency alias/api/v1/summarizationEmbeddings
/api/v1/feature-extraction — flat ModernBERT vector/v1/embeddings — OpenAI response shapeImages
/v1/images/generationscurl localhost:8791/v1/images/generations -d '{
"prompt": "a cabin in a snowstorm", "negative_prompt": "blurry", "size": "768x768", "steps": 9, "seed": 42,
"teleport": true, "teleport_start_step": 8
}'/v1/images/segmentations — SAM2 click-based object mask via the scale-to-zero image-editor pool/v1/images/text-layers — OCR a text box, estimate its typography, and return an erase mask/v1/images/edits — regenerate only a supplied mask via the same isolated pool/v1/images/backgrounds — scene art via Z-Image; always background tiercurl localhost:8791/v1/images/backgrounds -o scene.webp -d '{
"prompt": "flat vector reef background, no text", "size": "1280x720"
}'/v1/images/backgrounds/style — restyle an existing backdrop; background tier/v1/images/background-removals — BiRefNet transparent WebP/PNG via pooled C relaycurl localhost:8791/v1/images/background-removals -o cutout.png -d '{
"image_url": "https://example.com/chair.webp"
}'Ask for the backdrop the matte solve already computed, or swap it for a new one. More than one image means a JSON answer instead of raw bytes.
curl localhost:8791/v1/images/background-removals -d '{
"image_url": "https://example.com/chair.webp",
"return_background": true, "background": "#ffffff"
}'/v1/images/background-removals/jobs — queue + poll; identical inputs are answered from the WebP cacheA generated backdrop only runs here: diffusion holds a permit for its whole duration, so the synchronous route refuses background_prompt rather than parking on an interactive slot.
curl localhost:8791/v1/images/background-removals/jobs -d '{
"image_url": "https://example.com/chair.webp",
"background_prompt": "a sunlit loft, no subject"
}'/v1/images/background-removals/jobs/{id} — job status/v1/images/hair-layers — SAM2/silhouette front and back hair layerscurl localhost:8791/v1/images/hair-layers -d '{
"image_url": "https://example.com/waifu.webp"
}'/v1/images/hair-layers/jobs — queue + poll hair split/v1/images/hair-layers/jobs/{id} — hair job status/v1/depth-estimations — Depth Anything V2 Small, 16-bit PNG plus preview, 1 creditcurl localhost:8791/v1/depth-estimations -d '{
"image_url": "https://example.com/room.webp", "output_format": "png16"
}'/v1/images/foreground-generations/jobs — text-to-image + BiRefNet in one queued stagecurl localhost:8791/v1/images/foreground-generations/jobs -d '{
"prompt": "full-body deckhand on a plain grey backdrop",
"width": 768, "height": 1024, "seed": 42
}'/v1/images/foreground-generations/jobs/{id} — composite job status and cutout3D
/v1/3d/generations — TRELLIS.2/Pixal3D worker relay; always background tier/v1/3d/assets/{job}/model.glb — locally retained resultcurl localhost:8791/v1/3d/generations -d '{
"image_url": "https://example.com/object.webp",
"model": "microsoft/TRELLIS.2-4B", "resolution": 512,
"texture_size": 1024, "publish": {"r2": true, "searchable": true}
}'Motion
/v1/motion/video — GEM-X video-to-motion worker relay; returns a 27-joint ARDY-format clip, optional native SOMA rotations, stage timings and gpu_secondscurl localhost:8791/v1/motion/video -d '{
"video_url": "https://example.com/backflip.mp4", "static_cam": true
}'Animation
/v1/animations/generations — NVIDIA ACE/Animation Graph worker relay; always background tier/v1/expression-pack — LivePortrait six-frame blink and mouth pack through its own background lanecurl localhost:8791/v1/animations/generations -d '{
"prompt": "cautious walk and wave", "rig_type": "biped",
"bones": ["Hips", "Spine", "Chest"],
"publish": {"r2": true, "searchable": true}
}'Audio
/v1/audio/speech — TTS bytes/v1/audio/transcriptions — multipart STT/v1/training/jobs — queue consent-gated ASR training/v1/training/jobs/run — exclusive background segment; checkpoints on serving demand/api/v1/generate_speech — text-generator.io TTS/api/v1/speech/catalog — voices and languages/api/v1/audio/transcribe — worker STT/api/v1/audio-file-extraction — multipart STT/api/v1/audio-extraction — URL STTMultimodal
/api/v1/image-caption/api/v1/video-question/api/v1/multimodal-generate/api/v1/voice-chatOps
/health/status — VRAM, permits, queues, and upstream connection reuse/v1/modelsRun
OMNISERVE_NATIVE_LLM_GGUF=/models/gemma-roleplay-v2-q8_0.gguf \ OMNISERVE_NATIVE_EMBEDDING_GGUF=/models/modernbert-base-q8_0.gguf \ OMNISERVE_NATIVE_SD_MODEL=/models/sdxl-turbo.safetensors \ ./omniserve-native --port 8791
OMNISERVE_NATIVE_LLM_UPSTREAM=http://127.0.0.1:8300 \ OMNISERVE_NATIVE_IMAGE_UPSTREAM=http://127.0.0.1:8100 \ OMNISERVE_NATIVE_TTS_UPSTREAM=http://127.0.0.1:9083 \ OMNISERVE_NATIVE_STT_UPSTREAM=http://127.0.0.1:9083 \ OMNISERVE_NATIVE_SLOTS=4 ./omniserve-native --port 8791
Front with omniserve (Python) by setting OMNISERVE_PROXY_PROXY_LLM=http://127.0.0.1:8791 to keep its catalog, eviction, and fleet features while this server owns the hot path.