1:"$Sreact.fragment"
2:I[2598,["6446","static/chunks/53c13509-e5cab91b1f1fd31f.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","26208","static/chunks/26208-8753a1e127fa7983.js","84971","static/chunks/84971-3b3ade7e7e722a9d.js","11602","static/chunks/11602-174f945ac4cbb633.js","20863","static/chunks/20863-9661b08e2d85a7e5.js","7177","static/chunks/app/layout-59041bc6f5f0119a.js"],"Providers"]
3:I[8608,["6446","static/chunks/53c13509-e5cab91b1f1fd31f.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","26208","static/chunks/26208-8753a1e127fa7983.js","84971","static/chunks/84971-3b3ade7e7e722a9d.js","11602","static/chunks/11602-174f945ac4cbb633.js","20863","static/chunks/20863-9661b08e2d85a7e5.js","7177","static/chunks/app/layout-59041bc6f5f0119a.js"],"UserProvider"]
4:I[80774,["6446","static/chunks/53c13509-e5cab91b1f1fd31f.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","26208","static/chunks/26208-8753a1e127fa7983.js","84971","static/chunks/84971-3b3ade7e7e722a9d.js","11602","static/chunks/11602-174f945ac4cbb633.js","20863","static/chunks/20863-9661b08e2d85a7e5.js","7177","static/chunks/app/layout-59041bc6f5f0119a.js"],"default"]
5:I[69326,["6446","static/chunks/53c13509-e5cab91b1f1fd31f.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","26208","static/chunks/26208-8753a1e127fa7983.js","84971","static/chunks/84971-3b3ade7e7e722a9d.js","11602","static/chunks/11602-174f945ac4cbb633.js","20863","static/chunks/20863-9661b08e2d85a7e5.js","7177","static/chunks/app/layout-59041bc6f5f0119a.js"],"ClientLayoutWrapper"]
6:I[87555,[],""]
7:I[31295,[],""]
a:I[6874,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],""]
b:I[33063,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],"Image"]
c:I[53256,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],"default"]
e:I[57810,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],"default"]
f:I[99623,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],"default"]
10:I[37154,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","90844","static/chunks/ee560e2c-0e556e0b3cd2c636.js","60512","static/chunks/9c4e2130-580c2e3b0966ee7f.js","48087","static/chunks/0e762574-abfe63871145a2ac.js","6874","static/chunks/6874-74d8280de2be6114.js","33063","static/chunks/33063-eadf403bcd1df2fa.js","11602","static/chunks/11602-174f945ac4cbb633.js","3442","static/chunks/3442-aa2b41e65587576c.js","4499","static/chunks/app/docs/layout-f7abc56beb711383.js"],"default"]
12:I[59665,[],"OutletBoundary"]
15:I[74911,[],"AsyncMetadataOutlet"]
17:I[59665,[],"ViewportBoundary"]
19:I[59665,[],"MetadataBoundary"]
1b:I[26614,[],""]
:HL["/_next/static/media/e4af272ccee01ff0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
:HL["/_next/static/css/2a184a663e4253e4.css","style"]
:HL["/_next/static/css/15f9ce7aad7f5d02.css","style"]
9:T6ed,{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://muapi.ai/#organization","name":"Muapi","legalName":"Vadoo Internet Services Private Limited","description":"Muapi is a unified generative-media API platform giving developers a single x-api-key HTTP API for 100+ AI image, video, audio, lipsync, and 3D models, including Flux, Veo 3, Kling, Seedance, and Suno.","url":"https://muapi.ai","logo":{"@type":"ImageObject","url":"https://muapi.ai/muapi-logo-v2.png"},"image":"https://muapi.ai/og-default.png","email":"support@vadoo.tv","address":{"@type":"PostalAddress","addressLocality":"Bangalore","addressRegion":"Karnataka","addressCountry":"IN"},"contactPoint":{"@type":"ContactPoint","email":"support@vadoo.tv","contactType":"customer support","url":"https://muapi.ai/support"},"sameAs":["https://x.com/vadooai","https://discord.com/invite/zpnuBRXhKg","https://github.com/SamurAIGPT","https://www.linkedin.com/company/vadootv/"]},{"@type":"WebSite","@id":"https://muapi.ai/#website","url":"https://muapi.ai","name":"Muapi","publisher":{"@id":"https://muapi.ai/#organization"}},{"@type":"SoftwareApplication","@id":"https://muapi.ai/#software","name":"Muapi","applicationCategory":"DeveloperApplication","operatingSystem":"Web, API","description":"Unified generative-media API â€” image, video, audio, lipsync, and 3D generation across 100+ AI models through a single x-api-key HTTP API. Pay-per-generation pricing with no subscription required.","url":"https://muapi.ai","offers":{"@type":"Offer","url":"https://muapi.ai/pricing","priceCurrency":"USD","price":"0","description":"Pay-per-generation credit pricing; free tier available. See https://muapi.ai/pricing for per-model rates."},"provider":{"@id":"https://muapi.ai/#organization"}}]}d:T50e,M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z0:{"P":null,"b":"u_zh47U_X8K3rg48l8zhJ","p":"","c":["","docs","streaming?_rsc=t5b3c"],"i":false,"f":[[["",{"children":["docs",{"children":[["slug","streaming","d"],{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2a184a663e4253e4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/15f9ce7aad7f5d02.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_d8ebd1","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"(function(){try{var s=window.location.pathname.split('/')[1];var m={\"en\":\"en\",\"zh\":\"zh-CN\",\"ja\":\"ja\",\"es\":\"es\",\"fr\":\"fr\",\"de\":\"de\",\"ko\":\"ko\",\"hi\":\"hi\",\"pt\":\"pt\",\"it\":\"it\",\"ru\":\"ru\",\"ar\":\"ar\",\"id\":\"id\",\"vi\":\"vi\",\"tr\":\"tr\",\"fa\":\"fa\",\"nl\":\"nl\",\"pl\":\"pl\",\"th\":\"th\",\"sv\":\"sv\"};var l=(Object.prototype.hasOwnProperty.call(m,s)?m[s]:null)||'en';document.documentElement.lang=l;var h=window.location.hostname.split(':')[0];if(!(h==='muapi.ai'||h.endsWith('.muapi.ai')||h==='localhost'||h==='127.0.0.1')){document.documentElement.setAttribute('data-mu-whitelabel','1');}}catch(e){}})();"}}]}],["$","body",null,{"className":"__className_d8ebd1 antialiased","suppressHydrationWarning":true,"children":[["$","$L2",null,{"children":["$","$L3",null,{"children":[["$","$L4",null,{}],["$","$L5",null,{"initialLocale":"en","footerCopy":{"logoAlt":"muapi Logo","homeAriaLabel":"Home","description":"One API for all state-of-the-art AI models. Build, scale, and deploy generative AI workflows at the lowest cost.","operationalStatus":"All Systems Operational","language":{"label":"Language"},"sections":{"product":"PRODUCT","resources":"RESOURCES","models":"MODELS","tools":"TOOLS","modelPages":"MODEL PAGES","company":"COMPANY"},"links":{"veo3":"Veo 3","wan22":"Wan 2.2","fluxKontext":"Flux Kontext","seedance":"Seedance","midjourneyV7":"Midjourney V7","kling":"Kling","hidream":"HiDream","minimaxHailuo":"Minimax Hailuo","suno":"Suno","runway":"Runway","hunyuan":"Hunyuan","reveImage":"Reve Image","seedream":"Seedream","gpt4oImage":"GPT-4o Image","fluxDev":"Flux Dev","pixverse":"Pixverse","vidu":"Vidu","wan21":"Wan 2.1","latentSync":"LatentSync","mmaudio":"MMAudio","qwen":"Qwen","fluxSchnell":"Flux Schnell","seedEdit":"SeedEdit","allModels":"All Models â†’","home":"Home","dashboard":"Dashboard","exploreModels":"Explore Models","modelRankings":"Model Rankings","pricing":"Pricing","workflows":"Workflows","agents":"Agents","studio":"Studio","history":"History","integrations":"Integrations","providers":"Providers","status":"Status","documentation":"Documentation","modelLeaderboard":"Model Leaderboard","providersHub":"Providers Hub","comparisonHub":"Comparison Hub","alternativesHub":"Alternatives Hub","openSourceAlternatives":"Open-Source Alternatives","blog":"Blog","discord":"Discord","cli":"CLI","gallery":"Gallery","feedback":"Feedback & Roadmap","support":"Support","sitemap":"Sitemap","aiImageGenerator":"AI Image Generator","aiVideoGenerator":"AI Video Generator","imageToVideo":"Image to Video","imageUpscale":"Image Upscale","backgroundRemoverTool":"Background Remover","watermarkRemoverTool":"Watermark Remover","faceSwapTool":"Face Swap","productShot":"Product Shot","lipSync":"Lip Sync","aiImageEditor":"AI Image Editor","aiVideoEditor":"AI Video Editor","motionControls":"Motion Controls","aiAudioMusic":"AI Audio & Music","animeGenerator":"Anime Generator","veo3Api":"Veo 3 API","veo4Api":"Veo 4 API","kling3Api":"Kling 3 API","kling4Api":"Kling 4 API","grok4Api":"Grok 4.7 & 4.6 API","deepseekApi":"DeepSeek API","grokImagineApi":"Grok Imagine API","fluxKontextApi":"Flux Kontext API","flux3Api":"FLUX 3 API","fluxApi":"FLUX API","flux2Api":"FLUX.2 API","wan3Api":"Wan 3.0 API","wan2Api":"Wan 2.x API","wanSpicyApi":"Wan Spicy API","nanoBananaApi":"Nano Banana API","nanoBanana21Api":"Nano Banana 2.1 API","nanoBanana3Api":"Nano Banana 3 API (watchlist)","imagen4Api":"Imagen 4 API","veo31Api":"Veo 3.1 API","viduApi":"Vidu API","ltx2Api":"LTX 2 API","pixverseApi":"PixVerse API","minimaxHailuoFamilyApi":"MiniMax Hailuo API","hunyuanApi":"Hunyuan API","tripo3dApi":"Tripo3D API","meshyApi":"Meshy API","geminiOmniApi":"Gemini Omni API","geminiOmni11FlashApi":"Gemini Omni 1.1 Flash API","seedream50ProApi":"Seedream 5.0 Pro API","hidreamApi":"HiDream I1 API","ideogramApi":"Ideogram API","leonardoAiApi":"Leonardo AI API","seedanceApi":"Seedance API","seedance15Api":"Seedance 1.5 Pro API","seedance2Api":"Seedance 2 API","seedance25Api":"Seedance 2.5 API","seedance3Api":"Seedance 3 API (coming soon)","seedanceSpicyApi":"Seedance Spicy API","seedance25DraftModeApi":"Seedance 2.5 Draft Mode API","seedanceMotionControlApi":"Seedance Motion Control API","minimaxH3Api":"MiniMax H3 API","minimaxH3SpicyApi":"MiniMax H3 Spicy API","minimaxH3MaxApi":"MiniMax H3 Max API","minimaxMusic30Api":"Minimax Music 3.0 API","soraApi":"Sora API","gptImageApi":"GPT Image 2 API","gptImage3Api":"GPT Image 3 API (watchlist)","gptImage25Api":"GPT Image 2.5 API","gptImage15Api":"GPT Image 1.5 API","infiniteTalkApi":"InfiniteTalk API","kreaApi":"Krea API","museImageApi":"Meta Muse Image API","oviApi":"Ovi API","reveApi":"Reve API","sdxlApi":"Stable Diffusion XL API","topazUpscaleImageApi":"Topaz Upscale Image API","topazUpscaleVideoApi":"Topaz Upscale Video API","gptAstraApi":"GPT 6 Astra API","gemini4Api":"Gemini 4 API","anthropicApi":"Anthropic API","openaiApi":"OpenAI API","googleApi":"Google Gemini API","minimaxApi":"MiniMax API","klingApi":"Kling Video API","qwenApi":"Qwen API","claudeFableApi":"Claude Fable API","claudeOpusApi":"Claude Opus API","abliteratedLlmApi":"Abliterated LLM API","abliteratedModelApi":"Abliterated Model API","mimoAbliteratedApi":"MiMo Abliterated API","qwenAbliteratedApi":"Qwen Abliterated API","llamaAbliteratedApi":"Llama Abliterated API","glmAbliteratedApi":"GLM Abliterated API","gemmaAbliteratedApi":"Gemma Abliterated API","deepseekR1AbliteratedApi":"DeepSeek R1 Abliterated API","characterChatLlmApi":"Character Chat LLM API","llamaCharacterChatApi":"Llama Character Chat API","cydoniaCharacterChatApi":"Cydonia Character Chat API","qwenCharacterChatApi":"Qwen Character Chat API","lowRefusalLlmApi":"Low-Refusal LLM API","qwenImageApi":"Qwen Image API","qwen21Api":"Qwen 2.1 API","zImageApi":"Z-Image API","runwayApi":"Runway API","sunoApi":"Suno API","midjourneyApi":"Midjourney API","happyhorse1Api":"HappyHorse 1 API","happyhorse11Api":"HappyHorse 1.1 API","loraTrainerApi":"AI LoRA Trainer API","textToSpeechApi":"Text to Speech API","elevenLabsApi":"ElevenLabs API","speechToTextApi":"Speech to Text API","voiceCloningApi":"Voice Cloning API","videoUpscalerApi":"Video Upscaler API","videoToAudioApi":"Video to Audio API","ai3dModelApi":"AI 3D Model API","freeAiApis":"Free AI APIs","imageUpscalerApi":"Image Upscaler API","backgroundRemoverApi":"Background Remover API","watermarkRemoverApi":"Watermark Remover API","virtualTryOnApi":"Virtual Try-On API","aiVideoEffectsApi":"AI Video Effects API","aiPhotoEffectsApi":"AI Photo Effects API","productPhotographyApi":"Product Photography API","faceSwapApi":"Face Swap API","imageFaceSwapApi":"Image Face Swap API","videoFaceSwapApi":"Video Face Swap API","aiVideoApi":"AI Video API","imageToVideoApi":"Image-to-Video API","aiImageEditingApi":"AI Image Editing API","aiCharacterConsistencyApi":"AI Character Consistency API","aiVideoEditingApi":"AI Video Editing API","aiImageApi":"AI Image API","aiSpicyImageGenerator":"AI Spicy Image Generator","aiSpicyVideoGenerator":"AI Spicy Video Generator","aiMusicApi":"AI Music API","leadEnrichmentApi":"Lead Enrichment API","ecommerceIntelligenceApi":"Ecommerce Intelligence API","financialDataApi":"Financial Data API","aiAvatarLipsyncApi":"AI Avatar & Lipsync API","whiteLabelAiStudio":"White Label AI Studio","mcpCli":"MCP & CLI","agentSkills":"Agent Skills (SKILL.md)","freeClaudeAiImageGenerator":"Free Claude AI Image Generator","freeClaudeAiVideoGenerator":"Free Claude AI Video Generator","freeAiImageGenerator":"Free AI Image Generator","socialMediaApi":"Social Media API","socialMediaScraperApi":"Social Media Scraper API","seoApi":"SEO API","about":"About","termsOfUse":"Terms of Use","privacyPolicy":"Privacy Policy","gdprDataRights":"GDPR & Data Rights","refundPolicy":"Refund Policy","contact":"Contact","viewAllTools":"View All Models & Tools â†’"},"bottom":{"copyright":"2026 Vadoo Internet Services Private Limited. All Rights Reserved.","terms":"Terms","privacy":"Privacy","gdpr":"GDPR & Data Rights","refundPolicy":"Refund Policy"}},"children":["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$L8",[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]}],["$","script",null,{"id":"structured-data","type":"application/ld+json","dangerouslySetInnerHTML":{"__html":"$9"}}]]}]]}]]}],{"children":["docs",["$","$1","c",{"children":[null,["$","div",null,{"className":"h-screen w-full flex flex-col bg-bg-page overflow-hidden text-sm relative font-outfit","style":{"fontFamily":"var(--font-outfit), sans-serif"},"children":[["$","nav",null,{"className":"h-[72px] flex-shrink-0 flex items-center justify-center w-full bg-bg-page/80 backdrop-blur-md border-b border-divider/60 px-6 z-50","children":["$","div",null,{"className":"flex items-center justify-between w-full max-w-[95%]","children":[["$","div",null,{"className":"flex items-center gap-10","children":[["$","$La",null,{"href":"/","className":"flex items-center hover:opacity-75 transition-opacity","children":["$","$Lb",null,{"src":"https://cdn.muapi.ai/static/muapi-logo-v2.png","unoptimized":true,"alt":"Muapi Logo","width":400,"height":165,"className":"w-32 sm:w-40 dark:brightness-0 dark:invert transition-all"}]}],["$","div",null,{"className":"hidden md:flex items-center gap-8","children":[["$","$La",null,{"href":"/dashboard","className":"text-[13px] text-secondary-text hover:text-primary font-semibold transition-colors uppercase tracking-wider","children":"Dashboard"}],["$","$La",null,{"href":"/playground","className":"text-[13px] text-secondary-text hover:text-primary font-semibold transition-colors uppercase tracking-wider","children":"Explore"}]]}]]}],["$","div",null,{"className":"flex items-center gap-6","children":[["$","$La",null,{"href":"/blog","className":"text-[13px] text-secondary-text hover:text-primary font-semibold transition-colors uppercase tracking-wider","children":"Blog"}],["$","$Lc",null,{"locale":"en","copy":{"localeLabel":"Language","locales":{"en":"English","zh":"Chinese","ja":"Japanese","es":"Spanish","fr":"French","de":"German","ko":"Korean","hi":"Hindi","pt":"Portuguese","it":"Italian","ru":"Russian","ar":"Arabic","id":"Indonesian","vi":"Vietnamese","tr":"Turkish","fa":"Persian","nl":"Dutch","pl":"Polish","sv":"Swedish","th":"Thai"},"navbar":{"main":{"explore":"Explore","rankings":"Rankings","docs":"Docs","blog":"Blog","discord":"Discord"},"searchPlaceholder":"Search model...","pages":{"Dashboard":"Dashboard","Explore":"Explore","Assistant":"Assistant","Workflow":"Workflow","Agents":"Agents","Apps":"Apps","Studio":"Studio","API Keys":"API Keys","Integrations":"Integrations","MCP & CLI":"MCP & CLI","Billing":"Billing","Referral":"Referral","White Label":"White Label"},"utility":{"home":"Home","mainNavigation":"Main Navigation","dashboardNavigation":"Dashboard Navigation","mobileNavigation":"Mobile Navigation","menu":"Menu","resources":"Resources","balance":"Balance","available":"available","topUp":"Top Up","referral":"Referral","accessKeys":"Access Keys","teams":"Teams","gallery":"Gallery","support":"Support","darkMode":"Dark Mode","signOut":"Sign out","signIn":"Sign In","hot":"Hot","generatingAs":"Generating as","viewing":"Viewing","editorTeamBalance":"Editor â€” uses team balance","readOnly":"Read-only","switchPersonal":"Switch to Personal","noModels":"No models found","results":"results","pressEsc":"Press ESC to close","closeMenu":"Close Menu"},"banner":{"seedance2":"20% discount on Seedance 2","seedance25":"28% discount on Seedance 2.5","kling4":"Kling 4.0 is here","tryNow":"Try now","exploreApi":"Explore API â†’"}}}}],["$","a",null,{"href":"https://discord.com/invite/zpnuBRXhKg","target":"_blank","rel":"noopener noreferrer","className":"text-[#5865F2] transition-colors","children":["$","svg",null,{"stroke":"currentColor","fill":"currentColor","strokeWidth":"0","viewBox":"0 0 640 512","children":["$undefined",[["$","path","0",{"d":"$d","children":[]}]]],"className":"$undefined","style":{"color":"$undefined"},"height":24,"width":24,"xmlns":"http://www.w3.org/2000/svg"}]}],["$","$Le",null,{"locale":"en"}],["$","$Lf",null,{"basePath":"/docs","copy":{"metaTitleFallback":"Documentation â€” Muapi Docs","nav":{"dashboard":"Dashboard","explore":"Explore","blog":"Blog"},"sidebar":{"introduction":"Introduction","quickStart":"Quick Start","authentication":"Authentication","workflows":"Workflows","agents":"Agents","agentSkills":"Agent Skills","designAgentApi":"Design Agent API","muapiCli":"MuAPI CLI","integrations":"Integrations","applicationGuides":"Application Guides","openaiCompatible":"OpenAI-Compatible","mcpServer":"MCP Server","langchain":"LangChain","comfyui":"ComfyUI","n8n":"n8n","muapi":"MuAPI","models":"Models","pricing":"Pricing","credits":"Credits","webhooks":"Webhooks","fileUpload":"File Upload","aiVideoEffects":"AI Video Effects","motionControls":"Motion Controls","vfx":"VFX","fluxDev":"Flux Dev","musicSpeech":"Music & Speech","additionalFeatures":"Additional Features","storyboarding":"Storyboarding","socialPublishing":"Social Publishing","externalApis":"External APIs","specializedApps":"Specialized Apps","whiteLabel":"White Label","docsGroup0":"Get started","docsGroup1":"API reference","docsGroup2":"Media guides","docsGroup3":"Agents and workflows","docsGroup4":"Coding agents","docsGroup5":"Creative and chat apps","docsGroup6":"Frameworks and automation","docsGroup7":"More features","creativeCanvas":"Creative Canvas","make":"Make.com","zapier":"Zapier","embedding":"Embedding","teams":"Teams"},"search":{"placeholder":"Search docs...","resultsFound":"{count} Results Found","escClose":"ESC to close","noResults":"No results for \"{query}\"","noResultsHint":"Check the spelling or try a different term."},"toc":{"onThisPage":"On This Page","backToTop":"Back to top"},"mobileMenu":{"toggle":"Toggle navigation menu"}},"locale":"en"}]]}]]}]}],["$","div",null,{"className":"flex flex-1 overflow-hidden w-full max-w-[1600px] mx-auto relative font-outfit","style":{"fontFamily":"var(--font-outfit), sans-serif"},"children":[["$","$L10",null,{"basePath":"/docs","copy":"$0:f:0:1:2:children:1:props:children:1:props:children:0:props:children:props:children:1:props:children:4:props:copy","locale":"en"}],["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]]}]]}],{"children":[["slug","streaming","d"],["$","$1","c",{"children":[null,["$","$L6",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L7",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":["$L11",null,["$","$L12",null,{"children":["$L13","$L14",["$","$L15",null,{"promise":"$@16"}]]}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","fv8pW-YHQCMK-dBO47B8ev",{"children":[["$","$L17",null,{"children":"$L18"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],["$","$L19",null,{"children":"$L1a"}]]}],false]],"m":"$undefined","G":["$1b","$undefined"],"s":false,"S":true}
1c:"$Sreact.suspense"
1d:I[74911,[],"AsyncMetadata"]
8:["$","div",null,{"className":"min-h-[70vh] bg-bg-page flex flex-col items-center justify-center text-center px-4 py-24","children":[["$","p",null,{"className":"text-sm font-semibold tracking-wider text-primary uppercase mb-3","children":"404"}],["$","h1",null,{"className":"text-3xl md:text-4xl font-bold text-primary-text mb-3","children":"Page not found"}],["$","p",null,{"className":"text-secondary-text max-w-md mb-8","children":"The page you're looking for doesn't exist or may have moved. Try one of the links below."}],["$","div",null,{"className":"flex flex-wrap items-center justify-center gap-3 mb-8","children":[["$","$La",null,{"href":"/","className":"px-5 py-2.5 rounded-lg bg-primary text-black font-semibold hover:opacity-90 transition-opacity","children":"Go to Homepage"}],["$","$La",null,{"href":"/playground","className":"px-5 py-2.5 rounded-lg border border-divider text-primary-text font-semibold hover:border-primary/50 transition-colors","children":"Browse Playground"}]]}],["$","div",null,{"className":"text-xs text-secondary-text max-w-md text-left","children":[["$","p",null,{"className":"mb-1.5","children":"For agents and crawlers â€” where to look next:"}],["$","ul",null,{"className":"list-disc list-inside space-y-1","children":[["$","li",null,{"children":[["$","$La",null,{"href":"/sitemap.xml","className":"underline hover:text-primary-text","children":"/sitemap.xml"}]," â€” ","full list of pages"]}],["$","li",null,{"children":[["$","$La",null,{"href":"/llms.txt","className":"underline hover:text-primary-text","children":"/llms.txt"}]," â€” ","machine-readable site index"]}],["$","li",null,{"children":[["$","$La",null,{"href":"/docs/introduction","className":"underline hover:text-primary-text","children":"/docs/introduction"}]," â€” ","API docs index"]}]]}]]}]]}]
1a:["$","div",null,{"hidden":true,"children":["$","$1c",null,{"fallback":null,"children":["$","$L1d",null,{"promise":"$@1e"}]}]}]
14:null
18:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","2",{"name":"theme-color","content":"#000000"}]]
13:null
22:I[12384,["66711","static/chunks/8e1d74a4-d97f41296fbf0fe7.js","24777","static/chunks/66ec4792-e6d482973cc03d34.js","40938","static/chunks/40938-f2360db03791581e.js","43508","static/chunks/app/docs/%5Bslug%5D/page-6e63a554696dc69e.js"],"default"]
1f:T482,const API_KEY = "your_api_key_here";

async function streamGeminiFlash(prompt, systemPrompt = null) {
  const body = { prompt };
  if (systemPrompt) body.system_prompt = systemPrompt;

  const response = await fetch("https://api.muapi.ai/api/v1/gemini-flash/stream", {
    method: "POST",
    headers: {
      "x-api-key": API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify(body),
  });

  const reader = response.body.getReader();
  const decoder = new TextDecoder();

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    const chunk = decoder.decode(value, { stream: true });
    for (const line of chunk.split("\n")) {
      if (line.startsWith("data: ")) {
        const data = line.slice(6).trim();
        if (data === "[DONE]") return;
        try {
          const parsed = JSON.parse(data);
          const delta = parsed.choices?.[0]?.delta?.content ?? "";
          if (delta) process.stdout.write(delta);
        } catch {}
      }
    }
  }
}

streamGeminiFlash(
  "Explain how neural networks learn.",
  "You are a clear technical writer."
).then(() => console.log());
20:T429,const API_KEY = "your_api_key_here";

async function streamToElement(prompt, targetElement) {
  const response = await fetch("https://api.muapi.ai/api/v1/gemini-flash/stream", {
    method: "POST",
    headers: {
      "x-api-key": API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ prompt }),
  });

  const reader = response.body.getReader();
  const decoder = new TextDecoder();

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    const text = decoder.decode(value, { stream: true });
    for (const line of text.split("\n")) {
      if (line.startsWith("data: ")) {
        const data = line.slice(6).trim();
        if (data === "[DONE]") return;
        try {
          const parsed = JSON.parse(data);
          const delta = parsed.choices?.[0]?.delta?.content ?? "";
          if (delta) targetElement.textContent += delta;
        } catch {}
      }
    }
  }
}

// Usage
const outputDiv = document.getElementById("output");
streamToElement("Write a haiku about AI.", outputDiv);
21:T6e3,const API_BASE = "https://api.muapi.ai/api/v1";

interface StreamChunk {
  id: string;
  choices: Array<{
    index: number;
    delta: { content?: string; role?: string };
    finish_reason: string | null;
  }>;
  usage?: {
    prompt_tokens: number;
    completion_tokens: number;
    total_tokens: number;
  };
}

async function streamGeminiFlash(
  prompt: string,
  options: { imageUrl?: string; systemPrompt?: string } = {},
  apiKey: string
): Promise<string> {
  const body: Record<string, string> = { prompt };
  if (options.imageUrl) body.image_url = options.imageUrl;
  if (options.systemPrompt) body.system_prompt = options.systemPrompt;

  const response = await fetch(`${API_BASE}/gemini-flash/stream`, {
    method: "POST",
    headers: { "x-api-key": apiKey, "Content-Type": "application/json" },
    body: JSON.stringify(body),
  });

  if (!response.ok) throw new Error(`HTTP ${response.status}`);

  const reader = response.body!.getReader();
  const decoder = new TextDecoder();
  let fullText = "";

  while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    const text = decoder.decode(value, { stream: true });
    for (const line of text.split("\n")) {
      if (!line.startsWith("data: ")) continue;
      const data = line.slice(6).trim();
      if (data === "[DONE]") return fullText;
      try {
        const chunk: StreamChunk = JSON.parse(data);
        const delta = chunk.choices[0]?.delta?.content ?? "";
        fullText += delta;
        process.stdout.write(delta);
      } catch {}
    }
  }

  return fullText;
}

