{"openapi":"3.1.0","info":{"title":"omniserve-native","version":"0.4.0","description":"Native C inference server: llama.cpp LLM and embeddings, stable-diffusion.cpp, and pooled multimodal/audio/3D workers behind one tier-priority scheduler."},"paths":{"/health":{"get":{"summary":"Liveness","responses":{"200":{"description":"ok"}}}},"/status":{"get":{"summary":"VRAM, model readiness, per-tier admission counters","responses":{"200":{"description":"status"}}}},"/v1/models":{"get":{"summary":"Loaded models","responses":{"200":{"description":"model list"}}}},"/v1/chat/completions":{"post":{"summary":"OpenAI-compatible text, image, and audio chat; set stream:true for text SSE","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer","default":512},"temperature":{"type":"number","default":0.8},"top_p":{"type":"number","default":0.92},"min_p":{"type":"number","default":0},"min_probability":{"type":"number","default":0},"enable_thinking":{"type":"boolean","default":false},"stop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"stream":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"chat.completion or SSE chunks"},"401":{"description":"invalid secret"},"503":{"description":"no model / admission timeout"}}}},"/v1/completions":{"post":{"summary":"OpenAI-compatible text completion","responses":{"200":{"description":"text completion"}}}},"/v1/forecasts":{"post":{"summary":"Chronos-2 time-series forecast through the dedicated forecast lane","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["values"],"properties":{"values":{"type":"array","items":{"type":"number"}},"prediction_length":{"type":"integer","default":12},"quantile_levels":{"type":"array","items":{"type":"number"}}}}}}},"responses":{"200":{"description":"forecast and quantiles"},"503":{"description":"worker missing / admission timeout"}}}},"/v1/engines/{engine_name}/completions":{"post":{"summary":"Legacy OpenAI engine completion","responses":{"200":{"description":"text completion"}}}},"/api/v1/generate":{"post":{"summary":"text-generator.io-compatible generation","responses":{"200":{"description":"generated_text results"}}}},"/api/v1/generate-large":{"post":{"summary":"Large text generation compatibility alias","responses":{"200":{"description":"generated_text results"}}}},"/api/v1/autocomplete":{"post":{"summary":"Low-latency generation compatibility alias","responses":{"200":{"description":"generated_text results"}}}},"/api/v1/summarization":{"post":{"summary":"LLM summarization","responses":{"200":{"description":"generated_text summary"}}}},"/api/v1/feature-extraction":{"post":{"summary":"ModernBERT feature vector (num_features defaults to 256)","responses":{"200":{"description":"flat embedding array"}}}},"/v1/embeddings":{"post":{"summary":"OpenAI-compatible scalar or batched embeddings","responses":{"200":{"description":"embedding list"}}}},"/v1/images/generations":{"post":{"summary":"OpenAI-compatible text to image","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string"},"negative_prompt":{"type":"string"},"size":{"type":"string","default":"1024x1024"},"width":{"type":"integer"},"height":{"type":"integer"},"steps":{"type":"integer","default":9},"guidance_scale":{"type":"number","default":0},"seed":{"type":"integer","default":0},"teleport":{"type":"boolean","default":false},"teleport_start_step":{"type":"integer","description":"Exact replay resume step; defaults to steps-1"}}}}}},"responses":{"200":{"description":"OpenAI b64_json image response"},"503":{"description":"no model / admission timeout"}}}},"/v1/images/segmentations":{"post":{"summary":"SAM2 precise object mask through the isolated scale-to-zero image-editor pool","responses":{"200":{"description":"mask_url and cutout_url"},"503":{"description":"image editor worker not configured or unavailable"}}}},"/v1/images/text-layers":{"post":{"summary":"OCR a user-drawn text box, estimate typography, and return an erase mask through the image-editor pool","responses":{"200":{"description":"editable text layer and mask_url"},"503":{"description":"image editor worker not configured or unavailable"}}}},"/v1/images/edits":{"post":{"summary":"Masked inpainting through the isolated scale-to-zero image-editor pool","responses":{"200":{"description":"edited image URL"},"503":{"description":"image editor worker not configured or unavailable"}}}},"/v1/images/foreground-generations/jobs":{"post":{"summary":"Queue text-to-image and BiRefNet matting as one foreground-art stage","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string"},"width":{"type":"integer","default":768},"height":{"type":"integer","default":1024},"seed":{"type":"integer","default":0},"output_format":{"type":"string","default":"webp"}}}}}},"responses":{"200":{"description":"job accepted"}}}},"/v1/images/foreground-generations/jobs/{job_id}":{"get":{"summary":"Poll a foreground generation and matting job","responses":{"200":{"description":"queued, generating, matting, done, or error"},"404":{"description":"unknown job"}}}},"/v1/images/captions":{"post":{"summary":"Direct Git-base image captioning via OmniServe","responses":{"200":{"description":"caption results"}}}},"/v1/images/classifications":{"post":{"summary":"CLIP zero-shot image classification via OmniServe","responses":{"200":{"description":"classification results"}}}},"/v1/classifications":{"post":{"summary":"CLIP zero-shot text classification via OmniServe","responses":{"200":{"description":"classification results"}}}},"/v1/video/generations":{"post":{"summary":"Background-tier LTX video generation via OmniServe","responses":{"200":{"description":"video result"},"507":{"description":"model does not fit current capacity"}}}},"/loras":{"get":{"summary":"Installed OmniServe LoRA adapters","responses":{"200":{"description":"LoRA catalog"}}}},"/v1/images/backgrounds":{"post":{"summary":"Background scene art (Z-Image) relayed at background tier so it never preempts interactive work","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string"},"size":{"type":"string","default":"1280x720"},"seed":{"type":"integer","default":0}}}}}},"responses":{"200":{"description":"image response"},"503":{"description":"worker missing / admission timeout"}}}},"/v1/images/backgrounds/style":{"get":{"summary":"Style-transfer an existing backdrop; same lane and background tier as the art above","parameters":[{"name":"prompt","in":"query","required":true,"schema":{"type":"string"}},{"name":"image_url","in":"query","required":true,"schema":{"type":"string"}},{"name":"strength","in":"query","schema":{"type":"number","default":0.6}}],"responses":{"200":{"description":"image response"},"503":{"description":"worker missing / admission timeout"}}}},"/v1/images/background-removals/jobs":{"post":{"summary":"Queue a cutout and poll for it; cache hits answer inline with the stored WebP URL","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string"},"output_format":{"type":"string","default":"webp"},"return_background":{"type":"boolean","default":false,"description":"also return the estimated backdrop, which the matte solve already computed"},"background":{"type":"string","description":"replacement backdrop: #rrggbb, a colour name, 'estimated', or an image URL"},"background_prompt":{"type":"string","description":"generate the backdrop with the diffusion lane; jobs only"},"background_strength":{"type":"number","default":0,"description":"above zero, style-transfer the estimated backdrop instead of generating from scratch"},"cache":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"job accepted or cache hit"}}}},"/v1/images/background-removals":{"post":{"summary":"BiRefNet transparent WebP/PNG through the C scheduler and pooled raw relay","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string"},"foreground_threshold":{"type":"number","default":0},"return_background":{"type":"boolean","default":false},"background":{"type":"string"}}}}}},"responses":{"200":{"description":"transparent PNG bytes, or JSON when more than one image was asked for"},"400":{"description":"background_prompt needs the jobs endpoint"},"503":{"description":"worker missing / admission timeout"}}}},"/v1/images/hair-layers/jobs":{"post":{"summary":"Queue a hair-layer split (SAM2 when loaded, silhouette fallback) and poll for front/back hair WebPs","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string"},"output_format":{"type":"string","default":"webp"}}}}}},"responses":{"200":{"description":"job accepted, skipped when hair coverage is too low, or cache hit"}}}},"/v1/images/hair-layers":{"post":{"summary":"Synchronous front/back hair isolation for talking-avatar animation","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string"}}}}}},"responses":{"200":{"description":"front_hair_url and back_hair_url or skipped"}}}},"/v1/depth-estimations":{"post":{"summary":"Depth Anything V2 Small 16-bit relative depth map","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string"},"output_format":{"type":"string","enum":["png16","png8","webp"],"default":"png16"},"invert":{"type":"boolean","default":true},"preview":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"depth map and preview data URLs"},"503":{"description":"worker missing / admission timeout"}}}},"/v1/animations/generations":{"post":{"summary":"Idle-GPU NVIDIA ACE animation planning and R2 publication relay","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prompt","rig_type","bones"],"properties":{"prompt":{"type":"string"},"provider":{"type":"string","default":"nvidia-ace"},"rig_type":{"type":"string","enum":["biped","quadruped","arbitrary"]},"bones":{"type":"array","items":{"type":"string"}},"publish":{"type":"object"}}}}}},"responses":{"200":{"description":"animation tracks or asynchronous R2 job"},"503":{"description":"worker missing or background admission timeout"}}}},"/v1/expression-pack":{"post":{"summary":"LivePortrait aligned blink and mouth-shape pack through a dedicated C scheduler lane","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri"}}}}}},"responses":{"200":{"description":"six aligned portrait frames"},"503":{"description":"worker missing or background admission timeout"}}}},"/v1/motion/video":{"post":{"summary":"Video to SOMA/ARDY skeleton motion (GEM-X worker relay)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"video_url":{"type":"string"},"video_base64":{"type":"string"},"backend":{"type":"string","default":"gem-x"},"static_cam":{"type":"boolean","default":true},"fps_out":{"type":"number","default":20},"include_soma":{"type":"boolean"}}}}}},"responses":{"200":{"description":"ardy-skeleton-motion-1 motion, timings and gpu_seconds"},"503":{"description":"worker missing or admission timeout"}}}},"/v1/3d/generations":{"post":{"summary":"Idle-GPU TRELLIS.2 or Pixal3D image-to-3D relay","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string","format":"uri"},"model":{"type":"string","enum":["microsoft/TRELLIS.2-4B","TencentARC/Pixal3D"]},"resolution":{"type":"integer","enum":[512,1024,1536],"default":512},"texture_size":{"type":"integer","enum":[1024,2048,4096],"default":1024},"decimation_target":{"type":"integer","default":200000},"seed":{"type":"integer"},"publish":{"type":"object"}}}}}},"responses":{"200":{"description":"GLB asset or asynchronous R2 job"},"503":{"description":"worker missing, GPU busy, or background admission timeout"}}}},"/v1/3d/assets/{job}/{file}":{"get":{"summary":"Read a locally retained generated 3D asset","responses":{"200":{"description":"Generated asset bytes"},"404":{"description":"Asset not found"}}}},"/v1/music/generations":{"post":{"summary":"YuE2 lyrics-to-song with local GPU admission and RunPod overflow","responses":{"200":{"description":"audio_url or audio_b64, with generation metadata"},"503":{"description":"music service unavailable"}}}},"/v1/audio/speech":{"post":{"summary":"OpenAI-compatible TTS relay","responses":{"200":{"description":"audio bytes"}}}},"/api/v1/generate_speech":{"post":{"summary":"text-generator.io-compatible TTS","responses":{"200":{"description":"audio result"}}}},"/api/v1/speech/catalog":{"get":{"summary":"Available TTS voices and languages","responses":{"200":{"description":"speech catalog"}}}},"/v1/audio/transcriptions":{"post":{"summary":"OpenAI-compatible STT relay","responses":{"200":{"description":"transcription"}}}},"/v1/training/status":{"get":{"summary":"Interruptible background training jobs","responses":{"200":{"description":"job status"}}}},"/v1/training/jobs":{"post":{"summary":"Queue a consent-gated ASR fine-tune","responses":{"202":{"description":"queued"}}}},"/v1/training/jobs/run":{"post":{"summary":"Run one exclusive, preemptible background segment","responses":{"200":{"description":"completed or checkpointed"},"503":{"description":"waiting for VRAM"}}}},"/api/v1/audio/transcribe":{"post":{"summary":"Native worker STT relay","responses":{"200":{"description":"transcription"}}}},"/api/v1/audio-file-extraction":{"post":{"summary":"Multipart audio transcription","responses":{"200":{"description":"transcription and segments"}}}},"/api/v1/audio-extraction":{"post":{"summary":"URL audio transcription","responses":{"200":{"description":"transcription and segments"}}}},"/api/v1/image-caption":{"post":{"summary":"Multipart or URL image captioning","responses":{"200":{"description":"caption"}}}},"/api/v1/video-question":{"post":{"summary":"Video question answering relay","responses":{"200":{"description":"answer"}}}},"/api/v1/multimodal-generate":{"post":{"summary":"Multimodal generation relay","responses":{"200":{"description":"generation"}}}},"/api/v1/voice-chat":{"post":{"summary":"STT to chat to TTS relay","responses":{"200":{"description":"voice response"}}}},"/api/v1/generate-bulk":{"post":{"summary":"Bulk generation relay","responses":{"200":{"description":"results"}}}},"/api/discord":{"post":{"summary":"Discord compatibility relay","responses":{"200":{"description":"result"}}}}},"components":{"securitySchemes":{"secretHeader":{"type":"apiKey","in":"header","name":"secret"},"bearer":{"type":"http","scheme":"bearer"}}}}