{"openapi":"3.1.0","info":{"title":"H3 Studio API","description":"MiniMax-H3 text/image-to-video and Qwen-Image-2.1 text-to-image / image editing on a local GPU. Authenticate with `Authorization: Bearer <token>` (or `x-token` header / `?token=`).","version":"1.1"},"paths":{"/api/config":{"get":{"summary":"Api Config","operationId":"api_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/jobs":{"get":{"summary":"Api Jobs","operationId":"api_jobs_api_jobs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create a video job (multipart form, used by the web UI)","operationId":"api_create_api_jobs_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_create_api_jobs_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/generate":{"post":{"summary":"Create a video job (JSON)","operationId":"api_generate_api_v1_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/image":{"post":{"summary":"Create an image job: Qwen-Image-2.1 text-to-image or image editing (JSON)","operationId":"api_image_api_v1_image_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images":{"post":{"summary":"Create an image job (multipart form, used by the web UI)","operationId":"api_images_create_api_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_images_create_api_images_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/image":{"get":{"summary":"Download the finished png","operationId":"api_image_file_api_jobs__job_id__image_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tts":{"post":{"summary":"Voice clone TTS (Qwen3-TTS): say `text` in the voice of `ref_audio`, returns a wav path","operationId":"api_tts_api_v1_tts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tts":{"post":{"summary":"Voice clone TTS (multipart: text, language, ref_text, ref_audio file)","operationId":"api_tts_form_api_tts_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_api_tts_form_api_tts_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}":{"get":{"summary":"Get one job","operationId":"api_get_api_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"wait","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Wait"}},{"name":"timeout","in":"query","required":false,"schema":{"type":"integer","default":600,"title":"Timeout"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Api Delete","operationId":"api_delete_api_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jobs/{job_id}/video":{"get":{"summary":"Download the finished mp4","operationId":"api_video_api_jobs__job_id__video_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Machine health: GPU/CPU/RAM/disk, services, current job, Tailscale, git, watchdog","operationId":"api_health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/status":{"get":{"summary":"Api Status","operationId":"api_status_api_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Body_api_create_api_jobs_post":{"properties":{"prompt":{"type":"string","title":"Prompt"},"profile":{"type":"string","title":"Profile","default":"fasth3"},"aspect":{"type":"string","title":"Aspect","default":"16:9"},"res":{"type":"string","title":"Res","default":"480p"},"seconds":{"type":"number","title":"Seconds","default":5},"seed":{"type":"integer","title":"Seed","default":-1},"steps":{"type":"integer","title":"Steps","default":0},"image_mode":{"type":"string","title":"Image Mode","default":"keyframe"},"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images","default":[]},"audios":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Audios","default":[]},"audio_mode":{"type":"string","title":"Audio Mode","default":"voice"},"tts_text":{"type":"string","title":"Tts Text","default":""},"tts_ref_text":{"type":"string","title":"Tts Ref Text","default":""},"tts_language":{"type":"string","title":"Tts Language","default":"Auto"}},"type":"object","required":["prompt"],"title":"Body_api_create_api_jobs_post"},"Body_api_images_create_api_images_post":{"properties":{"prompt":{"type":"string","title":"Prompt"},"negative_prompt":{"type":"string","title":"Negative Prompt","default":""},"profile":{"type":"string","title":"Profile","default":"qwen21"},"aspect":{"type":"string","title":"Aspect","default":"1:1"},"res":{"type":"string","title":"Res","default":"1K"},"size":{"type":"string","title":"Size","default":""},"size_from_ref":{"type":"boolean","title":"Size From Ref","default":false},"seed":{"type":"integer","title":"Seed","default":-1},"steps":{"type":"integer","title":"Steps","default":0},"cfg":{"type":"number","title":"Cfg","default":0},"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images","default":[]}},"type":"object","required":["prompt"],"title":"Body_api_images_create_api_images_post"},"Body_api_tts_form_api_tts_post":{"properties":{"text":{"type":"string","title":"Text"},"language":{"type":"string","title":"Language","default":"Auto"},"ref_text":{"type":"string","title":"Ref Text","default":""},"ref_audio":{"type":"string","contentMediaType":"application/octet-stream","title":"Ref Audio"}},"type":"object","required":["text","ref_audio"],"title":"Body_api_tts_form_api_tts_post"},"GenerateRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"Scene, camera and audio description (Chinese or English)"},"profile":{"type":"string","title":"Profile","description":"fasth3 (default, 8-step distilled) | base50_sol (original 50-step + NVIDIA Sol-Attn/FBC, best quality) | base50 (original, slow) | fasth3_fast | fasth3_4step_int8 | turbo_int8","default":"fasth3"},"aspect":{"type":"string","title":"Aspect","description":"16:9 | 9:16 | 1:1","default":"16:9"},"res":{"type":"string","title":"Res","description":"352p | 480p | 768p","default":"480p"},"seconds":{"type":"number","title":"Seconds","description":"clip length 1..15 s, snapped to the 17k+5 frame grid at 24 fps","default":5},"seed":{"type":"integer","title":"Seed","description":"-1 = random","default":-1},"steps":{"type":"integer","title":"Steps","description":"0 = profile default","default":0},"images":{"items":{"type":"string"},"type":"array","title":"Images","description":"0..6 images as http(s) URLs or data:image/...;base64 strings. keyframe mode: 1 = first frame, 2 = first + last, more = evenly anchored keyframes. reference mode: all are references"},"image_mode":{"type":"string","title":"Image Mode","description":"keyframe = images are pinned to frames (first frame IS image 1) | reference = images steer subject/style only, the video does not start on them. Refer to them as <Picture 1>, <Picture 2>... in the prompt (auto-prefixed if absent)","default":"keyframe"},"audios":{"items":{"type":"string"},"type":"array","title":"Audios","description":"0..3 audio clips (2-15 s each) as http(s) URLs or data:audio/...;base64. voice mode: timbre references (<Audio 1>...). track mode: clip 1 is the soundtrack from frame 0"},"audio_mode":{"type":"string","title":"Audio Mode","description":"voice = clone the timbre, H3 speaks the dialogue in the prompt with it | track = use the clip as-is as the soundtrack and lip-sync to it","default":"voice"},"tts_text":{"type":"string","title":"Tts Text","description":"if set: Qwen3-TTS clones the voice of audios[0], speaks this text, and the result is used as the track","default":""},"tts_ref_text":{"type":"string","title":"Tts Ref Text","description":"transcript of audios[0] (optional, improves the clone)","default":""},"tts_language":{"type":"string","title":"Tts Language","description":"Auto | Chinese | English | Japanese | Korean | German | French | Russian | Portuguese | Spanish | Italian","default":"Auto"},"wait":{"type":"boolean","title":"Wait","description":"block until the job finishes (or `timeout`) and return the final job","default":false},"timeout":{"type":"integer","title":"Timeout","description":"max seconds to wait when wait=true (<= 1800)","default":600},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url","description":"POST the finished job JSON here"}},"type":"object","required":["prompt"],"title":"GenerateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageRequest":{"properties":{"prompt":{"type":"string","title":"Prompt","description":"What to draw, or the edit instruction when images are given (Chinese or English)"},"negative_prompt":{"type":"string","title":"Negative Prompt","description":"only used when cfg > 1","default":""},"profile":{"type":"string","title":"Profile","description":"qwen21 (Qwen-Image-2.1 INT8, default; text-to-image + editing) | qwen21_bf16 (full precision) | krea2_turbo (Krea 2 Turbo NVFP4, 8 steps; text-to-image, images = style references) | krea2_turbo_int8","default":"qwen21"},"aspect":{"type":"string","title":"Aspect","description":"1:1 | 16:9 | 9:16 | 4:3 | 3:4","default":"1:1"},"res":{"type":"string","title":"Res","description":"1K (~1 MP) | 2K (~4 MP, native)","default":"1K"},"size":{"type":"string","title":"Size","description":"explicit WxH (multiples of 32, 256..4096); overrides aspect/res","default":""},"size_from_ref":{"type":"boolean","title":"Size From Ref","description":"editing only: output size follows the first image (resized to about res^2 px)","default":false},"seed":{"type":"integer","title":"Seed","description":"-1 = random","default":-1},"steps":{"type":"integer","title":"Steps","description":"0 = profile default (25)","default":0},"cfg":{"type":"number","title":"Cfg","description":"0 = profile default (1.0, guidance is distilled in)","default":0},"images":{"items":{"type":"string"},"type":"array","title":"Images","description":"images as http(s) URLs or data:image/...;base64. 0 = text-to-image. qwen21: 1..10 = editing, refer to them as Picture 1, Picture 2... in the prompt. krea2: 1..3 = style references (look / palette / medium), not edited"},"wait":{"type":"boolean","title":"Wait","description":"block until the job finishes (or `timeout`) and return the final job","default":false},"timeout":{"type":"integer","title":"Timeout","description":"max seconds to wait when wait=true (<= 1800)","default":300},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url","description":"POST the finished job JSON here"}},"type":"object","required":["prompt"],"title":"ImageRequest"},"TTSRequest":{"properties":{"text":{"type":"string","title":"Text","description":"what the cloned voice should say"},"ref_audio":{"type":"string","title":"Ref Audio","description":"reference clip, 3-30 s: http(s) URL or data:audio/...;base64"},"ref_text":{"type":"string","title":"Ref Text","description":"transcript of the reference clip (optional, improves quality)","default":""},"language":{"type":"string","title":"Language","description":"Auto | Chinese | English | ...","default":"Auto"}},"type":"object","required":["text","ref_audio"],"title":"TTSRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}