// Usage
streamGeminiFlash(
  "Describe the future of AI in healthcare.",
  { systemPrompt: "Be optimistic but realistic." },
  "your_api_key_here"
).then(() => console.log());
11:[["$","div",null,{"id":"docs-scroll-container","className":"flex-1 overflow-y-auto scroll-smooth custom-scrollbar bg-bg-page relative","children":["$","div",null,{"className":"max-w-[950px] mx-auto w-full px-8 pb-12 pt-8 lg:pb-20","children":["$","main",null,{"className":"min-h-full","children":[["$","h1",null,{"id":"streaming-api","className":"text-3xl sm:text-4xl font-black tracking-tight text-primary-text mb-8","children":"Streaming API"}],["$","div",null,{"className":"premium-markdown w-full","children":[["$","p","p-0",{"children":["MuAPI supports ",["$","strong","strong-0",{"children":"Server-Sent Events (SSE)"}]," streaming for LLM text generation endpoints. Streaming delivers tokens progressively as they are generated, enabling real-time display in chat UIs and interactive applications."]}],"\n",["$","h2","h2-0",{"id":"available-streaming-endpoints","children":"Available Streaming Endpoints"}],"\n",["$","table","table-0",{"children":[["$","thead","thead-0",{"children":["$","tr","tr-0",{"children":[["$","th","th-0",{"children":"Endpoint"}],["$","th","th-1",{"children":"Model"}],["$","th","th-2",{"children":"Description"}]]}]}],["$","tbody","tbody-0",{"children":["$","tr","tr-0",{"children":[["$","td","td-0",{"children":["$","code","code-0",{"children":"POST /api/v1/gemini-flash/stream"}]}],["$","td","td-1",{"children":"Gemini 3 Flash"}],["$","td","td-2",{"children":"Fast multimodal LLM with vision support"}]]}]}]]}],"\n",["$","hr","hr-0",{}],"\n",["$","h2","h2-1",{"id":"how-streaming-works","children":"How Streaming Works"}],"\n",["$","ol","ol-0",{"children":["\n",["$","li","li-0",{"children":[["$","strong","strong-0",{"children":"Send a POST request"}]," to a ",["$","code","code-0",{"children":"/stream"}]," endpoint with your payload."]}],"\n",["$","li","li-1",{"children":[["$","strong","strong-0",{"children":"Read the response"}]," as a stream of ",["$","code","code-0",{"children":"text/event-stream"}]," events."]}],"\n",["$","li","li-2",{"children":[["$","strong","strong-0",{"children":"Each event"}]," contains a JSON delta with partial content."]}],"\n",["$","li","li-3",{"children":[["$","strong","strong-0",{"children":"The stream ends"}]," with a ",["$","code","code-0",{"children":"data: [DONE]"}]," sentinel."]}],"\n"]}],"\n",["$","p","p-1",{"children":[["$","strong","strong-0",{"children":"Billing:"}]," Cost is calculated from actual token usage after the stream completes â€” $0.30/M input tokens and $1.80/M output tokens for Gemini 3 Flash. A minimum wallet balance of ",["$","strong","strong-1",{"children":"$$1.00"}]," is required."]}],"\n",["$","hr","hr-1",{}],"\n",["$","h2","h2-2",{"id":"request-format","children":"Request Format"}],"\n",["$","ul","ul-0",{"children":["\n",["$","li","li-0",{"children":[["$","strong","strong-0",{"children":"Method:"}]," ",["$","code","code-0",{"children":"POST"}]]}],"\n",["$","li","li-1",{"children":[["$","strong","strong-0",{"children":"Authentication:"}]," ",["$","code","code-0",{"children":"x-api-key"}]," header"]}],"\n",["$","li","li-2",{"children":[["$","strong","strong-0",{"children":"Content-Type:"}]," ",["$","code","code-0",{"children":"application/json"}]]}],"\n",["$","li","li-3",{"children":[["$","strong","strong-0",{"children":"Response Content-Type:"}]," ",["$","code","code-0",{"children":"text/event-stream"}]]}],"\n"]}],"\n",["$","h3","h3-0",{"id":"payload","children":"Payload"}],"\n",["$","pre","pre-0",{"children":["$","code","code-0",{"className":"language-json","children":"{\n  \"prompt\": \"Explain quantum entanglement in simple terms.\",\n  \"image_url\": \"https://example.com/image.jpg\",\n  \"system_prompt\": \"You are a concise science communicator.\"\n}\n"}]}],"\n",["$","table","table-1",{"children":[["$","thead","thead-0",{"children":["$","tr","tr-0",{"children":[["$","th","th-0",{"children":"Field"}],["$","th","th-1",{"children":"Type"}],["$","th","th-2",{"children":"Required"}],["$","th","th-3",{"children":"Description"}]]}]}],["$","tbody","tbody-0",{"children":[["$","tr","tr-0",{"children":[["$","td","td-0",{"children":["$","code","code-0",{"children":"prompt"}]}],["$","td","td-1",{"children":"string"}],["$","td","td-2",{"children":"Yes"}],["$","td","td-3",{"children":"The user message or instruction"}]]}],["$","tr","tr-1",{"children":[["$","td","td-0",{"children":["$","code","code-0",{"children":"image_url"}]}],["$","td","td-1",{"children":"string (URL)"}],["$","td","td-2",{"children":"No"}],["$","td","td-3",{"children":"Optional image for multimodal requests"}]]}],["$","tr","tr-2",{"children":[["$","td","td-0",{"children":["$","code","code-0",{"children":"system_prompt"}]}],["$","td","td-1",{"children":"string"}],["$","td","td-2",{"children":"No"}],["$","td","td-3",{"children":"System-level instruction to control model behavior"}]]}]]}]]}],"\n",["$","h3","h3-1",{"id":"sse-response-format","children":"SSE Response Format"}],"\n",["$","p","p-2",{"children":["Each event line starts with ",["$","code","code-0",{"children":"data: "}]," followed by a JSON object:"]}],"\n",["$","pre","pre-1",{"children":["$","code","code-0",{"children":"data: {\"id\":\"chatcmpl-abc\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Quantum\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-abc\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" entanglement\"},\"finish_reason\":null}]}\n\ndata: {\"id\":\"chatcmpl-abc\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"...\"},\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":12,\"completion_tokens\":80,\"total_tokens\":92}}\n\ndata: [DONE]\n"}]}],"\n",["$","hr","hr-2",{}],"\n",["$","h2","h2-3",{"id":"code-examples","children":"Code Examples"}],"\n",["$","h3","h3-2",{"id":"python-httpx-recommended-for-async-","children":"Python (httpx â€” recommended for async)"}],"\n",["$","pre","pre-2",{"children":["$","code","code-0",{"className":"language-python","children":"import httpx\n\nAPI_KEY = \"your_api_key_here\"\n\nwith httpx.Client(timeout=120) as client:\n    with client.stream(\n        \"POST\",\n        \"https://api.muapi.ai/api/v1/gemini-flash/stream\",\n        headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/json\"},\n        json={\n            \"prompt\": \"Write a short poem about the ocean.\",\n            \"system_prompt\": \"You are a creative poet.\"\n        }\n    ) as response:\n        for line in response.iter_lines():\n            if line.startswith(\"data: \"):\n                data = line[6:]\n                if data == \"[DONE]\":\n                    break\n                import json\n                chunk = json.loads(data)\n                delta = chunk[\"choices\"][0][\"delta\"].get(\"content\", \"\")\n                if delta:\n                    print(delta, end=\"\", flush=True)\n        print()\n"}]}],"\n",["$","h3","h3-3",{"id":"python-requests-","children":"Python (requests)"}],"\n",["$","pre","pre-3",{"children":["$","code","code-0",{"className":"language-python","children":"import requests\nimport json\n\nAPI_KEY = \"your_api_key_here\"\n\nresponse = requests.post(\n    \"https://api.muapi.ai/api/v1/gemini-flash/stream\",\n    headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/json\"},\n    json={\n        \"prompt\": \"Summarize the history of the internet.\",\n        \"system_prompt\": \"Be concise and factual.\"\n    },\n    stream=True,\n    timeout=120\n)\n\nfor line in response.iter_lines():\n    if line:\n        line = line.decode(\"utf-8\")\n        if line.startswith(\"data: \"):\n            data = line[6:]\n            if data == \"[DONE]\":\n                break\n            chunk = json.loads(data)\n            delta = chunk[\"choices\"][0][\"delta\"].get(\"content\", \"\")\n            if delta:\n                print(delta, end=\"\", flush=True)\n\nprint()\n"}]}],"\n",["$","h3","h3-4",{"id":"python-with-image-multimodal-","children":"Python (with image â€” multimodal)"}],"\n",["$","pre","pre-4",{"children":["$","code","code-0",{"className":"language-python","children":"import httpx\nimport json\n\nAPI_KEY = \"your_api_key_here\"\n\nwith httpx.Client(timeout=120) as client:\n    with client.stream(\n        \"POST\",\n        \"https://api.muapi.ai/api/v1/gemini-flash/stream\",\n        headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/json\"},\n        json={\n            \"prompt\": \"Describe what you see in this image.\",\n            \"image_url\": \"https://example.com/photo.jpg\"\n        }\n    ) as response:\n        for line in response.iter_lines():\n            if line.startswith(\"data: \"):\n                data = line[6:]\n                if data == \"[DONE]\":\n                    break\n                chunk = json.loads(data)\n                delta = chunk[\"choices\"][0][\"delta\"].get(\"content\", \"\")\n                if delta:\n                    print(delta, end=\"\", flush=True)\n        print()\n"}]}],"\n",["$","hr","hr-3",{}],"\n",["$","h3","h3-5",{"id":"javascript-node-js-fetch-","children":"JavaScript / Node.js (fetch)"}],"\n",["$","pre","pre-5",{"children":["$","code","code-0",{"className":"language-javascript","children":"$1f"}]}],"\n",["$","h3","h3-6",{"id":"javascript-browser-eventsource-alternative-via-fetch-","children":"JavaScript (Browser â€” EventSource alternative via fetch)"}],"\n",["$","pre","pre-6",{"children":["$","code","code-0",{"className":"language-javascript","children":"$20"}]}],"\n",["$","hr","hr-4",{}],"\n",["$","h3","h3-7",{"id":"curl","children":"cURL"}],"\n",["$","pre","pre-7",{"children":["$","code","code-0",{"className":"language-bash","children":"curl -X POST \"https://api.muapi.ai/api/v1/gemini-flash/stream\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"What are the main causes of climate change?\"}' \\\n  --no-buffer\n"}]}],"\n",["$","p","p-3",{"children":"To see only the text content (strips SSE framing):"}],"\n",["$","pre","pre-8",{"children":["$","code","code-0",{"className":"language-bash","children":"curl -X POST \"https://api.muapi.ai/api/v1/gemini-flash/stream\" \\\n  -H \"x-api-key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"List 5 programming best practices.\"}' \\\n  --no-buffer \\\n  | grep \"^data: \" \\\n  | grep -v \"\\[DONE\\]\" \\\n  | sed 's/^data: //' \\\n  | python3 -c \"\nimport sys, json\nfor line in sys.stdin:\n    try:\n        chunk = json.loads(line)\n        delta = chunk['choices'][0]['delta'].get('content', '')\n        print(delta, end='', flush=True)\n    except: pass\nprint()\n\"\n"}]}],"\n",["$","hr","hr-5",{}],"\n",["$","h3","h3-8",{"id":"typescript-with-type-safety-","children":"TypeScript (with type safety)"}],"\n",["$","pre","pre-9",{"children":["$","code","code-0",{"className":"language-typescript","children":"$21"}]}],"\n",["$","hr","hr-6",{}],"\n",["$","h2","h2-4",{"id":"comparison-streaming-vs-standard","children":"Comparison: Streaming vs Standard"}],"\n",["$","table","table-2",{"children":[["$","thead","thead-0",{"children":["$","tr","tr-0",{"children":[["$","th","th-0",{"children":"Feature"}],["$","th","th-1",{"children":["Standard (",["$","code","code-0",{"children":"/gemini-flash"}],")"]}],["$","th","th-2",{"children":["Streaming (",["$","code","code-0",{"children":"/gemini-flash/stream"}],")"]}]]}]}],["$","tbody","tbody-0",{"children":[["$","tr","tr-0",{"children":[["$","td","td-0",{"children":"Response"}],["$","td","td-1",{"children":[["$","code","code-0",{"children":"request_id"}]," â†’ poll for result"]}],["$","td","td-2",{"children":"Live SSE token stream"}]]}],["$","tr","tr-1",{"children":[["$","td","td-0",{"children":"Latency to first token"}],["$","td","td-1",{"children":"Higher (full generation first)"}],["$","td","td-2",{"children":"Low (tokens arrive immediately)"}]]}],["$","tr","tr-2",{"children":[["$","td","td-0",{"children":"Best for"}],["$","td","td-1",{"children":"Workflows, automation, batch"}],["$","td","td-2",{"children":"Chat UIs, real-time display"}]]}],["$","tr","tr-3",{"children":[["$","td","td-0",{"children":"Webhook support"}],["$","td","td-1",{"children":"Yes"}],["$","td","td-2",{"children":"No (response is the stream)"}]]}],["$","tr","tr-4",{"children":[["$","td","td-0",{"children":"Billing"}],["$","td","td-1",{"children":"Post-call, token-based"}],["$","td","td-2",{"children":"Post-stream, token-based"}]]}],["$","tr","tr-5",{"children":[["$","td","td-0",{"children":"Minimum balance"}],["$","td","td-1",{"children":"$$1.00"}],["$","td","td-2",{"children":"$$1.00"}]]}]]}]]}],"\n",["$","hr","hr-7",{}],"\n",["$","h2","h2-5",{"id":"error-handling","children":"Error Handling"}],"\n",["$","p","p-4",{"children":"If an error occurs during streaming, the stream will emit an error event before closing:"}],"\n",["$","pre","pre-10",{"children":["$","code","code-0",{"children":"data: {\"error\": \"upstream provider timeout\"}\n"}]}],"\n",["$","p","p-5",{"children":"Always handle this case in your client:"}],"\n",["$","pre","pre-11",{"children":["$","code","code-0",{"className":"language-python","children":"chunk = json.loads(data)\nif \"error\" in chunk:\n    print(f\"Stream error: {chunk['error']}\")\n    break\ndelta = chunk.get(\"choices\", [{}])[0].get(\"delta\", {}).get(\"content\", \"\")\n"}]}],"\n",["$","hr","hr-8",{}],"\n",["$","h2","h2-6",{"id":"pricing","children":"Pricing"}],"\n",["$","p","p-6",{"children":"Gemini 3 Flash streaming uses token-based billing applied after the stream completes:"}],"\n",["$","table","table-3",{"children":[["$","thead","thead-0",{"children":["$","tr","tr-0",{"children":[["$","th","th-0",{"children":"Token Type"}],["$","th","th-1",{"children":"Rate"}]]}]}],["$","tbody","tbody-0",{"children":[["$","tr","tr-0",{"children":[["$","td","td-0",{"children":"Input tokens"}],["$","td","td-1",{"children":"$$0.30 per million"}]]}],["$","tr","tr-1",{"children":[["$","td","td-0",{"children":"Output tokens"}],["$","td","td-1",{"children":"$$1.80 per million"}]]}]]}]]}],"\n",["$","p","p-7",{"children":[["$","strong","strong-0",{"children":"Example:"}]," A request with 500 input tokens and 800 output tokens costs:"]}],"\n",["$","ul","ul-1",{"children":["\n",["$","li","li-0",{"children":["Input: 500 Ã— $0.30 / 1,000,000 = ",["$","strong","strong-0",{"children":"$$0.00015"}]]}],"\n",["$","li","li-1",{"children":["Output: 800 Ã— $1.80 / 1,000,000 = ",["$","strong","strong-0",{"children":"$$0.00144"}]]}],"\n",["$","li","li-2",{"children":["$","strong","strong-0",{"children":"Total: ~$0.0016"}]}],"\n"]}]]}]]}]}]}],["$","div",null,{"className":"hidden xl:block w-72 flex-shrink-0 pl-2 py-4 pr-8 overflow-y-auto custom-scrollbar","children":["$","$L22",null,{"headings":[{"level":1,"text":"Streaming API","id":"streaming-api"},{"level":2,"text":"Available Streaming Endpoints","id":"available-streaming-endpoints"},{"level":2,"text":"How Streaming Works","id":"how-streaming-works"},{"level":2,"text":"Request Format","id":"request-format"},{"level":3,"text":"Payload","id":"payload"},{"level":3,"text":"SSE Response Format","id":"sse-response-format"},{"level":2,"text":"Code Examples","id":"code-examples"},{"level":3,"text":"Python (httpx â€” recommended for async)","id":"python-httpx-recommended-for-async-"},{"level":3,"text":"Python (requests)","id":"python-requests-"},{"level":3,"text":"Python (with image â€” multimodal)","id":"python-with-image-multimodal-"},{"level":3,"text":"JavaScript / Node.js (fetch)","id":"javascript-node-js-fetch-"},{"level":3,"text":"JavaScript (Browser â€” EventSource alternative via fetch)","id":"javascript-browser-eventsource-alternative-via-fetch-"},{"level":3,"text":"cURL","id":"curl"},{"level":3,"text":"TypeScript (with type safety)","id":"typescript-with-type-safety-"},{"level":2,"text":"Comparison: Streaming vs Standard","id":"comparison-streaming-vs-standard"},{"level":2,"text":"Error Handling","id":"error-handling"},{"level":2,"text":"Pricing","id":"pricing"}],"copy":"$0:f:0:1:2:children:1:props:children:1:props:children:0:props:children:props:children:1:props:children:4:props:copy"}]}]]
16:{"metadata":[["$","title","0",{"children":"Streaming API â€” Muapi Docs"}],["$","meta","1",{"name":"description","content":"MuAPI supports Server-Sent Events (SSE) streaming for LLM text generation endpoints. Streaming delivers tokens progressively as they are generated, enablin"}],["$","meta","2",{"name":"author","content":"Muapi Team"}],["$","meta","3",{"name":"keywords","content":"AI,Video API,Image API,Machine Learning,VFX,Workflow"}],["$","meta","4",{"name":"creator","content":"Muapi"}],["$","meta","5",{"name":"publisher","content":"Muapi"}],["$","meta","6",{"name":"robots","content":"index, follow"}],["$","meta","7",{"name":"googlebot","content":"index, follow, max-video-preview:-1, max-image-preview:large, max-snippet:-1"}],["$","link","8",{"rel":"canonical","href":"https://muapi.ai/docs/streaming"}],["$","link","9",{"rel":"alternate","hrefLang":"en","href":"https://muapi.ai/docs/streaming"}],["$","link","10",{"rel":"alternate","hrefLang":"zh","href":"https://muapi.ai/zh/docs/streaming"}],["$","link","11",{"rel":"alternate","hrefLang":"ja","href":"https://muapi.ai/ja/docs/streaming"}],["$","link","12",{"rel":"alternate","hrefLang":"es","href":"https://muapi.ai/es/docs/streaming"}],["$","link","13",{"rel":"alternate","hrefLang":"fr","href":"https://muapi.ai/fr/docs/streaming"}],["$","link","14",{"rel":"alternate","hrefLang":"de","href":"https://muapi.ai/de/docs/streaming"}],["$","link","15",{"rel":"alternate","hrefLang":"ko","href":"https://muapi.ai/ko/docs/streaming"}],["$","link","16",{"rel":"alternate","hrefLang":"hi","href":"https://muapi.ai/hi/docs/streaming"}],["$","link","17",{"rel":"alternate","hrefLang":"pt","href":"https://muapi.ai/pt/docs/streaming"}],["$","link","18",{"rel":"alternate","hrefLang":"it","href":"https://muapi.ai/it/docs/streaming"}],["$","link","19",{"rel":"alternate","hrefLang":"ru","href":"https://muapi.ai/ru/docs/streaming"}],["$","link","20",{"rel":"alternate","hrefLang":"ar","href":"https://muapi.ai/ar/docs/streaming"}],["$","link","21",{"rel":"alternate","hrefLang":"id","href":"https://muapi.ai/id/docs/streaming"}],["$","link","22",{"rel":"alternate","hrefLang":"vi","href":"https://muapi.ai/vi/docs/streaming"}],["$","link","23",{"rel":"alternate","hrefLang":"tr","href":"https://muapi.ai/tr/docs/streaming"}],["$","link","24",{"rel":"alternate","hrefLang":"fa","href":"https://muapi.ai/fa/docs/streaming"}],["$","link","25",{"rel":"alternate","hrefLang":"nl","href":"https://muapi.ai/nl/docs/streaming"}],["$","link","26",{"rel":"alternate","hrefLang":"pl","href":"https://muapi.ai/pl/docs/streaming"}],["$","link","27",{"rel":"alternate","hrefLang":"th","href":"https://muapi.ai/th/docs/streaming"}],["$","link","28",{"rel":"alternate","hrefLang":"sv","href":"https://muapi.ai/sv/docs/streaming"}],["$","link","29",{"rel":"alternate","hrefLang":"x-default","href":"https://muapi.ai/docs/streaming"}],["$","meta","30",{"name":"format-detection","content":"telephone=no, address=no, email=no"}],["$","meta","31",{"property":"og:title","content":"Streaming API â€” Muapi Docs"}],["$","meta","32",{"property":"og:description","content":"MuAPI supports Server-Sent Events (SSE) streaming for LLM text generation endpoints. Streaming delivers tokens progressively as they are generated, enablin"}],["$","meta","33",{"property":"og:url","content":"https://muapi.ai/docs/streaming"}],["$","meta","34",{"property":"og:site_name","content":"Muapi"}],["$","meta","35",{"property":"og:image","content":"https://muapi.ai/og-default.png"}],["$","meta","36",{"property":"og:image:width","content":"1200"}],["$","meta","37",{"property":"og:image:height","content":"630"}],["$","meta","38",{"property":"og:image:alt","content":"Streaming API â€” Muapi Docs"}],["$","meta","39",{"property":"og:type","content":"website"}],["$","meta","40",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","41",{"name":"twitter:creator","content":"@vadooai"}],["$","meta","42",{"name":"twitter:title","content":"Streaming API â€” Muapi Docs"}],["$","meta","43",{"name":"twitter:description","content":"MuAPI supports Server-Sent Events (SSE) streaming for LLM text generation endpoints. Streaming delivers tokens progressively as they are generated, enablin"}],["$","meta","44",{"name":"twitter:image","content":"https://muapi.ai/og-default.png"}],["$","link","45",{"rel":"shortcut icon","href":"/icon.png"}],["$","link","46",{"rel":"icon","href":"/icon.png"}],["$","link","47",{"rel":"apple-touch-icon","href":"/icon.png"}]],"error":null,"digest":"$undefined"}
1e:{"metadata":"$16:metadata","error":null,"digest":"$undefined"}
