{"openapi":"3.1.0","info":{"title":"Mirage Video API","description":"API for AI-powered video generation","version":"0.0.1"},"paths":{"/v1/videos":{"post":{"tags":["Videos"],"summary":"Create Video","operationId":"create_video_generation_v1_videos_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_video_generation_v1_videos_post"}}}},"responses":{"200":{"description":"Returns a Video object representing the generation job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MAVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Videos"],"summary":"List Videos","description":"List videos for the authenticated API key with optional pagination.\n\n- Filters by the calling user's ID (and org if present)\n- Ordered by creation time ascending or descending\n- Supports cursor pagination using the `after` video ID","operationId":"list_videos_v1_videos_get","parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return items strictly after this video ID","title":"After"},"description":"Return items strictly after this video ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max number of items to return","default":20,"title":"Limit"},"description":"Max number of items to return"},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","description":"Sort order by creation time","default":"desc","title":"Order"},"description":"Sort order by creation time"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MAVideo"},"title":"Response List Videos V1 Videos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/{video_id}":{"get":{"tags":["Videos"],"summary":"Retrieve Video","description":"Get the status of a video.","operationId":"get_video_status_v1_videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Returns a Video object with the current generation status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MAVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/{video_id}/content":{"get":{"tags":["Videos"],"summary":"Retrieve Video Content","description":"Download the video file (redirects to video URL).","operationId":"get_video_content_v1_videos__video_id__content_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/captions":{"post":{"tags":["Video Captions"],"summary":"Add Captions to a Video","description":"Create a captioned video from either an uploaded video file or an existing video ID.\n\nYou must provide exactly one of:\n- `video`: A video file upload (.mp4 or .mov), max 50mb\n- `video_id`: An existing video ID to add captions to\n\nIf providing `video_id`, the source video must have status COMPLETE before it can be captioned.\n\nTo fetch the captioned video, use the `GET videos/{video_id}` endpoint.","operationId":"create_captioned_video_v1_videos_captions_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_captioned_video_v1_videos_captions_post"}}}},"responses":{"200":{"description":"Returns a Video object representing the captioning job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MAVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/captions/templates":{"get":{"tags":["Video Captions"],"summary":"List Caption Templates","description":"List available caption style templates.\n\nReturns a paginated list of templates that can be used when creating captioned videos.","operationId":"list_caption_templates_v1_videos_captions_templates_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max number of items to return","default":20,"title":"Limit"},"description":"Max number of items to return"},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Return items strictly after this template ID","title":"After"},"description":"Return items strictly after this template ID"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Returns a paginated list of available caption templates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MACaptionTemplateList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/videos/captions/templates/{template_id}":{"get":{"tags":["Video Captions"],"summary":"Retrieve Caption Template","operationId":"get_caption_template_v1_videos_captions_templates__template_id__get","parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","title":"Template Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Returns a caption template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MACaptionTemplate"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/text-to-speech/{voice_id}":{"post":{"tags":["Audio"],"summary":"Generate Speech from Text","description":"Generate speech from text using the specified voice and model.\n\nThis endpoint synchronously generates audio and returns the binary data directly.\nThe request will block until the TTS generation is complete.","operationId":"generate_text_to_speech_v1_audio_text_to_speech__voice_id__post","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","description":"Voice ID to use for TTS generation","title":"Voice Id"},"description":"Voice ID to use for TTS generation"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSRequest"}}}},"responses":{"200":{"description":"Returns the generated audio file as binary data","content":{"application/json":{"schema":{}},"audio/wav":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/text_overlays":{"post":{"tags":["Meta Text Overlays"],"summary":"Create Meta Text Overlay","operationId":"create_meta_text_overlay_v1_meta_text_overlays_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_meta_text_overlay_v1_meta_text_overlays_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaTextOverlay"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/text_overlays/{text_overlay_id}":{"get":{"tags":["Meta Text Overlays"],"summary":"Retrieve Meta Text Overlay","operationId":"get_meta_text_overlay_v1_meta_text_overlays__text_overlay_id__get","parameters":[{"name":"text_overlay_id","in":"path","required":true,"schema":{"type":"string","title":"Text Overlay Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API Key for authentication","title":"X-Api-Key"},"description":"API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaTextOverlay"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api-keys/generate":{"post":{"tags":["internal"],"summary":"Create Api Key","description":"Create a new API key for a user.\n\nThis endpoint requires internal API key authentication.\nThe returned API key should be saved securely as it cannot be retrieved again.","operationId":"create_api_key_internal_api_keys_generate_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api-keys/{key_id}":{"post":{"tags":["internal"],"summary":"Revoke Api Key","operationId":"revoke_api_key_internal_api_keys__key_id__post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Api Key Internal Api Keys Key Id Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api-keys/user/{user_id}":{"get":{"tags":["internal"],"summary":"List User Api Keys","operationId":"list_user_api_keys_internal_api_keys_user__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Organization ID to filter by","title":"Org Id"},"description":"Organization ID to filter by"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyInfo"},"title":"Response List User Api Keys Internal Api Keys User User Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/videos":{"post":{"tags":["internal"],"summary":"Create Video","operationId":"create_video_internal_videos_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API key or internal API key for authentication","title":"X-Api-Key"},"description":"API key or internal API key for authentication"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_video_internal_videos_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MAVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/videos/{video_id}":{"get":{"tags":["internal"],"summary":"Get Video","operationId":"get_video_internal_videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"API key or internal API key for authentication","title":"X-Api-Key"},"description":"API key or internal API key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MAVideo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/rate-limits/overrides":{"post":{"tags":["internal"],"summary":"Create Rate Limit Override","description":"Create a new rate limit override for an org or user.\n\nThis endpoint requires internal API key authentication.\n\nExample request:\n```json\n{\n \"identifier\": \"org:org_123\",\n \"endpointLimits\": {\n \"generation\": {\n \"maxTokens\": 100,\n \"refillRatePerSecond\": 5.0\n },\n \"status\": {\n \"maxTokens\": 200,\n \"refillRatePerSecond\": 50.0\n }\n },\n \"note\": \"Enterprise plan with higher limits\"\n}\n```","operationId":"create_rate_limit_override_internal_rate_limits_overrides_post","parameters":[{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitOverrideCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal"],"summary":"List Rate Limit Overrides","description":"List all rate limit overrides, optionally filtered by type.\n\nQuery parameters:\n- override_type: 'org' or 'user' to filter results\n- limit: Maximum number of results (default: 100, max: 1000)","operationId":"list_rate_limit_overrides_internal_rate_limits_overrides_get","parameters":[{"name":"override_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: 'org' or 'user'. If not provided, returns all overrides.","title":"Override Type"},"description":"Filter by type: 'org' or 'user'. If not provided, returns all overrides."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"description":"Maximum number of results","default":100,"title":"Limit"},"description":"Maximum number of results"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RateLimitOverrideResponse"},"title":"Response List Rate Limit Overrides Internal Rate Limits Overrides Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/rate-limits/overrides/{identifier}":{"get":{"tags":["internal"],"summary":"Get Rate Limit Override","description":"Get a rate limit override by identifier.\n\nIdentifier format: 'org:' or 'user:'\n\nExample: /internal/rate-limits/overrides/org:org_123","operationId":"get_rate_limit_override_internal_rate_limits_overrides__identifier__get","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal"],"summary":"Update Rate Limit Override","description":"Update an existing rate limit override.\n\nOnly the fields provided in the request will be updated.","operationId":"update_rate_limit_override_internal_rate_limits_overrides__identifier__put","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitOverrideUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitOverrideResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal"],"summary":"Delete Rate Limit Override","description":"Delete a rate limit override.\n\nAfter deletion, the org/user will fall back to default rate limits.","operationId":"delete_rate_limit_override_internal_rate_limits_overrides__identifier__delete","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/rate-limits/overrides/{identifier}/invalidate-cache":{"post":{"tags":["internal"],"summary":"Invalidate Rate Limit Override Cache","description":"Manually invalidate the cache for a specific rate limit override.\n\nUseful for debugging or forcing a cache refresh.","operationId":"invalidate_rate_limit_override_cache_internal_rate_limits_overrides__identifier__invalidate_cache_post","parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string","description":"Internal API Key for authentication","title":"X-Api-Key"},"description":"Internal API Key for authentication"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"tags":["root"],"summary":"Root","description":"Root endpoint providing API information and navigation","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ApiKeyInfo":{"properties":{"key_id":{"type":"string","title":"Key Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"key_prefix":{"type":"string","title":"Key Prefix"},"key_suffix":{"type":"string","title":"Key Suffix"}},"type":"object","required":["key_id","name","created_at","last_used_at","key_prefix","key_suffix"],"title":"ApiKeyInfo"},"Body_create_captioned_video_v1_videos_captions_post":{"properties":{"caption_template_id":{"type":"string","title":"Caption Template Id","description":"Caption style template ID","examples":["ctpl_yvE0ZnYzEj6ClCD2ee1f"]},"video":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Video","description":"Video file to caption (MP4, MOV). Must be 9:16 aspect ratio. Max 50mb. Either `video` or `video_id` must be provided."},"video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Id","description":"Existing video ID to add captions to. Either `video` or `video_id` must be provided."}},"type":"object","required":["caption_template_id"],"title":"Body_create_captioned_video_v1_videos_captions_post"},"Body_create_meta_text_overlay_v1_meta_text_overlays_post":{"properties":{"video":{"type":"string","contentMediaType":"application/octet-stream","title":"Video","description":"Source video file (MP4 or MOV). Upload once and render up to 4 related text variants against the same input video."},"texts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Texts","description":"Ordered text variants to render as static overlays for the uploaded video (max 4)."},"items":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Items","description":"Optional JSON array of item objects. Each item must contain text and may contain style.font, style.size, and style.color."},"fonts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fonts","description":"Optional ordered font overrides aligned by index with texts. Blank items mean auto-decide."},"sizes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sizes","description":"Optional ordered font size overrides in pixels aligned by index with texts. Blank items mean auto-decide."},"colors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Colors","description":"Optional ordered text color overrides (#RRGGBB) aligned by index with texts. Blank items mean auto-decide."}},"type":"object","required":["video"],"title":"Body_create_meta_text_overlay_v1_meta_text_overlays_post"},"Body_create_video_generation_v1_videos_post":{"properties":{"audio_reference":{"type":"string","contentMediaType":"application/octet-stream","title":"Audio Reference","description":"Audio file (WAV or MP3)"},"image_reference":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Image Reference","description":"Image appearance reference (JPEG or PNG)."},"model":{"type":"string","const":"mirage-video-1-latest","title":"Model","description":"Model to use for generation","default":"mirage-video-1-latest"}},"type":"object","required":["audio_reference","image_reference"],"title":"Body_create_video_generation_v1_videos_post"},"Body_create_video_internal_videos_post":{"properties":{"input_media_files":{"anyOf":[{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array"},{"type":"null"}],"title":"Input Media Files","description":"Optional media files to seed into the generated video. Supported media: images, videos, and audio."},"input_media_file_descriptions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Media File Descriptions","description":"Optional descriptions aligned by index with input_media_files."},"input_media_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Media Urls","description":"Optional HTTP(S) media URLs to seed into the generated video."},"input_media_url_descriptions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Media Url Descriptions","description":"Optional descriptions aligned by index with input_media_urls."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Optional generation prompt."},"video_style_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Style Id","description":"Optional video style ID."}},"type":"object","title":"Body_create_video_internal_videos_post"},"CreateApiKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional friendly name for the key"}},"type":"object","title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key","description":"The newly created API key (show only once)"},"key_id":{"type":"string","title":"Key Id","description":"The key ID for management purposes"}},"type":"object","required":["api_key","key_id"],"title":"CreateApiKeyResponse"},"EndpointLimitsOverride":{"properties":{"generation":{"anyOf":[{"$ref":"#/components/schemas/EndpointRateLimitConfig"},{"type":"null"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/EndpointRateLimitConfig"},{"type":"null"}]},"videoCaptionsSubmit":{"anyOf":[{"$ref":"#/components/schemas/EndpointRateLimitConfig"},{"type":"null"}]},"metaTextOverlaySubmit":{"anyOf":[{"$ref":"#/components/schemas/EndpointRateLimitConfig"},{"type":"null"}]},"metaTextOverlayPoll":{"anyOf":[{"$ref":"#/components/schemas/EndpointRateLimitConfig"},{"type":"null"}]}},"type":"object","title":"EndpointLimitsOverride","description":"Rate limit overrides for specific endpoints"},"EndpointRateLimitConfig":{"properties":{"max_tokens":{"type":"integer","title":"Max Tokens"},"refill_rate_per_second":{"type":"number","title":"Refill Rate Per Second"}},"type":"object","required":["max_tokens","refill_rate_per_second"],"title":"EndpointRateLimitConfig","description":"Rate limit configuration for a specific endpoint"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MACaptionTemplate":{"properties":{"id":{"type":"string","title":"Id","description":"Unique template identifier","examples":["ctpl_123456789abcdefg"]},"object":{"type":"string","const":"caption_template","title":"Object","default":"caption_template"},"name":{"type":"string","title":"Name","description":"Human-readable template name","examples":["Bold White"]},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url","description":"URL to a preview video of the template","examples":["https://captions-cdn.xyz/studio-assets/captions-style-previews/1FA3A381-5DDF-4ECD-936B-63D7CF16DEB0.mp4"]},"created_at":{"type":"integer","title":"Created At","description":"When the template was created (unix timestamp)","examples":[1730000000]}},"type":"object","required":["id","name","created_at"],"title":"MACaptionTemplate","description":"Represents a caption style template"},"MACaptionTemplateList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MACaptionTemplate"},"type":"array","title":"Data","description":"List of caption templates"},"object":{"type":"string","const":"list","title":"Object","default":"list"},"has_more":{"type":"boolean","title":"Has More","description":"Whether there are more templates after this page"}},"type":"object","required":["data","has_more"],"title":"MACaptionTemplateList","description":"Paginated list of caption templates"},"MAVideo":{"properties":{"id":{"type":"string","title":"Id","description":"Video generation job ID","examples":["video_abc123def456"]},"object":{"type":"string","const":"video","title":"Object","default":"video"},"status":{"type":"string","enum":["PROCESSING","COMPLETE","FAILED","CANCELLED"],"title":"Status","description":"Current state of the video","examples":["COMPLETE"]},"created_at":{"type":"integer","title":"Created At","description":"When the video was created (unix timestamp)","examples":[1730822400]},"completed_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed At","description":"When processing completed (unix timestamp)","examples":[1730822520]},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress","description":"Progress percentage (0-100)","examples":[100]},"error":{"anyOf":[{"$ref":"#/components/schemas/MAVideoError"},{"type":"null"}],"description":"Error details if status is FAILED","examples":[null]},"model":{"anyOf":[{"type":"string","const":"mirage-video-1-latest"},{"type":"null"}],"title":"Model","description":"Model used for generation (only for source='generation')","examples":["mirage-video-1-latest"]},"source_video_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Video Id","description":"The input video that was captioned (only for source='caption')","examples":["video_abc123def456"]},"caption_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption Template Id","description":"Caption style template used (only for source='caption')","examples":["ctpl_123456789abcdefg"]},"share_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Share Link Url","description":"Public share link for a completed internal video, when enabled.","examples":["https://captions.ai/share/eyJ2Ijox.../share-token"]},"video_id":{"type":"string","title":"Video Id","description":"[Deprecated] Use \"id\" instead.","deprecated":true}},"type":"object","required":["id","status","created_at","video_id"],"title":"MAVideo","description":"Represents a video object.\n\nA video can be created via generation (an image appearance reference plus audio) or\ncaptioning (adding captions to an existing video).","examples":[{"completed_at":1730822520,"created_at":1730822400,"model":"mirage-video-1-latest","progress":100,"status":"COMPLETE","video_id":"video_abc123def456"},{"caption_template_id":"ctpl_123456789abcdefg","created_at":1730822600,"progress":50,"source_video_id":"video_abc123def456","status":"PROCESSING","video_id":"video_xyz789"}]},"MAVideoError":{"properties":{"code":{"type":"string","title":"Code","description":"Error code","examples":["rate_limit_exceeded"]},"message":{"type":"string","title":"Message","description":"Error message","examples":["Rate limit exceeded. Please try again later."]}},"type":"object","required":["code","message"],"title":"MAVideoError","description":"Error payload that explains why generation failed, if applicable"},"MetaTextOverlay":{"properties":{"id":{"type":"string","title":"Id","description":"Text overlay job ID"},"object":{"type":"string","const":"text_overlay","title":"Object","default":"text_overlay"},"status":{"type":"string","enum":["QUEUED","PROCESSING","COMPLETE","FAILED","CANCELLED"],"title":"Status","description":"Current state of the text overlay job"},"created_at":{"type":"integer","title":"Created At","description":"When the job was created (unix timestamp)"},"completed_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed At","description":"When processing reached a terminal state (unix timestamp)"},"results":{"items":{"$ref":"#/components/schemas/MetaTextOverlayResult"},"type":"array","title":"Results","description":"Ordered per-text render results for this job"},"error":{"anyOf":[{"$ref":"#/components/schemas/MAVideoError"},{"type":"null"}],"description":"Error details if the job failed before itemized completion"}},"type":"object","required":["id","status","created_at"],"title":"MetaTextOverlay","description":"Represents a Meta text overlay job.","examples":[{"created_at":1730822400,"id":"d7f76ec6-2500-4d23-a2bc-648f4e904555","object":"text_overlay","results":[],"status":"QUEUED"}]},"MetaTextOverlayResult":{"properties":{"index":{"type":"integer","title":"Index","description":"Zero-based index matching the input texts order"},"text":{"type":"string","title":"Text","description":"Input text for this rendered output"},"status":{"type":"string","enum":["COMPLETE","FAILED"],"title":"Status","description":"Terminal status for this item"},"video_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Video Url","description":"Resolved output video URL when this item completed successfully"},"error":{"anyOf":[{"$ref":"#/components/schemas/MAVideoError"},{"type":"null"}],"description":"Error details when this item failed"}},"type":"object","required":["index","text","status"],"title":"MetaTextOverlayResult","description":"Per-text result for a Meta text overlay job."},"RateLimitOverrideCreateRequest":{"properties":{"identifier":{"type":"string","title":"Identifier","description":"Identifier in format 'org:' or 'user:'","examples":["org:org_123","user:user_456"]},"endpointLimits":{"$ref":"#/components/schemas/EndpointLimitsOverride","description":"Rate limit overrides per endpoint"},"note":{"type":"string","title":"Note","description":"Optional note about why this override exists","default":""}},"type":"object","required":["identifier","endpointLimits"],"title":"RateLimitOverrideCreateRequest","description":"Request to create a rate limit override"},"RateLimitOverrideResponse":{"properties":{"identifier":{"type":"string","title":"Identifier"},"endpointLimits":{"$ref":"#/components/schemas/EndpointLimitsOverride"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"createdBy":{"type":"string","title":"Createdby"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["identifier","endpointLimits","createdAt","createdBy"],"title":"RateLimitOverrideResponse","description":"Response containing rate limit override information"},"RateLimitOverrideUpdateRequest":{"properties":{"endpointLimits":{"anyOf":[{"$ref":"#/components/schemas/EndpointLimitsOverride"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"RateLimitOverrideUpdateRequest","description":"Request to update a rate limit override"},"TTSRequest":{"properties":{"text":{"type":"string","title":"Text","description":"The text to convert to speech","examples":["Hello, welcome to Mirage!"]},"model":{"type":"string","const":"mirage-audio-1","title":"Model","description":"TTS model to use for generation","examples":["mirage-audio-1"]}},"type":"object","required":["text","model"],"title":"TTSRequest","description":"Request body for text-to-speech generation"},"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"}}}}