1import{j as e}from"./elevenlabs-CpW4MH00.js";import{u as x}from"./index-CdHZ8Cp1.js";import"./livekit-C6cR2JI6.js";import"./framer-motion-efzc2Ucs.js";const g="Public API â Talking Avatar Videos",f="Public self-serve API for generating talking-avatar videos from a photo and an audio file. Closed beta â no billing yet.<br/><br/>Base URL: <code>https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api</code>",k="Table of Contents",T="Authentication",w="Every request must include your API key in the <code>Authorization</code> header as a Bearer token. Keys are created in your account settings under <strong>Settings â Public API</strong>.",v="Authorization: Bearer plk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",j="Keep your key secret. If a key is compromised, revoke it immediately in Settings and generate a new one.",y="Create a video",P="Submit a photo and an audio file. The server queues a render job and returns a <code>job_id</code>. The actual processing is asynchronous.",_="Endpoint",R="POST /v1/avatar-videos",A="Request body (multipart/form-data)",S=["Field","Type","Required","Description"],$=[["photo","file","yes","PNG or JPEG. Must be exactly 720Ã1280 (portrait 9:16) or 1280Ã720 (landscape 16:9)."],["audio","file","yes","Audio file to drive lip-sync (MP3, WAV, OGG, M4A). Max 10 MB."],["webhook_url","string","no","URL to call when the job completes or fails. HMAC-SHA256 signed."],["prompt","string","no","Positive video prompt (scene, lighting, framing). Overrides the persona/built-in default for this render. Max 4000 chars. Omit to use the default."],["negative_prompt","string","no","Negative video prompt (artifacts to avoid). Overrides the persona/built-in default for this render. Max 4000 chars. Omit to use the default."],["watermark_text","string","no",'Optional promo/watermark text the worker burns into the final MP4 (e.g. "Created by VlogMe.AI"). Max 120 chars. Omit or empty â no watermark.']],E="cURL example",C="Replace <code>$API_KEY</code> with your actual key. The photo dimensions are validated server-side.",D=`curl -X POST "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos" \\ 2 -H "Authorization: Bearer $API_KEY" \\ 3 -F "[email protected]" \\ 4 -F "[email protected]" \\ 5 -F "webhook_url=https://your-site.com/webhook"`,H="Response (202 Accepted)",N="The job is queued. Use the returned <code>job_id</code> to poll status or receive a webhook.",M=`{ 6 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 7 "status": "queued", 8 "poll_url": "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890" 9}`,q='<strong>
9Photo dimensions are strictly enforced.</strong> If the uploaded photo is not exactly 720Ã1280 or 1280Ã720, the request returns <code>400 Bad Request</code> with <code>{"error": "Photo must be 720x1280 (portrait) or 1280x720 (landscape)"}</code>. No cropping or resizing is performed â your client must supply the correct size.',I="Multi-frame video (several photos + audios)",L="Build a single video from <strong>several photos</strong>, each with its own ordered list of audio chunks. The renderer plays all audios of frame <em>k</em> in order while showing photo <em>k</em>, then switches to photo <em>k+1</em> and plays its audios, and so on. Use this when you want the avatar to change between paragraphs/scenes without splitting into multiple jobs.",U="Endpoint",O="POST /v1/avatar-videos/multi",B="Request body (application/json)",G=["Field","Type","Required","Description"],V=[["frames","array","yes","One or more frames. Each frame: <code>{ image_url | image_base64, audios: [ {audio_url | audio_base64, subtitles?}, ... ] }</code>. All images must share the same orientation (all 720Ã1280 or all 1280Ã720)."],["frames[].image_url","string","one of","Public HTTPS URL of a PNG/JPEG, exactly 720Ã1280 or 1280Ã720, ⤠8 MB."],["frames[].image_base64","string","one of","Base64-encoded image (with or without <code>data:</code> prefix). Same size/format rules as image_url."],["frames[].audios","array","yes","1..20 audio chunks for this frame, in playback order. Each: <code>{audio_url | audio_base64, subtitles?}</code>. MP3/WAV/M4A, ⤠10 MB each."],["frames[].audios[].subtitles","object","no","Optional per-chunk word timings: <code>{ words: [{text, start, end}, ...] }</code> â <code>start</code>/<code>end</code> are seconds <em>relative to this audio chunk</em>. When provided, the worker burns captions in sync; when omitted, no captions are burned for that chunk."],["webhook_url","string","no","Same as the single-photo endpoint."],["prompt","string","no","Same as the single-photo endpoint. Max 4000 chars."],["negative_prompt","string","no","Same as the single-photo endpoint. Max 4000 chars."],["watermark_text","string","no","Same as the single-photo endpoint. Max 120 chars."],["face_restore","number","no","0..1 (default 0.5)."],["background_restore","number","no","0..1 (default 0.5)."]],W="cURL example",F=`curl -X POST "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/multi" \\ 10 -H "Authorization: Bearer $API_KEY" \\ 11 -H "Content-Type: application/json" \\ 12 -d '{ 13 "frames": [ 14 { 15 "image_url": "https://cdn.example.com/portrait_1.png", 16 "audios": [ 17 { "audio_url": "https://cdn.example.com/intro.mp3" }, 18 { "audio_url": "https://cdn.example.com/part1.mp3" } 19 ] 20 }, 21 { 22 "image_url": "https://cdn.example.com/portrait_2.png", 23 "audios": [ 24 { "audio_url": "https://cdn.example.com/part2.mp3" } 25 ] 26 } 27 ], 28 "webhook_url": "https://your-site.com/webhook" 29 }'`,z="Response (202 Accepted)",K="Returns the same poll URL contract as the single-photo endpoint. Use <code>GET /v1/avatar-videos/:id</code> to fetch the result.",X=`{ 30 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 31 "status": "queued", 32 "orientation": "portrait", 33 "frames": 2, 34 "chunks": 3, 35 "poll_url": "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890", 36 "webhook_url": "https://your-site.com/webhook" 37}`,Z="Notes & limits",J=["No upper limit on frames per job; <strong>20 audios</strong> per frame.","Total upload (all images + audios combined) is capped at <strong>150 MB</strong>.","All frame images must have the same orientation â mixing portrait and landscape inside one job returns 400.","Each <code>image_url</code> / <code>audio_url</code> is fetched server-side with a 20-second timeout. Use either URLs <strong>or</strong> base64 per asset.","Frames are played strictly in the order you send them. Within a frame, audios are concatenated in the order you send them.","Subt
37itles are optional per chunk â providing <code>words</code> for some chunks and omitting it for others is fine."],Y="Check status",Q="Poll the status of a job. When the job is <code>completed</code>, the response includes a signed URL to download the resulting MP4 video.",ee="Endpoint",te="GET /v1/avatar-videos/:id",oe="cURL example",se=`curl -H "Authorization: Bearer $API_KEY" \\ 38 "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890"`,ae="Response",re="The <code>video_url</code> field is present only when <code>status</code> is <code>completed</code>. It is a signed URL valid for 1 hour.",ne=`{ 39 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 40 "status": "completed", 41 "video_url": "https://...signed-url-to-mp4...", 42 "created_at": "2026-05-25T10:00:00.000Z", 43 "completed_at": "2026-05-25T10:02:15.000Z" 44} 45 46# While processing: 47{ 48 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 49 "status": "running", 50 "progress": 45, 51 "stage": "inference", 52 "created_at": "2026-05-25T10:00:00.000Z" 53}`,ie="Status values",ce=["Status","Meaning"],le=[["queued","Waiting for a worker to pick up the job."],["running","A worker is actively processing. Check <code>progress</code> and <code>stage</code>."],["completed","Done. <code>video_url</code> contains a signed download link."],["failed","Processing failed. <code>error</code> field contains a description."]],de="Webhooks",ue="If you provided a <code>webhook_url</code> when creating the job, the server sends a POST request there when the job reaches a terminal state (<code>completed</code> or <code>failed</code>). The payload is identical to the GET status response.",me="Webhook payload",pe="The body is a JSON object with the same fields as the GET status response.",he=`{ 54 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 55 "status": "completed", 56 "video_url": "https://...signed-url-to-mp4...", 57 "created_at": "2026-05-25T10:00:00.000Z", 58 "completed_at": "2026-05-25T10:02:15.000Z" 59}`,be="Signature verification",xe="Every webhook request includes an <code>X-Public-Api-Signature</code> header containing an HMAC-SHA256 hex digest of the raw JSON body, using your key's <strong>webhook_secret</strong>. Verify it to ensure the payload came from us.",ge=`import hmac 60import hashlib 61 62secret = b"your_webhook_secret" 63 64# Raw request body as bytes 65payload = request.body 66 67# Header value (hex string) 68signature = request.headers.get("X-Public-Api-Signature") 69 70expected = hmac.new(secret, payload, hashlib.sha256).hexdigest() 71if not hmac.compare_digest(expected, signature): 72 raise ValueError("Invalid webhook signature")`,fe="Webhook headers",ke=[{key:"Content-Type",desc:"application/json"},{key:"X-Public-Api-Signature",desc:"HMAC-SHA256 hex digest of the raw body, keyed with your webhook_secret."},{key:"User-Agent",desc:"PublicApiWebhook/1.0"}],Te="<strong>Fallback:</strong> If the webhook delivery fails (non-2xx response, timeout, or network error), the server retries up to 3 times with exponential backoff. If all retries fail, the job still completes and you can always poll the status endpoint.",we="Error codes",ve={400:"Bad Request â invalid photo dimensions, missing required field, or malformed multipart body.",401:"Unauthorized â missing, malformed, or revoked API key.",403:"Forbidden â key revoked or rate limit exceeded (60 req/min).",404:"Not Found â job ID does not exist or belongs to another key.",413:"Payload Too Large â photo or audio exceeds size limits.",429:"Too Many Requests â rate limit exceeded.",500:"Internal Server Error â unexpected failure. Retry with backoff."},je="Limits",ye="During the closed beta, the following limits apply:",Pe=["<strong>Rate limit:</strong> 60 requests per minute per API key.","<strong>Photo:</strong> exact 720Ã1280 (portrait) or 1280Ã720 (landscape). No cropping server-side.","<strong>Audio:</strong> max 10 MB. Supported formats: MP3, WAV, OGG, M4A.","<strong>Video output:</strong> MP4, H.264 + AAC. Portrait 720Ã1280 or landscape 1280Ã720, 30 FPS.","<strong>Webhook URL:</strong> must be publicly accessible HTTPS. Localhost and private IPs are rejected."],_e="Public API v1.0 â Closed Beta",Re={pageTitle:g,intro:f,tocTitle:k,authTitle:T,authDesc:w,authExample:v,authNote:j,createTitle:y,createDesc:P,createEndpoint:_,createEndpointCode:R,createParams:A,createParamsHeaders:S,createParamsRows:$,createCurlTitle:E,createCurlDesc:C,createCurl:D,createResponseTitle:H,createResponseDesc:N,createResponse:M,createPhotoWarning:q,multiTitle:I,multiDesc:L,multiEndpoint:U,multiEndpointCode:O,multiParams:B,multiParamsHeaders:G,multiParamsRows:V,multiCurlTitle:W,multiCurl:F,multiResponseTitle:z,multiResponseDesc:K,multiResponse:X,multiNotesTitle:Z,multiNotes:J,statusTitle:Y,statusDesc:Q,statusEndpoint:ee,statusEndpointCode:te,statusCurlTitle:oe,statusCurl:se,statusResponseTitle:ae,statusResponseDesc:re,statusResponse:ne,statusStatesTitle:ie,statusStatesHeaders:ce,statusStatesRows:le,webhooksTitle:de,webhooksDesc:ue,
72webhookPayloadTitle:me,webhookPayloadDesc:pe,webhookPayload:he,webhookSignatureTitle:be,webhookSignatureDesc:xe,webhookSignatureVerify:ge,webhookHeadersTitle:fe,webhookHeaders:ke,webhookFallback:Te,errorsTitle:we,errors:ve,limitsTitle:je,limitsDesc:ye,limitsList:Pe,footerVersion:_e},Ae="Public API â ÐовоÑÑÑие аваÑаÑÑ",Se="ÐÑблиÑнÑй self-serve API Ð´Ð»Ñ Ð³ÐµÐ½ÐµÑаÑии видео Ñ Ð³Ð¾Ð²Ð¾ÑÑÑими аваÑаÑами из ÑоÑо и аÑдио. ÐакÑÑÑÐ°Ñ Ð±ÐµÑа â биллинг пока не вклÑÑÑн.<br/><br/>Base URL: <code>https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api</code>",$e="СодеÑжание",Ee="ÐÑÑенÑиÑикаÑиÑ",Ce="ÐаждÑй запÑÐ¾Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ ÑодеÑжаÑÑ Ð²Ð°Ñ API-клÑÑ Ð² заголовке <code>Authorization</code> в ÑоÑмаÑе Bearer. ÐлÑÑи ÑоздаÑÑÑÑ Ð² наÑÑÑÐ¾Ð¹ÐºÐ°Ñ Ð°ÐºÐºÐ°ÑнÑа в Ñазделе <strong>Settings â Public API</strong>.",De="Authorization: Bearer plk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",He="Ð¥ÑаниÑе клÑÑ Ð² ÑекÑеÑе. ÐÑли клÑÑ ÑкомпÑомеÑиÑован â оÑзовиÑе его в наÑÑÑÐ¾Ð¹ÐºÐ°Ñ Ð¸ ÑоздайÑе новÑй.",Ne="Создание видео",Me="ÐÑпÑавÑÑе ÑоÑо и аÑдиоÑайл. СеÑÐ²ÐµÑ ÑÑÐ°Ð²Ð¸Ñ Ð·Ð°Ð´Ð°ÑÑ Ð² оÑеÑÐµÐ´Ñ Ð¸ возвÑаÑÐ°ÐµÑ <code>job_id</code>. ÐбÑабоÑка пÑоиÑÑ Ð¾Ð´Ð¸Ñ Ð°ÑÐ¸Ð½Ñ Ñонно.",qe="Endpoint",Ie="POST /v1/avatar-videos",Le="Тело запÑоÑа (multipart/form-data)",Ue=["Ðоле","Тип","ÐбÑзаÑелÑное","ÐпиÑание"],Oe=[["photo","file","да","PNG или JPEG. Ровно 720Ã1280 (поÑÑÑÐµÑ 9:16) или 1280Ã720 (ландÑаÑÑ 16:9)."],["audio","file","да","ÐÑдиоÑайл Ð´Ð»Ñ ÑÐ¸Ð½Ñ ÑонизаÑии гÑб (MP3, WAV, OGG, M4A). ÐÐ°ÐºÑ 10 ÐÐ."],["webhook_url","string","неÑ","URL Ð´Ð»Ñ ÑÐ²ÐµÐ´Ð¾Ð¼Ð»ÐµÐ½Ð¸Ñ Ð¾ завеÑÑении или оÑибке. ÐодпиÑан HMAC-SHA256."],["prompt","string","неÑ","ÐоложиÑелÑнÑй пÑÐ¾Ð¼Ð¿Ñ Ð´Ð»Ñ Ð²Ð¸Ð´ÐµÐ¾ (ÑÑена, ÑвеÑ, ÑакÑÑÑ). ÐеÑеопÑеделÑÐµÑ Ð¿ÑÐ¾Ð¼Ð¿Ñ Ð¿ÐµÑÑÐ¾Ð½Ñ Ð¸ вÑÑÑоенное знаÑение по ÑмолÑÐ°Ð½Ð¸Ñ Ð´Ð»Ñ ÑÑого ÑендеÑа. ÐÐ°ÐºÑ 4000 Ñимволов. ÐпÑÑÑиÑе â бÑÐ´ÐµÑ Ð¸ÑполÑзовано знаÑение по ÑмолÑаниÑ."],["negative_prompt","string","неÑ","ÐегаÑивнÑй пÑÐ¾Ð¼Ð¿Ñ Ð´Ð»Ñ Ð²Ð¸Ð´ÐµÐ¾ (ÑÑо избегаÑÑ). ÐеÑеопÑеделÑÐµÑ Ð¿ÑÐ¾Ð¼Ð¿Ñ Ð¿ÐµÑÑÐ¾Ð½Ñ Ð¸ вÑÑÑоенное знаÑение по ÑмолÑÐ°Ð½Ð¸Ñ Ð´Ð»Ñ ÑÑого ÑендеÑа. ÐÐ°ÐºÑ 4000 Ñимволов. ÐпÑÑÑиÑе â бÑÐ´ÐµÑ Ð¸ÑполÑзовано знаÑение по ÑмолÑаниÑ."],["watermark_text","string","неÑ","ÐеобÑзаÑелÑнÑй ÑекÑÑ-воÑеÑмаÑка/Ñеклама, коÑоÑÑй воÑÐºÐµÑ Ð²ÑÐ¸Ð²Ð°ÐµÑ Ð² ÑиналÑнÑй MP4 (напÑимеÑ, «Created by VlogMe.AI»). ÐÐ°ÐºÑ 120 Ñимволов. ÐпÑÑÑиÑе или пеÑедайÑе пÑÑÑÑÑ ÑÑÑÐ¾ÐºÑ â воÑеÑмаÑка не добавлÑеÑÑÑ."]],Be="cURL пÑимеÑ",Ge="ÐамениÑе <code>$API_KEY</code> на Ð²Ð°Ñ ÑеалÑнÑй клÑÑ. РазмеÑÑ ÑоÑо пÑовеÑÑÑÑÑÑ Ð½Ð° ÑеÑвеÑе.",Ve=`curl -X POST "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos" \\ 73 -H "Authorization: Bearer $API_KEY" \\ 74 -F "[email protected]" \\ 75 -F "[email protected]" \\ 76 -F "webhook_url=https://your-site.com/webhook"`,We="ÐÑÐ²ÐµÑ (202 Accepted)",Fe="ÐадаÑа поÑÑавлена в оÑеÑедÑ. ÐÑполÑзÑйÑе возвÑаÑÑннÑй <code>job_id</code> Ð´Ð»Ñ Ð¾Ð¿ÑоÑа ÑÑаÑÑÑа или полÑÑÐµÐ½Ð¸Ñ webhook.",ze=`{ 77 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 78 "status": "queued", 79 "poll_url": "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890" 80}`,Ke='<strong>РазмеÑÑ ÑоÑо ÑÑÑого конÑÑолиÑÑÑÑÑÑ.</strong> ÐÑли загÑÑженное ÑоÑо не Ñовно 720Ã1280 или 1280Ã720, запÑÐ¾Ñ Ð²ÐµÑнÑÑ <code>400 Bad Request</code> Ñ <code>{"error": "Photo must be 720x1280 (portrait) or 1280x720 (landscape)"}</code>. Ðа ÑеÑвеÑе не вÑполнÑеÑÑÑ Ð½Ð¸ÐºÐ°ÐºÐ°Ñ Ð¾Ð±Ñезка или ÑеÑайз â ÐºÐ»Ð¸ÐµÐ½Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ пÑиÑлаÑÑ ÑоÑо пÑавилÑного ÑазмеÑа.',Xe="Ðидео из неÑколÑÐºÐ¸Ñ ÐºÐ°Ð´Ñов (неÑколÑко ÑоÑо + аÑдио)",Ze="СобеÑиÑе одно видео из <strong>неÑколÑÐºÐ¸Ñ ÑоÑогÑаÑий</strong>, где Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ Ñвой ÑпоÑÑдоÑеннÑй ÑпиÑок аÑдио-Ñанков. РендеÑÐµÑ Ð¿ÑоигÑÐ°ÐµÑ Ð²Ñе аÑдио кадÑа <em>k</em> по поÑÑдкÑ, показÑÐ²Ð°Ñ ÑоÑо <em>k</em>, заÑем пеÑеклÑÑиÑÑÑ Ð½Ð° ÑоÑо <em>k+1</em> и пÑоигÑÐ°ÐµÑ ÐµÐ³Ð¾ аÑдио, и Ñак далее. Удобно, когда нÑжно менÑÑÑ Ð°Ð²Ð°ÑÐ°Ñ Ð¼ÐµÐ¶Ð´Ñ Ð°Ð±Ð·Ð°Ñами/ÑÑенами без дÑÐ¾Ð±Ð»ÐµÐ½Ð¸Ñ Ð½Ð° неÑколÑко задаÑ.",Je="Endpoint",Ye="POST /v1/avatar-videos/multi",Qe="Тело запÑоÑа (application/json)",et=["Ðоле","Тип","ÐбÑзаÑелÑное","ÐпиÑание"],tt=[["frames","array","да","Ðдин или болÑÑе кадÑов. ÐаждÑй: <code>{ image_url | image_base64, audios: [ {audio_url | audio_base64, subtitles?}, ... ] }</code>. ÐÑе каÑÑинки Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ Ð¾Ð´Ð½Ð¾Ð¹ оÑиенÑаÑии (вÑе 720Ã1280 либо вÑе 1280Ã720)."],["frames[].image_url","string","одно из","ÐÑблиÑнÑй HTTPS
80URL каÑÑинки PNG/JPEG, Ñовно 720Ã1280 или 1280Ã720, ⤠8 ÐÐ."],["frames[].image_base64","string","одно из","ÐаÑÑинка в base64 (Ñ Ð¿ÑеÑикÑом <code>data:</code> или без). ÐÑавила ÑазмеÑа/ÑоÑмаÑа Ñе же, ÑÑо Ñ image_url."],["frames[].audios","array","да","1..20 аÑдио-Ñанков Ð´Ð»Ñ ÑÑого кадÑа, в поÑÑдке воÑпÑоизведениÑ. ÐаждÑй: <code>{audio_url | audio_base64, subtitles?}</code>. MP3/WAV/M4A, ⤠10 ÐРкаждÑй."],["frames[].audios[].subtitles","object","неÑ","ÐпÑионалÑнÑе Ñайминги Ñлов Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑеÑного Ñанка: <code>{ words: [{text, start, end}, ...] }</code> â <code>start</code>/<code>end</code> в ÑекÑÐ½Ð´Ð°Ñ <em>оÑноÑиÑелÑно ÑÑого аÑдио</em>. ÐÑли пеÑÐµÐ´Ð°Ð½Ñ â воÑÐºÐµÑ Ð²ÑÐ¸Ð²Ð°ÐµÑ ÑÑбÑиÑÑÑ ÑÐ¸Ð½Ñ Ñонно; еÑли Ð½ÐµÑ â ÑÑбÑиÑÑÑ Ð´Ð»Ñ ÑÑого Ñанка не вÑиваÑÑÑÑ."],["webhook_url","string","неÑ","Ðак Ñ Ð¾Ð±ÑÑного endpoint."],["prompt","string","неÑ","Ðак Ñ Ð¾Ð±ÑÑного endpoint. ÐÐ°ÐºÑ 4000 Ñимволов."],["negative_prompt","string","неÑ","Ðак Ñ Ð¾Ð±ÑÑного endpoint. ÐÐ°ÐºÑ 4000 Ñимволов."],["watermark_text","string","неÑ","Ðак Ñ Ð¾Ð±ÑÑного endpoint. ÐÐ°ÐºÑ 120 Ñимволов."],["face_restore","number","неÑ","0..1 (по ÑмолÑÐ°Ð½Ð¸Ñ 0.5)."],["background_restore","number","неÑ","0..1 (по ÑмолÑÐ°Ð½Ð¸Ñ 0.5)."]],ot="cURL пÑимеÑ",st=`curl -X POST "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/multi" \\ 81 -H "Authorization: Bearer $API_KEY" \\ 82 -H "Content-Type: application/json" \\ 83 -d '{ 84 "frames": [ 85 { 86 "image_url": "https://cdn.example.com/portrait_1.png", 87 "audios": [ 88 { "audio_url": "https://cdn.example.com/intro.mp3" }, 89 { "audio_url": "https://cdn.example.com/part1.mp3" } 90 ] 91 }, 92 { 93 "image_url": "https://cdn.example.com/portrait_2.png", 94 "audios": [ 95 { "audio_url": "https://cdn.example.com/part2.mp3" } 96 ] 97 } 98 ], 99 "webhook_url": "https://your-site.com/webhook" 100 }'`,at="ÐÑÐ²ÐµÑ (202 Accepted)",rt="ÐозвÑаÑÐ°ÐµÑ ÑÐ¾Ñ Ð¶Ðµ конÑÑÐ°ÐºÑ Ñ poll URL, ÑÑо и обÑÑнÑй endpoint. ÐÐ»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ ÑезÑлÑÑаÑа иÑполÑзÑйÑе <code>GET /v1/avatar-videos/:id</code>.",nt=`{ 101 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 102 "status": "queued", 103 "orientation": "portrait", 104 "frames": 2, 105 "chunks": 3, 106 "poll_url": "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890", 107 "webhook_url": "https://your-site.com/webhook" 108}`,it="ÐамеÑки и лимиÑÑ",ct=["ÐимиÑа на ÑиÑло кадÑов в задаÑе неÑ; <strong>20 аÑдио</strong> на кадÑ.","СÑммаÑнÑй ÑÐ°Ð·Ð¼ÐµÑ Ð·Ð°Ð³ÑÑзки (вÑе каÑÑинки + аÑдио) огÑаниÑен <strong>150 ÐÐ</strong>.","ÐÑе каÑÑинки в одной задаÑе Ð´Ð¾Ð»Ð¶Ð½Ñ Ð±ÑÑÑ Ð¾Ð´Ð½Ð¾Ð¹ оÑиенÑаÑии â ÑмеÑение поÑÑÑеÑнÑÑ Ð¸ ландÑаÑÑнÑÑ Ð²ÐµÑнÑÑ 400.","ÐаждÑй <code>image_url</code> / <code>audio_url</code> ÑкаÑиваеÑÑÑ ÑеÑвеÑом Ñ ÑаймаÑÑом 20 ÑекÑнд. ÐÑполÑзÑйÑе либо URL, либо base64 Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ аÑÑеÑа.","ÐадÑÑ Ð¿ÑоигÑÑваÑÑÑÑ ÑÑÑого в Ñом поÑÑдке, в коÑоÑом Ð²Ñ Ð¸Ñ Ð¿ÑиÑлали. ÐнÑÑÑи кадÑа аÑдио ÑклеиваÑÑÑÑ Ð² Ñом поÑÑдке, в коÑоÑом они пеÑеданÑ.","СÑбÑиÑÑÑ Ð¾Ð¿ÑионалÑÐ½Ñ Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ Ñанка â можно Ð´Ð»Ñ Ð¾Ð´Ð½Ð¸Ñ Ñанков пеÑедаÑÑ <code>words</code>, а Ð´Ð»Ñ Ð´ÑÑÐ³Ð¸Ñ Ð¾Ð¿ÑÑÑиÑÑ."],lt="ÐÑовеÑка ÑÑаÑÑÑа",dt="ÐпÑоÑиÑе ÑÑаÑÑÑ Ð·Ð°Ð´Ð°Ñи. Ðогда ÑÑаÑÑÑ <code>completed</code>, в оÑвеÑе бÑÐ´ÐµÑ Ð¿Ð¾Ð´Ð¿Ð¸ÑÐ°Ð½Ð½Ð°Ñ ÑÑÑлка Ð´Ð»Ñ ÑкаÑÐ¸Ð²Ð°Ð½Ð¸Ñ Ð¸Ñогового MP4-видео.",ut="Endpoint",mt="GET /v1/avatar-videos/:id",pt="cURL пÑимеÑ",ht=`curl -H "Authorization: Bearer $API_KEY" \\ 109 "https://nfqxajdgklseicehjolk.supabase.co/functions/v1/public-api/v1/avatar-videos/a1b2c3d4-e5f6-7890-abcd-ef1234567890"`,bt="ÐÑвеÑ",xt="Ðоле <code>video_url</code> пÑиÑÑÑÑÑвÑÐµÑ ÑолÑко пÑи <code>status: completed</code>. ÐÑо подпиÑÐ°Ð½Ð½Ð°Ñ ÑÑÑлка, дейÑÑвиÑелÑÐ½Ð°Ñ 1 ÑаÑ.",gt=`{ 110 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 111 "status": "completed", 112 "video_url": "https://...signed-url-to-mp4...", 113 "created_at": "2026-05-25T10:00:00.000Z", 114 "completed_at": "2026-05-25T10:02:15.000Z" 115} 116 117# РпÑоÑеÑÑе обÑабоÑки: 118{ 119 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 120 "status": "running", 121 "progress": 45, 122 "stage": "inference", 123 "created_at": "2026-05-25T10:00:00.000Z" 124}`,ft="ÐнаÑÐµÐ½Ð¸Ñ ÑÑаÑÑÑа",kt=["СÑаÑÑÑ","ÐнаÑение"],Tt=[["queued","ÐÐ¶Ð¸Ð´Ð°ÐµÑ Ð² оÑеÑеди. Ð
124оÑÐºÐµÑ ÐµÑÑ Ð½Ðµ взÑл задаÑÑ."],["running","ÐоÑÐºÐµÑ Ð¾Ð±ÑабаÑÑваеÑ. СмоÑÑиÑе <code>progress</code> и <code>stage</code>."],["completed","ÐоÑово. Ðоле <code>video_url</code> ÑодеÑÐ¶Ð¸Ñ Ð¿Ð¾Ð´Ð¿Ð¸ÑаннÑÑ ÑÑÑÐ»ÐºÑ Ð½Ð° ÑкаÑивание."],["failed","ÐÑибка обÑабоÑки. Ðоле <code>error</code> ÑодеÑÐ¶Ð¸Ñ Ð¾Ð¿Ð¸Ñание."]],wt="ÐÐµÐ±Ñ Ñки",vt="ÐÑли пÑи Ñоздании задаÑи Ð²Ñ Ñказали <code>webhook_url</code>, ÑеÑÐ²ÐµÑ Ð¾ÑпÑÐ°Ð²Ð¸Ñ POST-запÑÐ¾Ñ ÑÑда, когда задаÑа доÑÑÐ¸Ð³Ð½ÐµÑ ÐºÐ¾Ð½ÐµÑного ÑÑаÑÑÑа (<code>completed</code> или <code>failed</code>). Тело запÑоÑа иденÑиÑно оÑвеÑÑ GET status.",jt="Payload Ð²ÐµÐ±Ñ Ñка",yt="Тело запÑоÑа â JSON-обÑÐµÐºÑ Ñ Ñеми же полÑми, ÑÑо и в оÑвеÑе GET status.",Pt=`{ 125 "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", 126 "status": "completed", 127 "video_url": "https://...signed-url-to-mp4...", 128 "created_at": "2026-05-25T10:00:00.000Z", 129 "completed_at": "2026-05-25T10:02:15.000Z" 130}`,_t="ÐÑовеÑка подпиÑи",Rt="ÐаждÑй запÑÐ¾Ñ Ð²ÐµÐ±Ñ Ñка ÑодеÑÐ¶Ð¸Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²Ð¾Ðº <code>X-Public-Api-Signature</code> Ñ HMAC-SHA256 hex-дайджеÑÑом ÑÑÑого JSON-Ñела, вÑÑиÑленнÑм Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ <strong>webhook_secret</strong> ваÑего клÑÑа. ÐÑовеÑÑйÑе его, ÑÑÐ¾Ð±Ñ ÑбедиÑÑÑÑ, ÑÑо даннÑе пÑиÑли Ð¾Ñ Ð½Ð°Ñ.",At=`import hmac 131import hashlib 132 133secret = b"your_webhook_secret" 134 135# СÑÑое Ñело запÑоÑа в байÑÐ°Ñ 136payload = request.body 137 138# ÐнаÑение заголовка (hex-ÑÑÑока) 139signature = request.headers.get("X-Public-Api-Signature") 140 141expected = hmac.new(secret, payload, hashlib.sha256).hexdigest() 142if not hmac.compare_digest(expected, signature): 143 raise ValueError("Invalid webhook signature")`,St="Ðаголовки Ð²ÐµÐ±Ñ Ñка",$t=[{key:"Content-Type",desc:"application/json"},{key:"X-Public-Api-Signature",desc:"HMAC-SHA256 hex-дайджеÑÑ ÑÑÑого Ñела, клÑÑ â Ð²Ð°Ñ webhook_secret."},{key:"User-Agent",desc:"PublicApiWebhook/1.0"}],Et="<strong>Fallback:</strong> ÐÑли доÑÑавка Ð²ÐµÐ±Ñ Ñка не ÑдалаÑÑ (не-2xx оÑвеÑ, ÑаймаÑÑ Ð¸Ð»Ð¸ ÑеÑÐµÐ²Ð°Ñ Ð¾Ñибка), ÑеÑÐ²ÐµÑ Ð¿Ð¾Ð²ÑоÑÑÐµÑ Ð´Ð¾ 3 Ñаз Ñ ÑкÑпоненÑиалÑнÑм оÑкладÑванием. ÐÑли вÑе попÑÑки пÑовалилиÑÑ â задаÑа вÑÑ Ñавно завеÑÑиÑÑÑ, и Ð²Ñ Ð²Ñегда можеÑе опÑоÑиÑÑ status endpoint.",Ct="ÐÐ¾Ð´Ñ Ð¾Ñибок",Dt={400:"Bad Request â невеÑнÑе ÑазмеÑÑ ÑоÑо, оÑÑÑÑÑÑвÑÐµÑ Ð¾Ð±ÑзаÑелÑное поле или некоÑÑекÑное multipart-Ñело.",401:"Unauthorized â оÑÑÑÑÑÑвÑеÑ, повÑеждÑн или оÑозван API-клÑÑ.",403:"Forbidden â клÑÑ Ð¾Ñозван или пÑевÑÑен Ð»Ð¸Ð¼Ð¸Ñ Ð·Ð°Ð¿ÑоÑов (60 в минÑÑÑ).",404:"Not Found â задаÑа Ñ Ñаким ID не ÑÑÑеÑÑвÑÐµÑ Ð¸Ð»Ð¸ пÑÐ¸Ð½Ð°Ð´Ð»ÐµÐ¶Ð¸Ñ Ð´ÑÑÐ³Ð¾Ð¼Ñ ÐºÐ»ÑÑÑ.",413:"Payload Too Large â ÑоÑо или аÑдио пÑевÑÑаÑÑ Ð»Ð¸Ð¼Ð¸Ñ ÑазмеÑа.",429:"Too Many Requests â пÑевÑÑен rate limit.",500:"Internal Server Error â Ð½ÐµÐ¾Ð¶Ð¸Ð´Ð°Ð½Ð½Ð°Ñ Ð¾Ñибка. ÐовÑоÑиÑе Ñ backoff."},Ht="ÐгÑаниÑениÑ",Nt="РзакÑÑÑой беÑе дейÑÑвÑÑÑ ÑледÑÑÑие лимиÑÑ:",Mt=["<strong>Rate limit:</strong> 60 запÑоÑов в минÑÑÑ Ð½Ð° один API-клÑÑ.","<strong>ФоÑо:</strong> Ñовно 720Ã1280 (поÑÑÑеÑ) или 1280Ã720 (ландÑаÑÑ). ÐбÑезка на ÑеÑвеÑе не пÑоизводиÑÑÑ.","<strong>ÐÑдио:</strong> Ð¼Ð°ÐºÑ 10 ÐÐ. ÐоддеÑживаемÑе ÑоÑмаÑÑ: MP3, WAV, OGG, M4A.","<strong>Ðидео на вÑÑ Ð¾Ð´Ðµ:</strong> MP4, H.264 + AAC. ÐоÑÑÑÐµÑ 720Ã1280 или ландÑаÑÑ 1280Ã720, 30 FPS.","<strong>Webhook URL:</strong> должен бÑÑÑ Ð¿ÑблиÑно доÑÑÑпен по HTTPS. Localhost и пÑиваÑнÑе IP оÑклонÑÑÑÑÑ."],qt="Public API v1.0 â Closed Beta",It={pageTitle:Ae,intro:Se,tocTitle:$e,authTitle:Ee,authDesc:Ce,authExample:De,authNote:He,createTitle:Ne,createDesc:Me,createEndpoint:qe,createEndpointCode:Ie,createParams:Le,createParamsHeaders:Ue,createParamsRows:Oe,createCurlTitle:Be,createCurlDesc:Ge,createCurl:Ve,createResponseTitle:We,createResponseDesc:Fe,createResponse:ze,createPhotoWarning:Ke,multiTitle:Xe,multiDesc:Ze,multiEndpoint:Je,multiEndpointCode:Ye,multiParams:Qe,multiParamsHeaders:et,multiParamsRows:tt,multiCurlTitle:ot,multiCurl:st,multiResponseTitle:at,multiResponseDesc:rt,multiResponse:nt,multiNotesTitle:it,multiNotes:ct,statusTitle:lt,statusDesc:dt,statusEndpoint:ut,statusEndpointCode:mt,statusCurlTitle:pt,statusCurl:ht,statusResponseTitle:bt,statusResponseDesc:xt,statusResponse:gt,statusStatesTitle:ft,statusStatesHeaders:kt,statusStatesRows:Tt,webhooksTitle:wt,webhooksDesc:vt,webhookPayloadTitle:jt,webhookPayloadDesc:yt,webhookPayload:Pt,webhookSignatureTitle:_t,webhookSignatureDesc:Rt,webhookSignatureVerify:At,webhookHeadersTitle:St,webhookHeaders:$t,webhookFallback:Et,errorsTitle:Ct,errors:Dt,limitsTitle:Ht,limitsDesc:Nt,limitsList:Mt,footerVersion:qt},n=({children:r})=>e.jsx("pre",{className:"rounded-lg border border-border bg-muted/50 p-3 text-[13px] leading-relaxed font-mono text-foreground whitespace-pre overflow-x-auto mb-4",children:r}),u=({headers:r,rows:i})=>e.jsx("div",{className:"overflow-x-auto rounded-lg border border-border mb-4",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-muted/50 border-b border-border",children:r.map(t=>e.jsx("th",{className:"px-3 py-2 text-left font-semibold text-foreground",children:t},t))})}),e.jsx("tbody",{children:i.map((t,m)=>e.jsx("tr",{className:"border-b border-border last:border-0",children:t.map((d,o)=>e.jsx("td",{className:"px-3 py-2 text-muted-foreground font-mono text-xs",children:d},o))},m))})]})}),c=({id:r,children:i})=>e.jsx("h2",{id:r,className:"text-lg font-bold text-foreground mt-10 mb-3 border-b border-border pb-2 scroll-mt-6",children:i}),s=({id:r,children:i})=>e.jsx("h3",{id:r,className:"text-base font-semibold text-foreground mt-6 mb-2 scroll-mt-6",children:i}),a=({html:r})=>e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-3",dangerouslySetInnerHTML:{__html:r}}
143),b=({items:r})=>e.jsx("ul",{className:"list-disc list-inside text-sm text-muted-foreground space-y-1.5 mb-4 ml-1",children:r.map((i,t)=>e.jsx("li",{dangerouslySetInnerHTML:{__html:i}},t))}),p=({children:r,variant:i="default"})=>{const t={default:"bg-amber-500/10 border-amber-500/30",warning:"bg-destructive/5 border-destructive/30",info:"bg-primary/5 border-primary/30"};return e.jsx("div",{className:`${t[i]} border rounded-lg p-4 mb-4 space-y-2`,children:r})};function Gt(){const{i18n:r}=x(),i=r.language==="ru"?It:Re,t=(o,l)=>{const h=i[o];return h!==void 0?h:o},m=t("errors"),d=t("webhookHeaders");return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-10 space-y-1",children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground mb-1",children:t("pageTitle")}),e.jsx(a,{html:t("intro")}),e.jsxs("nav",{className:"rounded-lg border border-border bg-muted/30 p-4 mb-6",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground mb-2",children:t("tocTitle")}),e.jsx("ul",{className:"columns-2 gap-x-6 text-sm space-y-1",children:[["auth","authTitle"],["create","createTitle"],["multi","multiTitle"],["status","statusTitle"],["webhooks","webhooksTitle"],["errors","errorsTitle"],["limits","limitsTitle"]].map(([o,l])=>e.jsx("li",{children:e.jsx("a",{href:`#${o}`,className:"text-primary hover:underline",children:t(l)})},o))})]}),e.jsx(c,{id:"auth",children:t("authTitle")}),e.jsx(a,{html:t("authDesc")}),e.jsx(n,{children:t("authExample")}),e.jsx(p,{variant:"info",children:e.jsx(a,{html:t("authNote")})}),e.jsx(c,{id:"create",children:t("createTitle")}),e.jsx(a,{html:t("createDesc")}),e.jsx(s,{children:t("createEndpoint")}),e.jsx(n,{children:t("createEndpointCode")}),e.jsx(s,{children:t("createParams")}),e.jsx(u,{headers:t("createParamsHeaders"),rows:t("createParamsRows")}),e.jsx(s,{children:t("createCurlTitle")}),e.jsx(a,{html:t("createCurlDesc")}),e.jsx(n,{children:t("createCurl")}),e.jsx(s,{children:t("createResponseTitle")}),e.jsx(a,{html:t("createResponseDesc")}),e.jsx(n,{children:t("createResponse")}),e.jsx(p,{variant:"warning",children:e.jsx(a,{html:t("createPhotoWarning")})}),e.jsx(c,{id:"multi",children:t("multiTitle")}),e.jsx(a,{html:t("multiDesc")}),e.jsx(s,{children:t("multiEndpoint")}),e.jsx(n,{children:t("multiEndpointCode")}),e.jsx(s,{children:t("multiParams")}),e.jsx(u,{headers:t("multiParamsHeaders"),rows:t("multiParamsRows")}),e.jsx(s,{children:t("multiCurlTitle")}),e.jsx(n,{children:t("multiCurl")}),e.jsx(s,{children:t("multiResponseTitle")}),e.jsx(a,{html:t("multiResponseDesc")}),e.jsx(n,{children:t("multiResponse")}),e.jsx(s,{children:t("multiNotesTitle")}),(()=>{const o=t("multiNotes");return Array.isArray(o)?e.jsx(b,{items:o}):null})(),e.jsx(c,{id:"status",children:t("statusTitle")}),e.jsx(a,{html:t("statusDesc")}),e.jsx(s,{children:t("statusEndpoint")}),e.jsx(n,{children:t("statusEndpointCode")}),e.jsx(s,{children:t("statusCurlTitle")}),e.jsx(n,{children:t("statusCurl")}),e.jsx(s,{children:t("statusResponseTitle")}),e.jsx(a,{html:t("statusResponseDesc")}),e.jsx(n,{children:t("statusResponse")}),e.jsx(s,{children:t("statusStatesTitle")}),e.jsx(u,{headers:t("statusStatesHeaders"),rows:t("statusStatesRows")}),e.jsx(c,{id:"webhooks",children:t("webhooksTitle")}),e.jsx(a,{html:t("webhooksDesc")}),e.jsx(s,{children:t("webhookPayloadTitle")}),e.jsx(a,{html:t("webhookPayloadDesc")}),e.jsx(n,{children:t("webhookPayload")}),e.jsx(s,{children:t("webhookSignatureTitle")}),e.jsx(a,{html:t("webhookSignatureDesc")}),e.jsx(n,{children:t("webhookSignatureVerify")}),e.jsx(s,{children:t("webhookHeadersTitle")}),Array.isArray(d)&&d.map((o,l)=>e.jsxs("div",{className:"flex gap-3 items-baseline mb-2",children:[e.jsx("code",{className:"text-xs font-mono font-bold text-foreground shrink-0",children:o.key}),e.jsx("span",{className:"text-xs text-muted-foreground",children:o.desc})]},l)),e.jsx(p,{variant:"info",children:e.jsx(a,{html:t("webhookFallback")})}),e.jsx(c,{id:"errors",children:t("errorsTitle")}),e.jsx(u,{headers:["HTTP",""],rows:Object.entries(m).map(([o,l])=>[o,l])}),e.jsx(c,{id:"limits",children:t("limitsTitle")}),e.jsx(a,{html:t("limitsDesc")}),(()=>{const o=t("limitsList");return Array.isArray(o)?e.jsx(b,{items:o}):null})(),e.jsx("div",{className:"pt-6 border-t border-border mt-8",children:e.jsx("p",{className:"text-xs text-muted-foreground",children:t("footerVersion")})})]})})}export{Gt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.