{"openapi":"3.1.0","info":{"title":"CastlabAI Public API","description":"Every call is counted against one-minute windows: 60 requests per API Key, 120 per user over all their keys and 600 overall. Over one, 429 `api_rate_limited` with `Retry-After` seconds to the window's end. While the API is paused, every call but GET is refused with 503 `api_paused`. Starting a Variant Grid, an Edit or a Video while 2 started with your key, or 4 started with all your keys, are still running is refused with 429 `api_concurrency_limited` and `Retry-After: 30`; Angles never count. These are the default limits; an admin may change them for your key or account. Refusals charge nothing.","version":"1"},"paths":{"/characters":{"get":{"tags":["characters"],"summary":"List Characters","description":"List your live Characters, newest first.\n\nImage URLs are short-lived; fetch the list again for fresh ones. Errors:\n429 `api_rate_limited`.","operationId":"list_characters","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CharacterPublic"},"type":"array","title":"Response List Characters"}}}}},"security":[{"ApiKey":[]}]},"post":{"tags":["characters"],"summary":"Approve Variant","description":"Approve your Variant: it passes the Image Check and becomes a Character.\n\nFree, and so are its 3 Angles, which start at once: poll the Character's\n`angles_state`. 201 with the new Character; 200 with the existing one when\nthe Variant is already approved. Errors: 404 `variant_not_found` or\n`character_not_found`, 409 `character_limit_reached`, 422\n`content_blocked` or `image_invalid`, 429 `rate_limited`,\n`api_rate_limited` or `spend_cap_reached`, 503 `check_unavailable`,\n`generation_paused`, `api_paused` or `variants_unavailable`.","operationId":"approve_variant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterPublic"}}}},"200":{"description":"Already approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}},"security":[{"ApiKey":[]}]}},"/checks/text":{"post":{"tags":["checks"],"summary":"Check Text","description":"Check a Description or Edit text for Prohibited Content.\n\nPass the returned `id` as `check_result_id` to `POST /quotes` and to the\ncreate. A `block` verdict cannot be quoted. Errors: 422 `text_invalid`,\n429 `rate_limited` or `api_rate_limited`, 503 `check_unavailable` or\n`api_paused`.","operationId":"check_text","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckTextRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckResultPublic"}}}},"422":{"description":"`text_invalid`"}},"security":[{"ApiKey":[]}]}},"/quotes":{"post":{"tags":["quotes"],"summary":"Create Quote","description":"Lock the price of a Variant Grid, an Edit or a Video; the same prices as the app.\n\nA quote is single use and expires after `expires_at`. Errors: 404\n`variant_not_found`, `character_not_found` or `clip_not_found`, 422\n`content_blocked`, `clip_blocked` or `duration_invalid`, 429\n`api_rate_limited`, 503 `api_paused`.","operationId":"create_quote","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/VariantGridQuoteCreate"},{"$ref":"#/components/schemas/EditQuoteCreate"},{"$ref":"#/components/schemas/VideoQuoteCreate"}],"title":"Body","discriminator":{"propertyName":"kind","mapping":{"variant_grid":"#/components/schemas/VariantGridQuoteCreate","edit":"#/components/schemas/EditQuoteCreate","video":"#/components/schemas/VideoQuoteCreate"}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuotePublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}},"security":[{"ApiKey":[]}]}},"/variant-grids":{"post":{"tags":["characters"],"summary":"Create Variant Grid","description":"Start a Variant Grid of 4 images from a checked, quoted Description.\n\nA repeat with the same `Idempotency-Key` returns the first Generation and\ncharges nothing. Errors: 402 `insufficient_credits`, 409 `quote_expired`\nor `quote_invalid`, 429 `rate_limited`, `api_rate_limited`,\n`api_concurrency_limited` or `spend_cap_reached`, 503 `generation_paused`\nor `api_paused`.","operationId":"create_variant_grid","security":[{"ApiKey":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantGridCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantGridCreated"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/variant-grids/{generation_id}":{"get":{"tags":["characters"],"summary":"Read Variant Grid","description":"Read a Variant Grid's state and, once it succeeded, its Variants.\n\nPoll until the state is terminal. Image URLs are short-lived. Errors: 404\n`generation_not_found`, 429 `api_rate_limited`, 503 `variants_unavailable`.","operationId":"read_variant_grid","security":[{"ApiKey":[]}],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Generation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantGridPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/variants/{variant_id}/edits":{"post":{"tags":["characters"],"summary":"Create Edit","description":"Start an Edit of your Variant: 1 new Variant made from it.\n\nA repeat with the same `Idempotency-Key` returns the first Generation and\ncharges nothing. Errors: 404 `variant_not_found`, 402\n`insufficient_credits`, 409 `quote_expired` or `quote_invalid`, 429\n`rate_limited`, `api_rate_limited`, `api_concurrency_limited` or\n`spend_cap_reached`, 503 `generation_paused` or `api_paused`.","operationId":"create_edit","security":[{"ApiKey":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}},{"name":"idempotency-key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditCreated"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/edits/{generation_id}":{"get":{"tags":["characters"],"summary":"Read Edit","description":"Read an Edit's state and, once it succeeded, its new Variant.\n\nErrors: 404 `generation_not_found`, 429 `api_rate_limited`, 503\n`variants_unavailable`.","operationId":"read_edit","security":[{"ApiKey":[]}],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Generation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/characters/{character_id}":{"get":{"tags":["characters"],"summary":"Read Character","description":"Read one of your Characters.\n\nErrors: 404 `character_not_found`, 429 `api_rate_limited`, 503\n`variants_unavailable`.","operationId":"read_character","security":[{"ApiKey":[]}],"parameters":[{"name":"character_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Character Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}},"patch":{"tags":["characters"],"summary":"Rename Character","description":"Rename one of your Characters; the name is checked like a Description.\n\nErrors: 404 `character_not_found`, 422 `content_blocked`, 429\n`rate_limited` or `api_rate_limited`, 503 `check_unavailable`,\n`variants_unavailable` or `api_paused`.","operationId":"rename_character","security":[{"ApiKey":[]}],"parameters":[{"name":"character_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Character Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterRename"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CharacterPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}},"delete":{"tags":["characters"],"summary":"Delete Character","description":"Delete one of your Characters; it cannot be undone.\n\nIts Videos and History stay. Errors: 404 `character_not_found`, 429\n`api_rate_limited`, 503 `api_paused`.","operationId":"delete_character","security":[{"ApiKey":[]}],"parameters":[{"name":"character_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Character Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/videos":{"post":{"tags":["videos"],"summary":"Create Video","description":"Start a Video of your Character following a Library clip or your upload.\n\nQuote it first with `POST /quotes` (`kind: video`). To pay for a new take\nof one of your succeeded Videos, name it in `regenerates` with a `reason`;\nit must show the same Character, while the clip and seconds may differ.\nFree Redos are only in the app. A repeat with the same `Idempotency-Key`\nreturns the first Generation and charges nothing. Errors: 402\n`insufficient_credits`, 404 `character_not_found`, `clip_not_found` or\n`generation_not_found`, 409 `quote_expired`, `quote_invalid` or\n`regeneration_source_mismatch`, 422 `clip_blocked`, `duration_invalid` or\n`video_invalid`, 429 `rate_limited`, `api_rate_limited`,\n`api_concurrency_limited` or `spend_cap_reached`, 503\n`generation_paused`, `api_paused` or `video_unavailable`.","operationId":"create_video","security":[{"ApiKey":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStartBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreated"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}},"get":{"tags":["videos"],"summary":"List Videos","description":"List your Videos in any state, newest first.\n\nPass `next_cursor` as `cursor` for the next page. Video URLs are\nshort-lived. Errors: 422 `cursor_invalid`, 429 `api_rate_limited`, 503\n`video_unavailable`.","operationId":"list_videos","security":[{"ApiKey":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoPage"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/videos/{generation_id}":{"get":{"tags":["videos"],"summary":"Read Video","description":"Read a Video's state and, once it succeeded, the Video to play.\n\nPoll until the state is terminal. The URL is short-lived. Errors: 404\n`generation_not_found`, 429 `api_rate_limited`, 503 `video_unavailable`.","operationId":"read_video","security":[{"ApiKey":[]}],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Generation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoResultPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/videos/{generation_id}/download":{"get":{"tags":["videos"],"summary":"Download Video","description":"Return a URL that saves your succeeded Video as an MP4 file.\n\nLabel the Video as AI-generated where you post it; `ai_label_reminder`\nsays so. The URL is short-lived. Errors: 404 `generation_not_found`\n(also before the Video succeeded), 429 `api_rate_limited`, 503\n`video_unavailable`.","operationId":"download_video","security":[{"ApiKey":[]}],"parameters":[{"name":"generation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Generation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicVideoDownload"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/reference-clips":{"post":{"tags":["clips"],"summary":"Upload Clip","description":"Upload your own trend clip as `multipart/form-data`; it is cut, stored and rated.\n\nSend the video as `file` (MP4, QuickTime or WebM, at most 50 MB and 180 s)\nand optionally `start_s`, where the cut of up to 15 s starts. The answer\ncarries the Quality Rating and the Reference Check; pass its `id` as\n`reference_clip_id` to `POST /quotes` and `POST /videos`. Free of\nCredits. A clip the check blocks is still stored, and quoting it is 422\n`clip_blocked`. Errors: 413 `clip_too_large`, 422\n`clip_type_unsupported`, `clip_unreadable`, `clip_source_too_long` or\n`video_invalid`, 429 `rate_limited` or `api_rate_limited`, 503\n`check_unavailable` or `api_paused`.","operationId":"upload_clip","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_clip"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadClipPublic"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}},"get":{"tags":["clips"],"summary":"List My Clips","description":"List the clips you uploaded, newest first, with their Reference Checks.\n\n`q` keeps only clips whose title contains it, any case. Preview and\nvideo URLs are short-lived. Errors: 422 `request_invalid` for a `q` over 64\ncharacters,\n429 `api_rate_limited`, 503 `check_unavailable`.","operationId":"list_my_clips","security":[{"ApiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UploadClipPublic"},"title":"Response List My Clips"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}},"/library/clips":{"get":{"tags":["clips"],"summary":"List Library Clips","description":"List the Library's trend clips with their Tags and Quality Ratings.\n\nPass a clip's `id` as `reference_clip_id` to `POST /quotes`. `tag` is\nrepeatable and keeps clips carrying every given Tag; `q` keeps clips\nwhose title or a Tag contains it. Clips you saved in the app come first,\nthen the rest by 2 x `favorite_count` + `use_count`, then newest.\nPreview and video URLs are short-lived. Errors: 422 `request_invalid` for a\nbad `tag` or `q`, 429 `api_rate_limited`, 503 `check_unavailable`.","operationId":"list_library_clips","security":[{"ApiKey":[]}],"parameters":[{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":32,"pattern":"^[a-z0-9-]+$"},"maxItems":20},{"type":"null"}],"title":"Tag"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LibraryClipPublic"},"title":"Response List Library Clips"}}}},"422":{"description":"Request invalid","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/RequestInvalidProblem"}}}}}}}},"webhooks":{"generation-finished":{"post":{"tags":["webhooks"],"summary":"Generation Finished","description":"Sent to your API Key's webhook URL when one of its Generations finishes.\n\nSet the URL and get its `whsec_` secret on the API Keys page. Each POST\nfollows Standard Webhooks: headers `webhook-id` (equal to `id`, the same\non every retry), `webhook-timestamp` (Unix seconds) and `webhook-signature`\n(`v1,` + base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`,\nkeyed with the base64-decoded part of the secret after `whsec_`). Answer\n2xx within 10 seconds; anything else, including a redirect, is retried\nafter 5 s, 30 s, 2 min, 10 min, 30 min, then hourly for 24 hours. The body\ncarries no media URL: download a Video with `GET\n/videos/{generation_id}/download`.","operationId":"generation_finishedgeneration_finished_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AnglePublic":{"properties":{"position":{"type":"integer","title":"Position"},"url":{"type":"string","title":"Url"}},"type":"object","required":["position","url"],"title":"AnglePublic"},"Body_upload_clip":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"start_s":{"type":"number","minimum":0.0,"title":"Start S","default":0.0}},"type":"object","required":["file"],"title":"Body_upload_clip"},"CharacterCreate":{"properties":{"variant_id":{"type":"string","format":"uuid","title":"Variant Id"},"language":{"type":"string","enum":["en","uk"],"title":"Language","default":"en"}},"type":"object","required":["variant_id"],"title":"CharacterCreate"},"CharacterPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"preset_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Preset Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"url":{"type":"string","title":"Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"angles_generation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Angles Generation Id"},"angles_state":{"anyOf":[{"$ref":"#/components/schemas/GenerationState"},{"type":"null"}]},"angles":{"items":{"$ref":"#/components/schemas/AnglePublic"},"type":"array","title":"Angles"}},"type":"object","required":["id","variant_id","preset_id","name","url","created_at","angles_generation_id","angles_state","angles"],"title":"CharacterPublic"},"CharacterRename":{"properties":{"name":{"type":"string","maxLength":40,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CharacterRename"},"CheckCategory":{"type":"string","enum":["sexual","minor","real_likeness","drugs","alcohol","violence","other_prohibited"],"title":"CheckCategory"},"CheckResultPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"verdict":{"$ref":"#/components/schemas/CheckVerdict"},"category":{"anyOf":[{"$ref":"#/components/schemas/CheckCategory"},{"type":"null"}]},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"type":"object","required":["id","verdict","category","reasons"],"title":"CheckResultPublic"},"CheckTextRequest":{"properties":{"text":{"type":"string","maxLength":10000,"title":"Text","default":""}},"type":"object","title":"CheckTextRequest"},"CheckVerdict":{"type":"string","enum":["allow","block"],"title":"CheckVerdict"},"EditCreate":{"properties":{"quote_id":{"type":"string","format":"uuid","title":"Quote Id"},"edit_text":{"type":"string","maxLength":10000,"minLength":1,"title":"Edit Text"},"check_result_id":{"type":"string","format":"uuid","title":"Check Result Id"}},"type":"object","required":["quote_id","edit_text","check_result_id"],"title":"EditCreate"},"EditCreated":{"properties":{"generation_id":{"type":"string","format":"uuid","title":"Generation Id"}},"type":"object","required":["generation_id"],"title":"EditCreated"},"EditPublic":{"properties":{"state":{"$ref":"#/components/schemas/GenerationState"},"variant":{"anyOf":[{"$ref":"#/components/schemas/VariantPublic"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["state","variant"],"title":"EditPublic"},"EditQuoteCreate":{"properties":{"kind":{"type":"string","const":"edit","title":"Kind"},"variant_id":{"type":"string","format":"uuid","title":"Variant Id"},"edit_text":{"type":"string","maxLength":10000,"minLength":1,"title":"Edit Text"},"check_result_id":{"type":"string","format":"uuid","title":"Check Result Id"}},"type":"object","required":["kind","variant_id","edit_text","check_result_id"],"title":"EditQuoteCreate"},"GenerationState":{"type":"string","enum":["submitted","processing","postprocessing","succeeded","failed","timed_out"],"title":"GenerationState"},"LibraryClipPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"title_uk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Uk"},"duration_s":{"type":"number","title":"Duration S"},"max_output_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output S"},"reference_max_s":{"type":"integer","title":"Reference Max S"},"min_output_s":{"type":"integer","title":"Min Output S"},"total_max_s":{"type":"integer","title":"Total Max S"},"quality":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Quality"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"preview_url":{"type":"string","title":"Preview Url"},"video_url":{"type":"string","title":"Video Url"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"favorited":{"type":"boolean","title":"Favorited","default":false},"favorite_count":{"type":"integer","title":"Favorite Count","default":0},"use_count":{"type":"integer","title":"Use Count","default":0},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"},"people_count":{"type":"integer","title":"People Count","default":1}},"type":"object","required":["id","title","duration_s","max_output_s","reference_max_s","min_output_s","total_max_s","quality","reasons","preview_url","video_url","tags"],"title":"LibraryClipPublic"},"PublicVideoDownload":{"properties":{"url":{"type":"string","title":"Url"},"ai_label_reminder":{"type":"string","title":"Ai Label Reminder"}},"type":"object","required":["url","ai_label_reminder"],"title":"PublicVideoDownload"},"QuotePublic":{"properties":{"quote_id":{"type":"string","format":"uuid","title":"Quote Id"},"price":{"type":"integer","title":"Price"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["quote_id","price","expires_at"],"title":"QuotePublic"},"RedoReason":{"type":"string","enum":["character_looks_different","visual_artifact","motion_wrong","other"],"title":"RedoReason"},"ReferenceCheckResultPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"verdict":{"$ref":"#/components/schemas/CheckVerdict"},"category":{"anyOf":[{"$ref":"#/components/schemas/CheckCategory"},{"type":"null"}]},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"quality":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Quality"},"reused":{"type":"boolean","title":"Reused"}},"type":"object","required":["id","verdict","category","reasons","quality","reused"],"title":"ReferenceCheckResultPublic"},"UploadClipPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"duration_s":{"type":"number","title":"Duration S"},"quality":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Quality"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"preview_url":{"type":"string","title":"Preview Url"},"video_url":{"type":"string","title":"Video Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"check":{"$ref":"#/components/schemas/ReferenceCheckResultPublic"},"max_output_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Output S"},"reference_max_s":{"type":"integer","title":"Reference Max S"},"min_output_s":{"type":"integer","title":"Min Output S"},"total_max_s":{"type":"integer","title":"Total Max S"},"people_count":{"type":"integer","title":"People Count","default":1}},"type":"object","required":["id","title","duration_s","quality","reasons","preview_url","video_url","created_at","check","max_output_s","reference_max_s","min_output_s","total_max_s"],"title":"UploadClipPublic"},"VariantGridCreate":{"properties":{"quote_id":{"type":"string","format":"uuid","title":"Quote Id"},"description":{"type":"string","maxLength":10000,"minLength":1,"title":"Description"},"check_result_id":{"type":"string","format":"uuid","title":"Check Result Id"}},"type":"object","required":["quote_id","description","check_result_id"],"title":"VariantGridCreate"},"VariantGridCreated":{"properties":{"generation_id":{"type":"string","format":"uuid","title":"Generation Id"}},"type":"object","required":["generation_id"],"title":"VariantGridCreated"},"VariantGridPublic":{"properties":{"state":{"$ref":"#/components/schemas/GenerationState"},"variants":{"items":{"$ref":"#/components/schemas/VariantPublic"},"type":"array","title":"Variants"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["state","variants"],"title":"VariantGridPublic"},"VariantGridQuoteCreate":{"properties":{"kind":{"type":"string","const":"variant_grid","title":"Kind"},"description":{"type":"string","maxLength":10000,"minLength":1,"title":"Description"},"check_result_id":{"type":"string","format":"uuid","title":"Check Result Id"}},"type":"object","required":["kind","description","check_result_id"],"title":"VariantGridQuoteCreate"},"VariantPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","url"],"title":"VariantPublic"},"VideoCreated":{"properties":{"generation_id":{"type":"string","format":"uuid","title":"Generation Id"}},"type":"object","required":["generation_id"],"title":"VideoCreated"},"VideoListItem":{"properties":{"generation_id":{"type":"string","format":"uuid","title":"Generation Id"},"state":{"$ref":"#/components/schemas/GenerationState"},"character_id":{"type":"string","format":"uuid","title":"Character Id"},"video":{"anyOf":[{"$ref":"#/components/schemas/VideoPublic"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["generation_id","state","character_id","video","created_at"],"title":"VideoListItem"},"VideoModelId":{"type":"string","enum":["pro","light"],"title":"VideoModelId"},"VideoPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/VideoListItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"VideoPage"},"VideoPublic":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"duration_s":{"type":"integer","title":"Duration S"},"library_clip_id":{"type":"string","format":"uuid","title":"Library Clip Id"},"location_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location Text"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"model":{"$ref":"#/components/schemas/VideoModelId","default":"light"},"resolution":{"$ref":"#/components/schemas/VideoResolution","default":"720p"},"poster_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Poster Url"}},"type":"object","required":["id","url","duration_s","library_clip_id"],"title":"VideoPublic"},"VideoQuoteCreate":{"properties":{"kind":{"type":"string","const":"video","title":"Kind"},"character_id":{"type":"string","format":"uuid","title":"Character Id"},"reference_clip_id":{"type":"string","format":"uuid","title":"Reference Clip Id"},"duration_s":{"type":"integer","title":"Duration S"},"location_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Location Text"},"location_check_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Location Check Id"},"prompt":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Prompt"},"prompt_check_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Prompt Check Id"},"model":{"$ref":"#/components/schemas/VideoModelId","default":"light"},"resolution":{"$ref":"#/components/schemas/VideoResolution","default":"720p"}},"type":"object","required":["kind","character_id","reference_clip_id","duration_s"],"title":"VideoQuoteCreate"},"VideoRegeneration":{"properties":{"source_generation_id":{"type":"string","format":"uuid","title":"Source Generation Id"},"reason":{"$ref":"#/components/schemas/RedoReason"}},"type":"object","required":["source_generation_id","reason"],"title":"VideoRegeneration"},"VideoResolution":{"type":"string","enum":["480p","720p","1080p"],"title":"VideoResolution"},"VideoResultPublic":{"properties":{"state":{"$ref":"#/components/schemas/GenerationState"},"character_id":{"type":"string","format":"uuid","title":"Character Id"},"video":{"anyOf":[{"$ref":"#/components/schemas/VideoPublic"},{"type":"null"}]},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"}},"type":"object","required":["state","character_id","video"],"title":"VideoResultPublic"},"VideoStartBody":{"properties":{"quote_id":{"type":"string","format":"uuid","title":"Quote Id"},"character_id":{"type":"string","format":"uuid","title":"Character Id"},"reference_clip_id":{"type":"string","format":"uuid","title":"Reference Clip Id"},"duration_s":{"type":"integer","title":"Duration S"},"location_text":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Location Text"},"prompt":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Prompt"},"model":{"$ref":"#/components/schemas/VideoModelId","default":"light"},"resolution":{"$ref":"#/components/schemas/VideoResolution","default":"720p"},"regenerates":{"anyOf":[{"$ref":"#/components/schemas/VideoRegeneration"},{"type":"null"}]}},"type":"object","required":["quote_id","character_id","reference_clip_id","duration_s"],"title":"VideoStartBody"},"WebhookEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/WebhookEventType"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"generation_id":{"type":"string","format":"uuid","title":"Generation Id"},"video_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Video Id"},"credits_charged":{"type":"integer","title":"Credits Charged"}},"type":"object","required":["id","type","created_at","generation_id","credits_charged"],"title":"WebhookEvent"},"WebhookEventType":{"type":"string","enum":["generation.succeeded","generation.failed"],"title":"WebhookEventType"},"RequestInvalidField":{"properties":{"field":{"title":"Field","type":"string"},"reason":{"title":"Reason","type":"string"}},"required":["field","reason"],"title":"RequestInvalidField","type":"object"},"RequestInvalidProblem":{"properties":{"type":{"title":"Type","type":"string"},"title":{"title":"Title","type":"string"},"status":{"title":"Status","type":"integer"},"code":{"const":"request_invalid","title":"Code","type":"string"},"errors":{"items":{"$ref":"#/components/schemas/RequestInvalidField"},"title":"Errors","type":"array"}},"required":["type","title","status","code","errors"],"title":"RequestInvalidProblem","type":"object"}},"securitySchemes":{"ApiKey":{"type":"http","description":"An API Key from the API Keys page.","scheme":"bearer","bearerFormat":"cl_<prefix>_<secret>"}}},"servers":[{"url":"/api/public/v1"}]}