{"openapi":"3.1.0","info":{"title":"LizzFlix API","version":"1.0.0"},"components":{"schemas":{"IssueTokenResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"expiresAt":{"type":"string"},"delivery":{"type":"string"},"verificationToken":{"type":"string"}},"required":["ok","expiresAt"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"reason":{"type":"string"},"details":{"nullable":true}},"required":["error"]},"SessionEnvelope":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"userId":{"type":"string"},"sessionToken":{"type":"string"}},"required":["ok","userId","sessionToken"]},"Viewer":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"email":{"type":"string"},"displayName":{"type":"string","nullable":true},"language":{"type":"string","nullable":true},"role":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"legal":{"$ref":"#/components/schemas/LegalStatus"}},"required":["id","email"],"additionalProperties":{"nullable":true}},"LegalStatus":{"type":"object","properties":{"required":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"version":{"type":"string","description":"The version to accept (YYYY-MM-DD); send it back in POST /v1/legal/acceptances."},"url":{"type":"string"}},"required":["slug","version","url"]},"description":"Documents the user still has to accept. Empty when up to date."},"ageConfirmed":{"type":"boolean"},"aiSharingAcknowledged":{"type":"boolean","description":"The current third-party AI processing notice was acknowledged. Apps keep generation off until it is."}},"required":["required","ageConfirmed","aiSharingAcknowledged"]},"OkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"BillingSummary":{"type":"object","properties":{"plan":{"type":"string","nullable":true},"planStatus":{"type":"string"},"paymentState":{"type":"string"},"currentPeriodStart":{"type":"string","nullable":true},"currentPeriodEnd":{"type":"string","nullable":true},"availableCredits":{"type":"number"},"availablePoints":{"type":"number"},"reservedCredits":{"type":"number"},"reservedPoints":{"type":"number"},"monthlyCreditsRemaining":{"type":"number"},"monthlyPointsRemaining":{"type":"number"},"purchasedCreditsRemaining":{"type":"number"},"purchasedPointsRemaining":{"type":"number"},"pendingDowngradePlan":{"type":"string","nullable":true},"viewerRole":{"type":"string","nullable":true},"billingExempt":{"type":"boolean"},"recentUsage":{"type":"array","items":{"$ref":"#/components/schemas/BillingRecentUsageItem"}},"plans":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlan"}},"topups":{"type":"array","items":{"$ref":"#/components/schemas/BillingTopup"}},"pricingRules":{"type":"array","items":{"$ref":"#/components/schemas/BillingPricingRule"}},"stripeConfigured":{"type":"boolean"},"publishableKeyConfigured":{"type":"boolean"},"consumerRights":{"$ref":"#/components/schemas/ConsumerRights"},"standing":{"$ref":"#/components/schemas/BillingSummaryStanding"}},"required":["plan","planStatus","paymentState","currentPeriodStart","currentPeriodEnd","availableCredits","availablePoints","reservedCredits","reservedPoints","monthlyCreditsRemaining","monthlyPointsRemaining","purchasedCreditsRemaining","purchasedPointsRemaining","pendingDowngradePlan","viewerRole","billingExempt","recentUsage","plans","topups","pricingRules","stripeConfigured","publishableKeyConfigured","consumerRights"],"additionalProperties":{"nullable":true}},"BillingRecentUsageItem":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","nullable":true},"modelKey":{"type":"string","nullable":true},"feature":{"type":"string","nullable":true},"billableCategory":{"type":"string","nullable":true},"providerCostUsd":{"type":"number"},"chargedCredits":{"type":"number"},"chargedPoints":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","provider","modelKey","feature","billableCategory","providerCostUsd","chargedCredits","chargedPoints","createdAt"]},"BillingPlan":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"priceUsd":{"type":"number"},"monthlyCredits":{"type":"number"},"monthlyPoints":{"type":"number"},"interval":{"type":"string","nullable":true}},"required":["key","name","priceUsd","monthlyCredits","monthlyPoints","interval"]},"BillingTopup":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"priceUsd":{"type":"number"},"grantedCredits":{"type":"number"},"grantedPoints":{"type":"number"}},"required":["key","name","priceUsd","grantedCredits","grantedPoints"]},"BillingPricingRule":{"type":"object","properties":{"key":{"type":"string"},"category":{"type":"string"},"multiplier":{"type":"number"},"minimumCredits":{"type":"number"},"minimumPoints":{"type":"number"},"riskBuffer":{"type":"number"},"roundingIncrement":{"type":"number","nullable":true}},"required":["key","category","multiplier","minimumCredits","minimumPoints","riskBuffer","roundingIncrement"]},"ConsumerRights":{"type":"object","properties":{"checkoutConsentRequired":{"type":"boolean"},"consentVersion":{"type":"string"},"withdrawalEnabled":{"type":"boolean"},"withdrawalWindowDays":{"type":"number"},"withdrawalStatementVersion":{"type":"string"},"planCancellationEnabled":{"type":"boolean"},"subscription":{"type":"object","nullable":true,"properties":{"status":{"type":"string"},"cancelAtPeriodEnd":{"type":"boolean"},"currentPeriodEnd":{"type":"string","nullable":true}},"required":["status","cancelAtPeriodEnd","currentPeriodEnd"]}},"required":["checkoutConsentRequired","consentVersion","withdrawalEnabled","withdrawalWindowDays","withdrawalStatementVersion","planCancellationEnabled","subscription"]},"BillingSummaryStanding":{"type":"object","properties":{"status":{"type":"string"},"suspendedReason":{"type":"string","nullable":true}},"required":["status","suspendedReason"]},"BillingCheckoutResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"url":{"type":"string","nullable":true},"sessionId":{"type":"string","nullable":true},"consentRequired":{"type":"boolean"},"consentId":{"type":"string","nullable":true}},"required":["ok","url"]},"BillingCheckoutRequest":{"type":"object","properties":{"mode":{"type":"string","enum":["subscribe","topup"]},"planKey":{"type":"string"},"topupKey":{"type":"string"},"successUrl":{"type":"string"},"cancelUrl":{"type":"string"},"consent":{"$ref":"#/components/schemas/CheckoutConsent"}}},"CheckoutConsent":{"type":"object","properties":{"version":{"type":"string"},"immediateStart":{"type":"boolean"},"withdrawalLossAcknowledged":{"type":"boolean"},"renewalAcknowledged":{"type":"boolean"},"locale":{"type":"string","enum":["en","ru"]},"surface":{"type":"string","enum":["web","ios","android","mcp"]}},"required":["version","immediateStart"]},"BillingPortalResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"url":{"type":"string","nullable":true}},"required":["ok","url"]},"BillingPortalRequest":{"type":"object","properties":{"returnUrl":{"type":"string"}}},"StripeWebhookResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"received":{"type":"boolean"},"eventType":{"type":"string"}},"required":["ok"],"additionalProperties":{"nullable":true}},"BillingHistoryResponse":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BillingHistoryItem"}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"BillingHistoryItem":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["grant","charge","refund","renewal","other"]},"eventType":{"type":"string"},"amountCredits":{"type":"number"},"description":{"type":"string"},"sourceRef":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","kind","eventType","amountCredits","description","sourceRef","createdAt"]},"BillingHistoryErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"},"details":{"nullable":true}},"required":["error"]},"WithdrawableList":{"type":"object","properties":{"enabled":{"type":"boolean"},"windowDays":{"type":"number"},"statementVersion":{"type":"string"},"purchases":{"type":"array","items":{"$ref":"#/components/schemas/WithdrawablePurchase"}}},"required":["enabled","windowDays","statementVersion","purchases"]},"WithdrawablePurchase":{"type":"object","properties":{"purchaseId":{"type":"string"},"kind":{"type":"string","enum":["topup","plan"]},"itemName":{"type":"string"},"purchasedAt":{"type":"string"},"withdrawUntil":{"type":"string"},"totalCredits":{"type":"number"},"unusedCredits":{"type":"number"},"providedShare":{"type":"number"},"estimatedRefundCents":{"type":"number"},"currency":{"type":"string"},"state":{"type":"string","enum":["available","withdrawn"]}},"required":["purchaseId","kind","itemName","purchasedAt","withdrawUntil","totalCredits","unusedCredits","providedShare","estimatedRefundCents","currency","state"]},"BillingRefund":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["withdrawal","admin"]},"purchaseKind":{"type":"string","enum":["topup","plan"]},"purchaseId":{"type":"string","nullable":true},"status":{"type":"string","enum":["pending","succeeded","failed"]},"refundCents":{"type":"number"},"amountPaidCents":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"providedShare":{"type":"number","nullable":true},"clawedBackCredits":{"type":"number"},"reason":{"type":"string","nullable":true},"createdAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","kind","purchaseKind","purchaseId","status","refundCents","amountPaidCents","currency","providedShare","clawedBackCredits","reason","createdAt","completedAt"]},"WithdrawalBody":{"type":"object","properties":{"purchaseId":{"type":"string"},"confirm":{"type":"boolean"},"statementVersion":{"type":"string"},"surface":{"type":"string","enum":["web","ios","android"]}},"required":["purchaseId","confirm"]},"PlanChangeResult":{"type":"object","properties":{"status":{"type":"string","enum":["cancel_at_period_end","active"]},"effectiveAt":{"type":"string","nullable":true}},"required":["status","effectiveAt"]},"PlanChangeBody":{"type":"object","properties":{"surface":{"type":"string","enum":["web","ios","android"]}}},"StudioOverview":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioVoiceCatalog":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}}},"required":["voices"],"additionalProperties":{"nullable":true}},"StudioAssetList":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/StudioAssetItem"}}},"required":["assets"]},"StudioAssetItem":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioJobAcceptedResponse":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/StudioAccountJob"}},"required":["job"]},"StudioAccountJob":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["generation","operation"]},"action":{"type":"string","nullable":true},"status":{"type":"string"},"requestId":{"type":"string","nullable":true},"entityRefs":{"type":"object","additionalProperties":{"nullable":true}},"blockingScope":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"openUrl":{"type":"string","nullable":true},"result":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"errorMessage":{"type":"string","nullable":true},"error":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true}},"required":["id","status"],"additionalProperties":{"nullable":true}},"LooseJsonBody":{"type":"object","additionalProperties":{"nullable":true}},"StudioCharacter":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioVoicePreview":{"type":"object","properties":{"previewUrl":{"type":"string","nullable":true}},"required":["previewUrl"]},"StudioVoiceCast":{"type":"object","nullable":true,"properties":{},"additionalProperties":{"nullable":true}},"StudioGenerationJobAcceptedResponse":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/StudioJob"}},"required":["job"]},"StudioJob":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"jobType":{"type":"string","nullable":true},"status":{"type":"string"},"queueMode":{"type":"string"},"sceneId":{"type":"string","nullable":true},"provider":{"type":"string","nullable":true},"model":{"type":"string"},"modelKey":{"type":"string"},"operation":{"type":"string"},"providerJobId":{"type":"string","nullable":true},"attempt":{"type":"number"},"pollAfter":{"type":"string","nullable":true},"request":{"type":"object","additionalProperties":{"nullable":true}},"result":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"errorMessage":{"type":"string","nullable":true},"error":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"assets":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["id","status"],"additionalProperties":{"nullable":true}},"StudioVoiceLine":{"type":"object","nullable":true,"properties":{},"additionalProperties":{"nullable":true}},"StudioImageAsset":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"EntityImageGenerateBody":{"type":"object","properties":{"generationPrompt":{"type":"string","description":"What to generate."},"selectedImageModelId":{"type":"string","description":"Image model key (GET /v1/catalog/models)."},"references":{"type":"array","items":{"$ref":"#/components/schemas/ReferenceHandle"},"maxItems":64,"description":"Reference images, in order (prompts address them as image 1, 2...). How many a model takes is in GET /v1/studio/reference-limits; more or fewer is a 400 (reason reference_limit_exceeded / reference_required), never trimmed. References are free."},"label":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"referenceImageUrls":{"type":"array","items":{"type":"string","maxLength":2048},"maxItems":64,"deprecated":true,"description":"Links to your own images (`/api/v1/assets/{id}/content`). Use `references`."}},"required":["generationPrompt","selectedImageModelId"],"additionalProperties":{"nullable":true}},"ReferenceHandle":{"type":"string","minLength":1,"maxLength":160,"description":"A `ref` from GET /v1/studio/reference-images: `asset:<id>` (a studio image from any of your series) or `library:<id>` (a library upload). A bare id is read as `asset:<id>`.","example":"asset:4b0f8c1e-2d5a-4c7e-9a1b-3f6d8e2c1a90"},"StudioLocation":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioEpisode":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"UpdateEpisodeBody":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"summary":{"type":"string"},"status":{"type":"string"},"montage":{"$ref":"#/components/schemas/Montage"}},"additionalProperties":{"nullable":true}},"Montage":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","enum":[2]},"title":{"type":"string"},"continuityNotes":{"type":"string"},"assembled":{"type":"boolean"},"videoLane":{"type":"array","items":{"type":"object","properties":{"clipId":{"type":"string"},"sourceKind":{"type":"string"},"sourceId":{"type":"string"},"trimInMs":{"type":"number"},"trimOutMs":{"type":"number"},"sourceAudioMuted":{"type":"boolean"},"volume":{"type":"number"}},"required":["clipId","sourceKind","sourceId","trimInMs","trimOutMs"],"additionalProperties":{"nullable":true}}},"audioLanes":{"type":"array","items":{"type":"object","properties":{"laneId":{"type":"string"},"kind":{"type":"string"},"volume":{"type":"number"},"muted":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"assetKind":{"type":"string"},"assetId":{"type":"string"},"startMs":{"type":"number"},"durationMs":{"type":"number"},"volume":{"type":"number"}},"required":["id","assetKind","assetId","startMs","durationMs"],"additionalProperties":{"nullable":true}}}},"required":["laneId","kind","items"],"additionalProperties":{"nullable":true}}},"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"renderId":{"type":"string"},"order":{"type":"number"},"label":{"type":"string"},"videoUrl":{"type":"string"}},"additionalProperties":{"nullable":true}}}},"required":["version","videoLane"],"additionalProperties":{"nullable":true}},{"type":"object","properties":{"version":{"type":"number","enum":[1]},"title":{"type":"string"},"continuityNotes":{"type":"string"},"bridgeShotIdeas":{"type":"array","items":{"nullable":true}},"assembled":{"type":"boolean"},"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sceneId":{"type":"string"},"renderId":{"type":"string"},"order":{"type":"number"},"label":{"type":"string"},"videoUrl":{"type":"string"}},"additionalProperties":{"nullable":true}}}},"additionalProperties":{"nullable":true}}]},"StudioScene":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioDialogueLine":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"ComposeStartFrameBody":{"type":"object","properties":{"placementPrompt":{"type":"string","description":"Blocking and composition of the frame."},"locationAssetId":{"type":"string","description":"A plate of this series' location (the original form)."},"locationRef":{"allOf":[{"$ref":"#/components/schemas/ReferenceHandle"},{"description":"Any of your images as the plate. One from another series, or a start frame, is copied into the scene's location (or `locationId`) when the frame is composed."}]},"locationId":{"type":"string","description":"The location a `locationRef` copy goes to; defaults to the scene's location."},"characterAssetIds":{"type":"array","items":{"type":"string"},"maxItems":64,"description":"Images of this series' characters (the original form)."},"characters":{"type":"array","items":{"$ref":"#/components/schemas/StartFrameCharacterRef"},"maxItems":64,"description":"One image per placed character, any of your images: one that is not already that character's is copied into the character's images when the frame is composed. Used instead of characterAssetIds."},"label":{"type":"string"}},"required":["placementPrompt"],"additionalProperties":{"nullable":true}},"StartFrameCharacterRef":{"type":"object","properties":{"characterId":{"type":"string","minLength":1,"maxLength":128,"description":"A character of this series."},"ref":{"$ref":"#/components/schemas/ReferenceHandle"}},"required":["characterId","ref"]},"StudioStartFrame":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioRender":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"StudioRenderMedia":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"CreateGenerationJobResponse":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"statusUrl":{"type":"string"},"eventsUrl":{"type":"string"}},"required":["jobId","status","statusUrl","eventsUrl"]},"CreateGenerationJobRequest":{"type":"object","properties":{"modelKey":{"type":"string"},"operation":{"type":"string"},"inputs":{"type":"object","additionalProperties":{"nullable":true}},"targetRef":{"type":"object","additionalProperties":{"nullable":true}}},"required":["modelKey","operation"],"additionalProperties":{"nullable":true}},"ServerSentEventsStream":{"type":"string"},"AccountJobsListResponse":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/StudioAccountJob"}},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/StudioTask"}},"nextCursor":{"type":"string","nullable":true}},"required":["jobs"]},"StudioTask":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["generation","magic"]},"label":{"type":"string"},"status":{"type":"string","enum":["running","waiting_for_approval","ready","failed","cancelled"]},"openUrl":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","kind","label","status","openUrl","updatedAt"]},"AccountJobResponse":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/StudioAccountJob"}},"required":["job"]},"AccountOverview":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","nullable":true}},"required":["id","email","status","createdAt"]},"deletion":{"type":"object","properties":{"available":{"type":"boolean"},"reauthRequired":{"type":"boolean"},"reauthWindowSeconds":{"type":"number"},"sessionAgeSeconds":{"type":"number","nullable":true},"closureRefundWindowDays":{"type":"number"}},"required":["available","reauthRequired","reauthWindowSeconds","sessionAgeSeconds","closureRefundWindowDays"]},"export":{"type":"object","properties":{"available":{"type":"boolean"},"linkTtlDays":{"type":"number"},"exports":{"type":"array","items":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"completedAt":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true},"downloadUrl":{"type":"string","nullable":true}},"required":["jobId","status","createdAt","completedAt","expiresAt","downloadUrl"]}}},"required":["available","linkTtlDays","exports"]}},"required":["account","deletion","export"]},"AccountDeletionAccepted":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled"]},"jobId":{"type":"string"}},"required":["status","jobId"]},"AccountReauthRequired":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","enum":["REAUTH_REQUIRED"]},"reason":{"type":"string","enum":["session_too_old"]},"reauthWindowSeconds":{"type":"number"}},"required":["error","code","reason","reauthWindowSeconds"]},"AccountDeletionBody":{"type":"object","properties":{"confirm":{"type":"string","enum":["DELETE"]}},"required":["confirm"]},"AccountExportAccepted":{"type":"object","properties":{"status":{"type":"string","enum":["queued"]},"jobId":{"type":"string"}},"required":["status","jobId"]},"AccountExport":{"type":"object","properties":{"format":{"type":"string","enum":["lizzflix-account-export"]},"version":{"type":"number","enum":[1]},"generatedAt":{"type":"string"},"expiresAt":{"type":"string"},"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"display_name":{"type":"string","nullable":true},"created_at":{"type":"string"}},"required":["id","email","display_name","created_at"],"additionalProperties":{"nullable":true}},"identities":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"sessions":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"devices":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"studio":{"type":"object","properties":{"series":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"characters":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"locations":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"episodes":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"scenes":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"characterVoiceCasts":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"characterVoiceCastHistory":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"characterVoiceLines":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"sceneCharacterPlacements":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"sceneDialogueLines":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"sceneStartFrames":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"sceneRenders":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["series","characters","locations","episodes","scenes","characterVoiceCasts","characterVoiceCastHistory","characterVoiceLines","sceneCharacterPlacements","sceneDialogueLines","sceneStartFrames","sceneRenders"]},"media":{"type":"object","properties":{"assets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","url"],"additionalProperties":{"nullable":true}}},"library":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","url"],"additionalProperties":{"nullable":true}}},"libraryTags":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["assets","library","libraryTags"]},"jobs":{"type":"object","properties":{"generations":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"operations":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"magic":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["generations","operations","magic"]},"billing":{"type":"object","properties":{"account":{"type":"object","nullable":true,"additionalProperties":{"nullable":true}},"subscriptions":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"creditBuckets":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"ledger":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"usage":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"refunds":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"subscriptionChanges":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["account","subscriptions","creditBuckets","ledger","usage","refunds","subscriptionChanges"]},"consents":{"type":"object","properties":{"voiceClones":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"legalAcceptances":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"checkout":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["voiceClones","legalAcceptances","checkout"]},"requests":{"type":"object","properties":{"reports":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"support":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["reports","support"]},"mcp":{"type":"object","properties":{"uploads":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}}},"required":["uploads"]},"notices":{"type":"array","items":{"type":"object","additionalProperties":{"nullable":true}}},"truncated":{"type":"array","items":{"type":"string"}}},"required":["format","version","generatedAt","expiresAt","account","identities","sessions","devices","studio","media","jobs","billing","consents","requests","mcp","notices","truncated"]},"AccountStanding":{"type":"object","properties":{"status":{"type":"string"},"suspendedReason":{"type":"string","nullable":true},"suspendedAt":{"type":"string","nullable":true}},"required":["status","suspendedReason","suspendedAt"]},"AccountNotices":{"type":"object","properties":{"notices":{"type":"array","items":{"$ref":"#/components/schemas/AccountNotice"}}},"required":["notices"]},"AccountNotice":{"type":"object","properties":{"id":{"type":"string"},"template":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"emailStatus":{"type":"string","enum":["pending","sent","failed","cancelled"]},"createdAt":{"type":"string"},"sentAt":{"type":"string","nullable":true}},"required":["id","template","subject","body","emailStatus","createdAt","sentAt"]},"UploadSession":{"type":"object","properties":{"sessionId":{"type":"string"},"assetId":{"type":"string"},"r2Key":{"type":"string"},"mode":{"type":"string"},"uploadToken":{"type":"string"}},"required":["sessionId","assetId","r2Key","mode","uploadToken"],"additionalProperties":{"nullable":true}},"UploadSessionRequest":{"type":"object","properties":{"fileName":{"type":"string"},"mimeType":{"type":"string"},"byteSize":{"type":"number"},"targetKind":{"type":"string"},"targetRole":{"type":"string"},"targetRef":{"type":"object","additionalProperties":{"nullable":true}},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["fileName","mimeType","targetKind"]},"UploadResult":{"type":"object","properties":{"ok":{"type":"boolean"},"assetId":{"type":"string"}},"additionalProperties":{"nullable":true}},"UploadMultipartInitiateResponse":{"type":"object","properties":{"uploadId":{"type":"string"}},"additionalProperties":{"nullable":true}},"UploadMultipartPartResponse":{"type":"object","properties":{"etag":{"type":"string"},"partNumber":{"type":"number"}},"additionalProperties":{"nullable":true}},"UploadFinalizeResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"assetId":{"type":"string"}},"additionalProperties":{"nullable":true}},"ModelDescriptor":{"type":"object","properties":{"key":{"type":"string"},"displayName":{"type":"string"},"executionProvider":{"type":"string","enum":["openrouter","fal","runway","elevenlabs"]},"modelVendor":{"type":"string"},"providerModelId":{"type":"string"},"lifecycle":{"type":"string","enum":["preview","current","stable","deprecated"]},"enabled":{"type":"boolean"},"modality":{"type":"string","enum":["text","image","video","audio","multimodal"]},"pricing":{"$ref":"#/components/schemas/Pricing"},"billingPreview":{"$ref":"#/components/schemas/BillingPreview"},"sceneRenderable":{"type":"boolean","description":"Video models only: scenes can render with it now (a scene saving this key renders it, on a live binding with a verified adapter)."},"priceTable":{"$ref":"#/components/schemas/PriceTable"},"metadata":{"type":"object","properties":{"capabilities":{"$ref":"#/components/schemas/ModelCapabilities"}},"additionalProperties":{"nullable":true}},"referenceLimits":{"type":"array","items":{"$ref":"#/components/schemas/ReferenceLimit"},"description":"The reference image limits of this model's operations that take images, from the binding the worker enforces (GET /v1/studio/reference-limits serves the same). Absent for models that take none."}},"required":["key","displayName","executionProvider","modelVendor","providerModelId","lifecycle","enabled","modality","pricing","sceneRenderable"]},"Pricing":{"type":"object","properties":{"type":{"type":"string","enum":["per-token","per-character","per-image","per-second","flat","per-image-tiered","per-clip-tiered","per-second-audio-variant","runway-credits","per-second-rounded","per-second-tiered"]},"currency":{"type":"string","enum":["USD"]},"inputPerMillion":{"type":"number"},"outputPerMillion":{"type":"number"},"perImage":{"type":"number"},"perSecond":{"type":"number"},"perCharacter":{"type":"number"},"flat":{"type":"number"},"defaultTier":{"type":"string","description":"Tiered shapes: the tier priced when the request names none."},"tiers":{"type":"object","additionalProperties":{"type":"object","properties":{"perImage":{"type":"number"},"flat":{"type":"number"},"perSecond":{"type":"number"},"perSecondAudio":{"type":"number"}}}},"noAudio":{"type":"number"},"audio":{"type":"number"},"audioVoiceControl":{"type":"number"},"unit":{"type":"string","enum":["image","second"],"description":"runway-credits: what creditsPerUnit counts."},"creditsPerUnit":{"type":"number"},"resolutionTiers":{"type":"object","additionalProperties":{"type":"number"}},"audioVariant":{"type":"object","properties":{"noAudio":{"type":"number"},"audio":{"type":"number"}},"required":["noAudio","audio"]},"minimumCredits":{"type":"number"},"minimumUsd":{"type":"number"},"roundingSeconds":{"type":"number"},"billedDuration":{"anyOf":[{"type":"string","enum":["exact","ceil-int"]},{"type":"object","properties":{"blockSeconds":{"type":"number"}},"required":["blockSeconds"]}]},"allowanceUsd":{"type":"number"},"perReferenceImageUsd":{"type":"number"},"freeReferenceImages":{"type":"number"},"perStartFrameUsd":{"type":"number"},"perInputVideoSecondUsd":{"type":"number"},"estimatedFromRetailPoints":{"type":"number"}},"required":["type","currency"]},"BillingPreview":{"type":"object","properties":{"kind":{"type":"string","enum":["per_second","per_clip","per_image","flat","per_character","per_call"]},"minimumCredits":{"type":"number"},"creditsPerSecond":{"type":"number"},"creditsPerClip":{"type":"number"},"creditsPerImage":{"type":"number"},"creditsPer1kCharacters":{"type":"number"},"displayLabel":{"type":"string"},"pricingSource":{"type":"string"}},"required":["kind","minimumCredits","displayLabel","pricingSource"]},"PriceTable":{"type":"object","properties":{"fromCredits":{"type":"number","description":"The cheapest standard job: pickers show \"from N cr\" per basis."},"basis":{"type":"object","properties":{"unit":{"type":"string","enum":["seconds","image","characters","call"]},"quantity":{"type":"number"}},"required":["unit","quantity"]},"rows":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"credits":{"type":"number"},"finalCredits":{"type":"number"},"durationSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"resolution":{"type":"string"},"tier":{"type":"string"},"audio":{"type":"boolean"},"referenceImages":{"type":"number"},"characters":{"type":"number"}},"required":["credits"]}}},"required":["fromCredits","basis","rows"]},"ModelCapabilities":{"type":"object","properties":{"capabilitiesVersion":{"type":"number","enum":[2]},"tier":{"type":"string","enum":["draft","standard","premium"]},"licence":{"type":"string","enum":["commercial","research-only"]},"durations":{"anyOf":[{"type":"object","properties":{"min":{"type":"number"},"max":{"type":"number"}},"required":["min","max"]},{"type":"object","properties":{"values":{"type":"array","items":{"type":"number"}}},"required":["values"]}],"description":"Output seconds the model takes. Requests round up to the next allowed value; longer ones are refused."},"durationRules":{"type":"array","items":{"type":"object","properties":{"resolution":{"type":"string"},"values":{"type":"array","items":{"type":"number"}}},"required":["resolution","values"]}},"resolutions":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"default":{"type":"string"},"preview":{"type":"string"}},"required":["values","default"],"description":"Output resolutions; scene previews render at `preview`, finals at `default`."},"aspectRatios":{"type":"array","items":{"type":"string"}},"audio":{"type":"object","properties":{"native":{"type":"boolean"},"toggle":{"type":"boolean"},"defaultOn":{"type":"boolean"},"speechLanguages":{"type":"array","items":{"type":"string"}}},"required":["native","toggle","defaultOn"]},"frames":{"type":"object","properties":{"first":{"type":"string","enum":["required","optional","none"]},"last":{"type":"boolean"}},"required":["first","last"]},"references":{"type":"object","properties":{"images":{"type":"number"},"videos":{"type":"number"},"audio":{"type":"number"},"maxTotal":{"type":"number"},"maxTotalWithVideo":{"type":"number"},"maxCharacters":{"type":"number","description":"Characters the model keeps consistent; clients warn above it."},"required":{"type":"boolean"}},"required":["images"]},"seed":{"type":"boolean"},"negativePrompt":{"type":"boolean"},"promptLimit":{"type":"object","properties":{"chars":{"type":"number"},"utf8Bytes":{"type":"number"}}},"spokenLanguages":{"type":"array","items":{"type":"string"}},"adapterVerified":{"anyOf":[{"type":"boolean"},{"type":"object","additionalProperties":{"type":"boolean"}}],"description":"Whether a live test checked the provider request body, for every operation or per operation."}},"additionalProperties":{"nullable":true},"description":"Capabilities v2, next to the older boolean flags (supportsImageToVideo, maxReferenceImages, ...), which stay."},"ReferenceLimit":{"type":"object","properties":{"modelKey":{"type":"string"},"operation":{"type":"string"},"slot":{"type":"string"},"minImages":{"type":"integer"},"maxImages":{"type":"integer","nullable":true,"description":"Null when the binding sets no limit."},"maxCharacterImages":{"type":"integer","nullable":true,"description":"Characters whose identity the model keeps reliably; above it, warn (or refuse when characterLimitMode is hard)."},"characterLimitMode":{"type":"string","enum":["advisory","hard"]},"acceptedMimeTypes":{"type":"array","items":{"type":"string"}},"maxBytes":{"type":"integer","nullable":true},"strictInputs":{"type":"boolean","description":"The provider refuses other types and sizes: without Cloudflare Images to convert them, such a reference is refused (400)."},"providerBillsPerReference":{"type":"boolean"}},"required":["modelKey","operation","slot","minImages","maxImages","maxCharacterImages","characterLimitMode","acceptedMimeTypes","maxBytes","strictInputs","providerBillsPerReference"]},"ManualGrantsResponse":{"type":"object","properties":{"grants":{"type":"array","items":{"$ref":"#/components/schemas/ManualGrant"}}},"required":["grants"]},"ManualGrant":{"type":"object","properties":{"bucketId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"displayName":{"type":"string","nullable":true},"totalCredits":{"type":"number"},"totalPoints":{"type":"number"},"remainingCredits":{"type":"number"},"remainingPoints":{"type":"number"},"reason":{"type":"string"},"expiresAt":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["bucketId","userId","email","displayName","totalCredits","totalPoints","remainingCredits","remainingPoints","reason","expiresAt","createdAt"],"additionalProperties":{"nullable":true}},"AdminGrantResult":{"type":"object","properties":{"grant":{"type":"object","properties":{"userId":{"type":"string"},"bucketId":{"type":"string"},"credits":{"type":"number"},"points":{"type":"number"}},"required":["userId","bucketId","credits","points"]}},"required":["grant"]},"AdminGrantRequestBody":{"type":"object","properties":{"requestId":{"type":"string"}},"additionalProperties":{"nullable":true}},"TreasurySummary":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"BalanceSnapshotResponse":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"BalanceSnapshotRequest":{"type":"object","properties":{"provider":{"type":"string"},"balanceUsd":{"type":"number"}},"required":["provider","balanceUsd"]},"ModelCreateResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"key":{"type":"string"}},"required":["ok","key"]},"ModelCreateRequest":{"type":"object","properties":{"key":{"type":"string"},"displayName":{"type":"string"},"executionProvider":{"type":"string"},"modelVendor":{"type":"string"},"providerModelId":{"type":"string"},"lifecycle":{"type":"string"},"modality":{"type":"string"},"enabled":{"type":"boolean"},"pricing":{"type":"object","additionalProperties":{"nullable":true}},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"required":["key","displayName","executionProvider","providerModelId","modality","pricing"],"additionalProperties":{"nullable":true}},"AdminOkResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"ModelUpdateRequest":{"type":"object","properties":{"displayName":{"type":"string"},"enabled":{"type":"boolean"},"lifecycle":{"type":"string"},"pricing":{"type":"object","additionalProperties":{"nullable":true}},"metadata":{"type":"object","additionalProperties":{"nullable":true}}},"additionalProperties":{"nullable":true}},"SentrySmokeResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"eventId":{"type":"string","nullable":true},"project":{"type":"string"},"release":{"type":"string","nullable":true}},"required":["ok","eventId","project","release"]},"AdminVoiceClone":{"type":"object","properties":{"voiceId":{"type":"string"},"userId":{"type":"string"},"characterId":{"type":"string","nullable":true},"createdAt":{"type":"string"},"consent":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"speakerKind":{"type":"string"},"textVersion":{"type":"string"},"status":{"type":"string"}},"required":["id","speakerKind","textVersion","status"]}},"required":["voiceId","userId","characterId","createdAt","consent"]},"ContentReport":{"type":"object","properties":{"id":{"type":"string"},"reporterUserId":{"type":"string","nullable":true},"notifierName":{"type":"string","nullable":true},"notifierEmail":{"type":"string","nullable":true},"targetKind":{"type":"string","enum":["asset","render","character","location","series","other"]},"targetId":{"type":"string","nullable":true},"targetUrl":{"type":"string","nullable":true},"targetUserId":{"type":"string","nullable":true},"category":{"type":"string","enum":["illegal","ncii","csam","likeness","copyright","hate","violence","self_harm","spam","other"]},"explanation":{"type":"string"},"goodFaith":{"type":"boolean"},"locale":{"type":"string"},"surface":{"type":"string"},"status":{"type":"string","enum":["received","actioned","rejected"]},"priority":{"type":"number"},"intake":{"type":"string","enum":["standard","unverified"]},"abuseSuspected":{"type":"boolean"},"dueAt":{"type":"string"},"overdue":{"type":"boolean"},"decision":{"type":"string","nullable":true},"decisionNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"decidedAt":{"type":"string","nullable":true}},"required":["id","reporterUserId","notifierName","notifierEmail","targetKind","targetId","targetUrl","targetUserId","category","explanation","goodFaith","locale","surface","status","priority","intake","abuseSuspected","dueAt","overdue","decision","decisionNote","createdAt","decidedAt"]},"ModerationReportDetail":{"type":"object","properties":{"report":{"$ref":"#/components/schemas/ContentReport"},"target":{"type":"object","properties":{"label":{"type":"string"},"owner":{"$ref":"#/components/schemas/ModerationOwner"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ModerationFile"}}},"required":["label","owner","files"]},"actions":{"type":"array","items":{"$ref":"#/components/schemas/ModerationAction"}},"viewLinkTtlSeconds":{"type":"number"}},"required":["report","target","actions","viewLinkTtlSeconds"]},"ModerationOwner":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"suspendedReason":{"type":"string","nullable":true}},"required":["id","email","status","suspendedReason"]},"ModerationFile":{"type":"object","properties":{"kind":{"type":"string","enum":["media_asset","user_asset"]},"id":{"type":"string"},"label":{"type":"string"},"mimeType":{"type":"string","nullable":true},"status":{"type":"string"},"disabled":{"type":"boolean"},"viewUrl":{"type":"string","nullable":true}},"required":["kind","id","label","mimeType","status","disabled","viewUrl"]},"ModerationAction":{"type":"object","properties":{"id":{"type":"string"},"reportId":{"type":"string","nullable":true},"targetKind":{"type":"string","enum":["media_asset","user_asset","user","report"]},"targetId":{"type":"string"},"targetUserId":{"type":"string","nullable":true},"action":{"type":"string","enum":["disable_asset","restore_asset","delete_asset","suspend_user","restore_user","reject_report"]},"groundKind":{"type":"string","enum":["law","terms","none"]},"groundRef":{"type":"string","nullable":true},"automated":{"type":"boolean"},"facts":{"type":"string"},"statementText":{"type":"string","nullable":true},"noticeQueued":{"type":"boolean"},"quarantined":{"type":"boolean"},"actorUserId":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","reportId","targetKind","targetId","targetUserId","action","groundKind","groundRef","automated","facts","statementText","noticeQueued","quarantined","actorUserId","createdAt"]},"ModerationActionBody":{"type":"object","properties":{"action":{"type":"string","enum":["disable_asset","restore_asset","delete_asset","suspend_user","restore_user","reject_report"]},"reportId":{"type":"string"},"targetKind":{"type":"string","enum":["media_asset","user_asset","user"]},"targetId":{"type":"string"},"targetEmail":{"type":"string"},"groundKind":{"type":"string","enum":["law","terms","none"]},"groundRef":{"type":"string","maxLength":500},"facts":{"type":"string","minLength":1,"maxLength":4000},"automated":{"type":"boolean"},"userReason":{"type":"string","maxLength":1000},"note":{"type":"string","maxLength":4000}},"required":["action","groundKind","facts"]},"SuspendedAccount":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"suspendedReason":{"type":"string","nullable":true},"suspendedAt":{"type":"string","nullable":true},"status":{"type":"string","enum":["suspended","deleting"]}},"required":["id","email","suspendedReason","suspendedAt"]},"SupportRequest":{"type":"object","properties":{"id":{"type":"string"},"mode":{"type":"string","enum":["support","privacy","deletion","billing","withdrawal","report","copyright"]},"userId":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"details":{"type":"string"},"locale":{"type":"string"},"surface":{"type":"string"},"status":{"type":"string","enum":["open","answered","closed"]},"intake":{"type":"string","enum":["standard","unverified"]},"abuseSuspected":{"type":"boolean"},"dueAt":{"type":"string"},"adminNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"closedAt":{"type":"string","nullable":true}},"required":["id","mode","userId","email","name","details","locale","surface","status","intake","abuseSuspected","dueAt","adminNote","createdAt","updatedAt","closedAt"]},"SupportRequestPatch":{"type":"object","properties":{"status":{"type":"string","enum":["open","answered","closed"]},"adminNote":{"type":"string","nullable":true,"maxLength":4000}}},"AdminPurchase":{"type":"object","properties":{"purchaseId":{"type":"string"},"kind":{"type":"string","enum":["topup","plan"]},"itemName":{"type":"string"},"sourceRef":{"type":"string","nullable":true},"purchasedAt":{"type":"string"},"totalCredits":{"type":"number"},"unusedCredits":{"type":"number"},"listPriceCents":{"type":"number"}},"required":["purchaseId","kind","itemName","sourceRef","purchasedAt","totalCredits","unusedCredits","listPriceCents"]},"AdminRefundBody":{"type":"object","properties":{"purchaseId":{"type":"string"},"amountCents":{"type":"integer","minimum":0},"clawBackCredits":{"type":"boolean"},"reason":{"type":"string","minLength":1,"maxLength":1000}},"required":["purchaseId","clawBackCredits","reason"]},"ContentReportAccepted":{"type":"object","properties":{"reportId":{"type":"string"},"status":{"type":"string","enum":["received"]},"dueAt":{"type":"string"}},"required":["reportId","status","dueAt"]},"ContentReportBody":{"type":"object","properties":{"targetKind":{"type":"string","enum":["asset","render","character","location","series","other"]},"targetId":{"type":"string","maxLength":200},"targetUrl":{"type":"string","maxLength":2000},"category":{"type":"string","enum":["illegal","ncii","csam","likeness","copyright","hate","violence","self_harm","spam","other"]},"explanation":{"type":"string","minLength":1,"maxLength":4000},"goodFaith":{"type":"boolean"},"notifierName":{"type":"string","maxLength":200},"notifierEmail":{"type":"string","maxLength":320},"locale":{"type":"string","enum":["en","ru"]},"surface":{"type":"string","enum":["web","ios","android","mcp","public"]}},"required":["targetKind","category","explanation","goodFaith"]},"SupportRequestAccepted":{"type":"object","properties":{"ticketId":{"type":"string"},"status":{"type":"string","enum":["open"]},"dueAt":{"type":"string"}},"required":["ticketId","status","dueAt"]},"SupportRequestBody":{"type":"object","properties":{"mode":{"type":"string","enum":["support","privacy","deletion","billing","withdrawal","report","copyright"]},"details":{"type":"string","minLength":1,"maxLength":8000},"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":320},"locale":{"type":"string","enum":["en","ru"]},"surface":{"type":"string","enum":["web","ios","android"]}},"required":["mode","details"]},"ProviderWebhookResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"skipped":{"type":"boolean"},"jobId":{"type":"string"}},"required":["ok"]},"ProviderWebhookPayload":{"type":"object","properties":{},"additionalProperties":{"nullable":true}},"RegisterDeviceBody":{"type":"object","properties":{"platform":{"$ref":"#/components/schemas/DevicePlatform"},"token":{"type":"string","minLength":1}},"required":["platform","token"]},"DevicePlatform":{"type":"string","enum":["android","ios"]},"MagicCreateJobResponse":{"type":"object","properties":{"jobId":{"type":"string"},"seriesId":{"type":"string"},"episodeId":{"type":"string"}},"required":["jobId","seriesId","episodeId"]},"MagicCreateJobBody":{"type":"object","properties":{"seriesId":{"type":"string"},"destinationSeriesTitle":{"type":"string"},"prompt":{"type":"string","minLength":1,"maxLength":2000},"lengthPreset":{"type":"string","enum":["15s","30s","60s"]},"userAssetIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20,"default":[]}},"required":["prompt","lengthPreset"]},"MagicJobSnapshot":{"type":"object","properties":{"id":{"type":"string"},"seriesId":{"type":"string"},"episodeId":{"type":"string"},"status":{"type":"string","enum":["classifying","planning","sketching","sketch_ready","executing","complete","cancelled","failed"]},"inputs":{"type":"object","properties":{"prompt":{"type":"string"},"lengthPreset":{"type":"string","enum":["15s","30s","60s"]}},"required":["prompt","lengthPreset"]},"blueprint":{"$ref":"#/components/schemas/MagicBlueprint"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/MagicAttachmentSnapshot"}},"costEstimateCr":{"type":"integer","minimum":0},"costActualCr":{"type":"integer","minimum":0},"sketchCostCr":{"type":"number"},"videoCostCr":{"type":"number"},"staticsReady":{"type":"number"},"staticsTotal":{"type":"number"},"plannerModel":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","seriesId","episodeId","status","inputs","blueprint","attachments","costEstimateCr","costActualCr","sketchCostCr","videoCostCr","staticsReady","staticsTotal","plannerModel","errorCode","errorMessage","createdAt","updatedAt"]},"MagicBlueprint":{"type":"object","nullable":true,"properties":{"version":{"type":"number","enum":[1]},"classification":{"type":"object","properties":{"characters":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"}},"required":["description"]}}},"required":["name","description"]}},"locations":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"}},"required":["description"]}}},"required":["name","description"]}},"styleRefs":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"note":{"type":"string"}},"required":["attachmentId","note"]}},"dialogue":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"text":{"type":"string"},"assignedSceneIndex":{"type":"integer"}},"required":["text"]}},"userVideos":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"intendedUse":{"type":"string","enum":["restyle","extend","lipsync"]}},"required":["attachmentId","intendedUse"]}}},"required":["characters","locations","styleRefs","dialogue","userVideos"]},"episode":{"type":"object","properties":{"title":{"type":"string"},"synopsis":{"type":"string"},"targetDurationSec":{"type":"integer","minimum":1},"sceneCount":{"type":"integer","minimum":1},"scenes":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"pipeline":{"type":"string","enum":["scratch","ref","dialogue","restyle","extend","lipsync"]},"beat":{"type":"string"},"charactersRef":{"type":"array","items":{"type":"string"}},"locationRef":{"type":"string","nullable":true},"dialogue":{"type":"string"},"videoInputRef":{"type":"string"},"modelRecommendation":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reason":{"type":"string"}},"required":["provider","model","reason"]},"estimatedCostCredits":{"type":"integer","minimum":0}},"required":["index","pipeline","beat","charactersRef","locationRef","modelRecommendation","estimatedCostCredits"]}}},"required":["title","synopsis","targetDurationSec","sceneCount","scenes"]},"assetPlan":{"type":"object","properties":{"charactersToCreate":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"}},"required":["description"]}}},"required":["name","description"]}},"locationsToCreate":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"variants":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"}},"required":["description"]}}},"required":["name","description"]}}},"required":["charactersToCreate","locationsToCreate"]}},"required":["version","classification","episode","assetPlan"]},"MagicAttachmentSnapshot":{"type":"object","properties":{"id":{"type":"string"},"r2Key":{"type":"string"},"mime":{"type":"string"},"sizeBytes":{"type":"integer","minimum":0},"classifiedType":{"type":"string","enum":["character","location","style_ref","dialogue_script","user_video_restyle","user_video_extend","user_video_lipsync","ignore","unknown"]},"classifiedName":{"type":"string"},"userOverrideType":{"type":"string","nullable":true,"enum":["character","location","style_ref","dialogue_script","user_video_restyle","user_video_extend","user_video_lipsync","ignore","unknown",null]},"userOverrideName":{"type":"string","nullable":true},"classifierDescription":{"type":"string","nullable":true},"contentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","r2Key","mime","sizeBytes","classifiedType","classifiedName","userOverrideType","userOverrideName","classifierDescription","contentUrl","createdAt"]},"MagicPlanPatchBody":{"type":"object","properties":{"attachmentOverrides":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"string"},"type":{"type":"string","enum":["character","location","style_ref","dialogue_script","user_video_restyle","user_video_extend","user_video_lipsync","ignore","unknown"]},"name":{"type":"string"}},"required":["attachmentId"]}},"blueprintEdits":{"$ref":"#/components/schemas/MagicBlueprintEdits"}}},"MagicBlueprintEdits":{"type":"object","properties":{"episode":{"type":"object","properties":{"title":{"type":"string"},"synopsis":{"type":"string"},"scenes":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0},"beat":{"type":"string"},"modelRecommendation":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"reason":{"type":"string"}},"required":["provider","model","reason"]},"dropped":{"type":"boolean"}},"required":["index"]}}}},"assetPlan":{"type":"object","properties":{"charactersToCreate":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"dropped":{"type":"boolean"}},"required":["name"]}},"locationsToCreate":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"dropped":{"type":"boolean"}},"required":["name"]}}}}}},"MagicPreviewResponse":{"type":"object","properties":{"sketchCreditsMax":{"type":"number"},"videoCreditsMax":{"type":"number"},"totalCreditsMax":{"type":"number"},"breakdown":{"type":"object","properties":{"characters":{"type":"object","properties":{"attached":{"type":"number"},"toGenerate":{"type":"number"},"creditsPerSlot":{"type":"number"}},"required":["attached","toGenerate","creditsPerSlot"]},"locations":{"type":"object","properties":{"attached":{"type":"number"},"toGenerate":{"type":"number"},"creditsPerSlot":{"type":"number"}},"required":["attached","toGenerate","creditsPerSlot"]},"scenes":{"type":"object","properties":{"count":{"type":"number"},"creditsPerSlot":{"type":"number"}},"required":["count","creditsPerSlot"]},"video":{"type":"object","properties":{"expectedModelKey":{"type":"string"},"secondsPerScene":{"type":"number"},"creditsPerScene":{"type":"number"},"audio":{"type":"boolean"}},"required":["expectedModelKey","secondsPerScene","creditsPerScene","audio"]}},"required":["characters","locations","scenes","video"]},"currentBalanceCredits":{"type":"number"},"insufficient":{"type":"boolean"}},"required":["sketchCreditsMax","videoCreditsMax","totalCreditsMax","breakdown","currentBalanceCredits","insufficient"]},"MagicPreviewBody":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"lengthPreset":{"type":"string","enum":["15s","30s","60s"]},"userAssetIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20,"default":[]},"audio":{"type":"boolean"},"qualityPreference":{"type":"string","enum":["economy","balanced","premium"]}},"required":["prompt","lengthPreset"]},"LegalNotice":{"type":"object","properties":{"slug":{"type":"string"},"locale":{"type":"string","enum":["en","ru"]},"version":{"type":"string","description":"Date of the current wording (YYYY-MM-DD); viewer.legal asks again when it changes."},"title":{"type":"string"},"paragraphs":{"type":"array","items":{"type":"string"},"description":"Markdown; links are absolute."},"allow":{"type":"string","description":"Label of the button that gives permission."},"notNow":{"type":"string","description":"Label of the button that declines for now."},"text":{"type":"string","description":"The plain text shown (title, then paragraphs); acceptance records keep its SHA-256."}},"required":["slug","locale","version","title","paragraphs","allow","notNow","text"]},"ReferenceImagePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReferenceImage"}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"ReferenceImage":{"type":"object","properties":{"ref":{"type":"string","description":"Handle to send back as a reference: `asset:<id>` for a studio image, `library:<id>` for a library upload.","example":"asset:4b0f8c1e-2d5a-4c7e-9a1b-3f6d8e2c1a90"},"id":{"type":"string"},"origin":{"type":"string","enum":["media","library"]},"kind":{"$ref":"#/components/schemas/ReferenceImageKind"},"source":{"type":"string","enum":["generated","uploaded","imported","frame"]},"label":{"type":"string"},"mimeType":{"type":"string"},"width":{"type":"integer","nullable":true},"height":{"type":"integer","nullable":true},"byteSize":{"type":"integer","nullable":true},"thumbnailPath":{"type":"string","description":"Owner-only thumbnail (`/v1/...`; web prefixes `/api`). WebP when Cloudflare Images is enabled, else the original bytes."},"contentPath":{"type":"string","nullable":true,"description":"Full image of a studio image; null for library items."},"contentUrl":{"type":"string","nullable":true,"description":"One-hour signed link to a library item's bytes; null for studio images."},"seriesId":{"type":"string","nullable":true},"seriesTitle":{"type":"string","nullable":true},"characterId":{"type":"string","nullable":true},"characterName":{"type":"string","nullable":true},"locationId":{"type":"string","nullable":true},"locationName":{"type":"string","nullable":true},"episodeId":{"type":"string","nullable":true},"sceneId":{"type":"string","nullable":true},"isApproved":{"type":"boolean"},"modelKey":{"type":"string","nullable":true},"createdAt":{"type":"string"},"lastReferencedAt":{"type":"string","nullable":true}},"required":["ref","id","origin","kind","source","label","mimeType","width","height","byteSize","thumbnailPath","contentPath","contentUrl","seriesId","seriesTitle","characterId","characterName","locationId","locationName","episodeId","sceneId","isApproved","modelKey","createdAt","lastReferencedAt"]},"ReferenceImageKind":{"type":"string","enum":["character","location","start_frame","render_frame","upload","other"]},"ReferenceLimits":{"type":"object","properties":{"limits":{"type":"array","items":{"$ref":"#/components/schemas/ReferenceLimit"}},"imageModel":{"allOf":[{"$ref":"#/components/schemas/ReferenceLimit"},{"type":"object","nullable":true,"properties":{"imageModelId":{"type":"string"},"requiresReferences":{"type":"boolean","description":"The model generates only from references: a request without one is refused (400 reason reference_required)."}},"required":["imageModelId","requiresReferences"]}],"description":"With `imageModelId`: the limit of the model operation that model runs with references (Nano Banana 2 uses its edit model). Null when it takes no references."},"startFrame":{"type":"object","properties":{"modelKey":{"type":"string"},"operation":{"type":"string"},"maxCharacters":{"type":"integer","nullable":true,"description":"Characters next to the location plate; null when unlimited."},"warnAboveCharacters":{"type":"integer","nullable":true}},"required":["modelKey","operation","maxCharacters","warnAboveCharacters"]}},"required":["limits","startFrame"]},"ImportImageResponse":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/StudioImageAsset"},"created":{"type":"boolean","description":"False when the image already was one of the target's (used as it is) or was imported before."}},"required":["asset","created"]},"ImportImageBody":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ReferenceHandle"},"label":{"type":"string","maxLength":200},"approve":{"type":"boolean","description":"Make it the approved image (a first image is approved anyway)."}},"required":["ref"]},"ImportStartFrameResponse":{"type":"object","properties":{"startFrame":{"$ref":"#/components/schemas/StudioStartFrame"},"created":{"type":"boolean"}},"required":["startFrame","created"]},"ImportStartFrameBody":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ReferenceHandle"},"label":{"type":"string","maxLength":200},"approve":{"type":"boolean","description":"Approve it as the scene's start frame."}},"required":["ref"]},"LegalAcceptanceResponse":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"version":{"type":"string"}},"required":["slug","version"]}},"legal":{"$ref":"#/components/schemas/LegalStatus"}},"required":["accepted","legal"]},"LegalAcceptanceRequest":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64},"version":{"type":"string","minLength":1,"maxLength":32}},"required":["slug","version"]},"maxItems":20,"description":"The documents shown, each at the version from viewer.legal.required."},"ageConfirmed":{"type":"boolean","enum":[true],"description":"The user confirmed being 18 or older."},"aiSharingAcknowledged":{"type":"boolean","enum":[true],"description":"The user allowed the third-party AI processing notice."},"locale":{"type":"string","minLength":2,"maxLength":16,"description":"Language the texts were shown in: en or ru."},"surface":{"type":"string","enum":["web","ios","android","mcp"]},"contextId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Optional context of the acceptance, for example the app being connected."}},"required":["documents","ageConfirmed","locale","surface"]}},"parameters":{}},"paths":{"/v1/auth/email/request":{"post":{"tags":["Auth"],"summary":"Request an email verification token","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"redirectTo":{"type":"string","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Verification issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueTokenResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/email/verify":{"post":{"tags":["Auth"],"summary":"Verify an email token and create a session","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/password/signin":{"post":{"tags":["Auth"],"summary":"Sign in with email and password","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]}}}},"responses":{"200":{"description":"Session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/password/request-reset":{"post":{"tags":["Auth"],"summary":"Request a password reset token","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"redirectTo":{"type":"string","nullable":true}},"required":["email"]}}}},"responses":{"200":{"description":"Reset token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueTokenResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/password/reset":{"post":{"tags":["Auth"],"summary":"Reset password using a reset token","description":"Sets the new password, signs the user out everywhere by revoking every existing session, and returns a new session.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"password":{"type":"string"}},"required":["token","password"]}}}},"responses":{"200":{"description":"Password reset and session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionEnvelope"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"The reset could not be saved; nothing changed and the same link can be retried","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/google/start":{"get":{"tags":["Auth"],"summary":"Start Google OAuth flow","parameters":[{"schema":{"type":"string"},"required":false,"name":"redirectTo","in":"query"}],"responses":{"302":{"description":"Redirect to Google"},"501":{"description":"Google OAuth not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/google/callback":{"get":{"tags":["Auth"],"summary":"Google OAuth callback","parameters":[{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string"},"required":false,"name":"code","in":"query"}],"responses":{"302":{"description":"Redirect back to app with session cookie"},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Failed to create user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/apple/signin":{"post":{"tags":["Auth"],"summary":"Sign in with Apple (native identity token)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"identityToken":{"type":"string","minLength":1},"name":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"}}}},"required":["identityToken"]}}}},"responses":{"200":{"description":"Issued session","content":{"application/json":{"schema":{"type":"object","properties":{"sessionToken":{"type":"string"},"viewer":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true}},"required":["id","email"]}},"required":["sessionToken","viewer"]}}}},"400":{"description":"Invalid identity token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Apple sign-in not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/auth/session":{"get":{"tags":["Auth"],"summary":"Get the current session viewer","responses":{"200":{"description":"Current viewer (may be null if not signed in)","content":{"application/json":{"schema":{"type":"object","properties":{"viewer":{"$ref":"#/components/schemas/Viewer"}},"required":["viewer"]}}}}}},"post":{"tags":["Auth"],"summary":"Destroy the current session (logout)","description":"Revokes every session the request presents: the session cookie and Authorization: Bearer (native apps). Always 200; the response clears the session cookie.","responses":{"200":{"description":"Session destroyed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}}}}},"/v1/auth/profile":{"get":{"tags":["Auth"],"summary":"Get the current viewer profile","responses":{"200":{"description":"Current viewer profile","content":{"application/json":{"schema":{"type":"object","properties":{"viewer":{"$ref":"#/components/schemas/Viewer"}},"required":["viewer"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Auth"],"summary":"Update the current viewer profile","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string","nullable":true},"language":{"type":"string","nullable":true}}}}}},"responses":{"200":{"description":"Updated viewer profile","content":{"application/json":{"schema":{"type":"object","properties":{"viewer":{"$ref":"#/components/schemas/Viewer"}},"required":["viewer"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/summary":{"get":{"tags":["Billing"],"summary":"Get billing summary for the current viewer","responses":{"200":{"description":"Billing summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSummary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create a Stripe checkout session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutRequest"}}}},"responses":{"200":{"description":"Checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/portal":{"post":{"tags":["Billing"],"summary":"Create a Stripe billing portal session","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalRequest"}}}},"responses":{"200":{"description":"Portal session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/webhooks/stripe":{"post":{"tags":["Billing"],"summary":"Stripe webhook endpoint","description":"Receives Stripe webhook events. Request body is the raw Stripe event payload; the signature is verified against STRIPE_WEBHOOK_SECRET.","responses":{"200":{"description":"Webhook processed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookResponse"}}}},"400":{"description":"Bad request (signature or payload)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/history":{"get":{"tags":["Billing"],"summary":"List the viewer's credit-ledger events (newest-first, cursor paginated)","parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Billing history page","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingHistoryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingHistoryErrorResponse"}}}}}}},"/v1/billing/withdrawable":{"get":{"tags":["Billing"],"summary":"Purchases that can still be withdrawn from (14 days)","responses":{"200":{"description":"Withdrawable purchases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawableList"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/withdrawals":{"post":{"tags":["Billing"],"summary":"Withdraw from a purchase and get the refund (CRD Art 11a)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalBody"}}}},"responses":{"201":{"description":"Withdrawn and refunded","content":{"application/json":{"schema":{"type":"object","properties":{"withdrawal":{"$ref":"#/components/schemas/BillingRefund"}},"required":["withdrawal"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Not possible now (window closed, already withdrawn, generation running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Stripe refused; the credits are back and a retry is possible (a plan already ended stays ended). With reason refund_pending Stripe has not confirmed the refund yet: the credits stay taken back until the 6-hourly maintenance cron settles it from Stripe's records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/subscription/cancel":{"post":{"tags":["Billing"],"summary":"Cancel the plan at the end of the current period","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeBody"}}}},"responses":{"200":{"description":"Plan changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No active plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already in that state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Stripe refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/billing/subscription/resume":{"post":{"tags":["Billing"],"summary":"Undo a plan cancellation before the period ends","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeBody"}}}},"responses":{"200":{"description":"Plan changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChangeResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No active plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already in that state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Stripe refused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio":{"get":{"tags":["Studio"],"summary":"Get studio index data for the current viewer","responses":{"200":{"description":"Studio index data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioOverview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/voices/elevenlabs":{"get":{"tags":["Studio"],"summary":"List ElevenLabs voices available to studio","description":"Premade and professional voices of the platform ElevenLabs account plus voices already cast on the viewer's own characters (including the viewer's custom clones). Other users' clones are never listed.","responses":{"200":{"description":"Available voices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioVoiceCatalog"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice is not one of the viewer's own and the ElevenLabs voice catalog cannot be read right now (timeout, network error or provider error). Code PROVIDER_UNAVAILABLE, reason voice_catalog_unavailable; nothing was saved or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/assets":{"get":{"tags":["Studio"],"summary":"List the viewer's media assets, optionally filtered by `kind` (e.g. `music`).","parameters":[{"schema":{"type":"string"},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"User assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioAssetList"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series":{"post":{"tags":["Studio"],"summary":"Create a series (async job)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Series creation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}":{"get":{"tags":["Studio"],"summary":"Get a series overview","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"}],"responses":{"200":{"description":"Series overview","content":{"application/json":{"schema":{"type":"object","properties":{"series":{"$ref":"#/components/schemas/StudioOverview"}},"required":["series"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/refine":{"post":{"tags":["Studio"],"summary":"Refine series story (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Story refinement job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters":{"post":{"tags":["Studio"],"summary":"Create a character (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Character creation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"400":{"description":"fromRef is not a reference handle (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"fromRef is not one of your images (`reason` reference_not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}":{"get":{"tags":["Studio"],"summary":"Get a character's detail view","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Character detail","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"$ref":"#/components/schemas/StudioCharacter"}},"required":["character"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Studio"],"summary":"Update a character","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated character","content":{"application/json":{"schema":{"type":"object","properties":{"character":{"$ref":"#/components/schemas/StudioCharacter"}},"required":["character"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-preview":{"post":{"tags":["Studio"],"summary":"Preview a voice for a character","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Voice preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioVoicePreview"}}}},"400":{"description":"A required field is missing (code VALIDATION_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Not enough credits for the preview (code BILLING_INSUFFICIENT_CREDITS)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Series or character not found, or \"Voice not found.\": the voice is neither a premade/professional catalog voice nor cast on the viewer's own characters. Nothing was saved or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice is not one of the viewer's own and the ElevenLabs voice catalog cannot be read right now (timeout, network error or provider error). Code PROVIDER_UNAVAILABLE, reason voice_catalog_unavailable; nothing was saved or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-cast":{"patch":{"tags":["Studio"],"summary":"Update a character's voice cast","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated voice cast","content":{"application/json":{"schema":{"type":"object","properties":{"cast":{"$ref":"#/components/schemas/StudioVoiceCast"}},"required":["cast"]}}}},"400":{"description":"A required field is missing (code VALIDATION_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Series or character not found, or \"Voice not found.\": the voice is neither a premade/professional catalog voice nor cast on the viewer's own characters. Nothing was saved or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The voice is not one of the viewer's own and the ElevenLabs voice catalog cannot be read right now (timeout, network error or provider error). Code PROVIDER_UNAVAILABLE, reason voice_catalog_unavailable; nothing was saved or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-casts":{"get":{"tags":["Studio"],"summary":"List a character's voice casts","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"responses":{"200":{"description":"Voice casts","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-casts/custom":{"post":{"tags":["Studio"],"summary":"Create a custom voice cast (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Custom voice cast job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-casts/{castId}":{"patch":{"tags":["Studio"],"summary":"Patch a voice cast history entry","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"castId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated voice cast","content":{"application/json":{"schema":{"type":"object","properties":{"cast":{"$ref":"#/components/schemas/StudioVoiceCast"}},"required":["cast"]}}}},"400":{"description":"A required field is missing or the action is not archive, rename or set-default (code VALIDATION_FAILED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Series, character or voice cast history entry not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-lines/generate":{"post":{"tags":["Studio"],"summary":"Generate a voice line for a character","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Generated voice line","content":{"application/json":{"schema":{"type":"object","properties":{"voiceLine":{"$ref":"#/components/schemas/StudioVoiceLine"}},"required":["voiceLine"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-lines/upload":{"post":{"tags":["Studio"],"summary":"Upload a manual voice line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Uploaded voice line","content":{"application/json":{"schema":{"type":"object","properties":{"voiceLine":{"$ref":"#/components/schemas/StudioVoiceLine"}},"required":["voiceLine"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-lines/record-complete":{"post":{"tags":["Studio"],"summary":"Complete recording of a voice line (manual)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Recorded voice line","content":{"application/json":{"schema":{"type":"object","properties":{"voiceLine":{"$ref":"#/components/schemas/StudioVoiceLine"}},"required":["voiceLine"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/voice-lines/{voiceLineId}":{"patch":{"tags":["Studio"],"summary":"Patch a character voice line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"voiceLineId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated voice line","content":{"application/json":{"schema":{"type":"object","properties":{"voiceLine":{"$ref":"#/components/schemas/StudioVoiceLine"}},"required":["voiceLine"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Studio"],"summary":"Delete a character voice line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"voiceLineId","in":"path"}],"responses":{"204":{"description":"Voice line deleted"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/image-assets/upload-complete":{"post":{"tags":["Studio"],"summary":"Complete a character image upload","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Completed image upload","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/StudioImageAsset"}},"required":["asset"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/image-assets/generate":{"post":{"tags":["Studio"],"summary":"Generate a character image (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityImageGenerateBody"}}}},"responses":{"202":{"description":"Image generation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"400":{"description":"Invalid body or references (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Character or a reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/image-assets/{assetId}":{"patch":{"tags":["Studio"],"summary":"Patch a character image asset","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"assetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated asset","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}},"required":["result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations":{"post":{"tags":["Studio"],"summary":"Create a location (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Location creation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"400":{"description":"fromRef is not a reference handle (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"fromRef is not one of your images (`reason` reference_not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations/{locationId}":{"get":{"tags":["Studio"],"summary":"Get a location's detail view","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"}],"responses":{"200":{"description":"Location detail","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/StudioLocation"}},"required":["location"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Studio"],"summary":"Update a location","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated location","content":{"application/json":{"schema":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/StudioLocation"}},"required":["location"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations/{locationId}/assets/upload-complete":{"post":{"tags":["Studio"],"summary":"Complete a location asset upload","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Completed asset upload","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/StudioImageAsset"}},"required":["asset"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations/{locationId}/assets/generate":{"post":{"tags":["Studio"],"summary":"Generate a location asset (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityImageGenerateBody"}}}},"responses":{"202":{"description":"Location asset generation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"400":{"description":"Invalid body or references (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Location or a reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations/{locationId}/assets/{assetId}":{"patch":{"tags":["Studio"],"summary":"Patch a location asset","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"assetId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated asset","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}},"required":["result"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes":{"post":{"tags":["Studio"],"summary":"Create an episode (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Episode creation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}":{"get":{"tags":["Studio"],"summary":"Get an episode's detail view","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"}],"responses":{"200":{"description":"Episode detail","content":{"application/json":{"schema":{"type":"object","properties":{"episode":{"$ref":"#/components/schemas/StudioEpisode"}},"required":["episode"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Studio"],"summary":"Update an episode","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEpisodeBody"}}}},"responses":{"200":{"description":"Updated episode","content":{"application/json":{"schema":{"type":"object","properties":{"episode":{"$ref":"#/components/schemas/StudioEpisode"}},"required":["episode"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes":{"post":{"tags":["Studio"],"summary":"Create a scene (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Scene creation job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/propose":{"post":{"tags":["Studio"],"summary":"Propose scenes for an episode (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Scene proposal job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}":{"patch":{"tags":["Studio"],"summary":"Update a scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated scene","content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"$ref":"#/components/schemas/StudioScene"}},"required":["scene"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Studio"],"summary":"Delete a scene (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"responses":{"202":{"description":"Scene deletion job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/dialogue-lines":{"post":{"tags":["Studio"],"summary":"Create a dialogue line for a scene","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"201":{"description":"Created dialogue line","content":{"application/json":{"schema":{"type":"object","properties":{"line":{"$ref":"#/components/schemas/StudioDialogueLine"}},"required":["line"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/dialogue-lines/generate-audio":{"post":{"tags":["Studio"],"summary":"Generate audio for a scene dialogue line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Dialogue line with generated audio","content":{"application/json":{"schema":{"type":"object","properties":{"line":{"$ref":"#/components/schemas/StudioDialogueLine"}},"required":["line"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/dialogue-lines/{lineId}/upload":{"post":{"tags":["Studio"],"summary":"Attach uploaded audio to a dialogue line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"lineId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Dialogue line with attached audio","content":{"application/json":{"schema":{"type":"object","properties":{"line":{"$ref":"#/components/schemas/StudioDialogueLine"}},"required":["line"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/dialogue-lines/{lineId}/record-complete":{"post":{"tags":["Studio"],"summary":"Complete recording of a scene dialogue line","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"lineId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Dialogue line with recording","content":{"application/json":{"schema":{"type":"object","properties":{"line":{"$ref":"#/components/schemas/StudioDialogueLine"}},"required":["line"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/model":{"patch":{"tags":["Studio"],"summary":"Patch a scene's model selection","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated scene","content":{"application/json":{"schema":{"type":"object","properties":{"scene":{"$ref":"#/components/schemas/StudioScene"}},"required":["scene"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/compose-start-frame":{"post":{"tags":["Studio"],"summary":"Compose a start frame for a scene (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeStartFrameBody"}}}},"responses":{"202":{"description":"Start frame job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"400":{"description":"Invalid body or references (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Scene, an image or a reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/start-frames/{frameId}":{"patch":{"tags":["Studio"],"summary":"Patch a scene start frame","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"frameId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"200":{"description":"Updated start frame","content":{"application/json":{"schema":{"type":"object","properties":{"frame":{"$ref":"#/components/schemas/StudioStartFrame"}},"required":["frame"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/generate-preview":{"post":{"tags":["Studio"],"summary":"Generate a scene preview (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"responses":{"202":{"description":"Preview job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/render-final":{"post":{"tags":["Studio"],"summary":"Render the final version of a scene (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"responses":{"202":{"description":"Render job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioGenerationJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/use-preview-as-final":{"post":{"tags":["Studio"],"summary":"Promote a preview render to final","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"renderId":{"type":"string"}},"required":["renderId"]}}}},"responses":{"200":{"description":"Promoted render","content":{"application/json":{"schema":{"type":"object","properties":{"render":{"$ref":"#/components/schemas/StudioRender"}},"required":["render"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/renders/{renderId}":{"delete":{"tags":["Studio"],"summary":"Delete a scene render","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"responses":{"200":{"description":"Render deleted","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{"nullable":true}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/renders/{renderId}/media":{"get":{"tags":["Studio"],"summary":"Get media for a scene render","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"source","in":"query"}],"responses":{"200":{"description":"Render media info","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"$ref":"#/components/schemas/StudioRenderMedia"}},"required":["media"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/renders/{renderId}/attach-audio":{"post":{"tags":["Studio"],"summary":"Attach audio to a scene render (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Attach audio job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/renders/{renderId}/dialogue-mix":{"post":{"tags":["Studio"],"summary":"Save a render dialogue mix (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Dialogue mix save job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Studio"],"summary":"Update a render dialogue mix (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Dialogue mix save job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Studio"],"summary":"Clear a render dialogue mix (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"responses":{"202":{"description":"Dialogue mix clear job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/renders/{renderId}/apply-dialogue":{"post":{"tags":["Studio"],"summary":"Apply the dialogue mix to a render (async job)","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"renderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LooseJsonBody"}}}},"responses":{"202":{"description":"Apply dialogue job accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJobAcceptedResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/jobs":{"post":{"tags":["Jobs"],"summary":"Create a generation job","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGenerationJobRequest"}}}},"responses":{"202":{"description":"Job queued (new) or reused (idempotency)","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateGenerationJobResponse"},{"$ref":"#/components/schemas/StudioJob"},{"nullable":true}]}}}},"400":{"description":"Bad request: the request breaks the model's limits, or (reason model_unavailable) its binding has not passed a live test (adapterVerified false) and the caller is neither an admin nor the worker","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A targetRef id or input asset is not the viewer's, or options.voiceId is not a voice the viewer may use","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"CONTENT_BLOCKED: the safety layer refused the request's text; nothing was held, written or queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"options.voiceId is not one of the viewer's own voices and the ElevenLabs voice catalog cannot be read right now (code PROVIDER_UNAVAILABLE, reason voice_catalog_unavailable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/jobs/{jobId}":{"get":{"tags":["Jobs"],"summary":"Get a generation job status","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJob"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/jobs/{jobId}/events":{"get":{"tags":["Jobs"],"summary":"Subscribe to a job's event stream","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Server-Sent Events stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ServerSentEventsStream"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/jobs/{jobId}/retry":{"post":{"tags":["Jobs"],"summary":"Retry a failed job (admin or owner)","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job is not failed (completed, queued or running) — current state returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJob"}}}},"202":{"description":"Job re-queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioJob"}}}},"400":{"description":"Not retryable (code BAD_REQUEST, reason model_unavailable, voice_unavailable or request_invalid) or not enough credits (code BILLING_INSUFFICIENT_CREDITS, reason insufficient_credits or reservation_failed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: the job is another user's (reason job_forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found (reason job_not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A retry of this job is already holding credits (reason retry_in_progress)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The job's voice is not one of the viewer's own and the ElevenLabs voice catalog cannot be read right now (reason voice_catalog_unavailable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/jobs":{"get":{"tags":["AccountJobs"],"summary":"List the current viewer's jobs","parameters":[{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Jobs list (operation + generation merged)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountJobsListResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/jobs/events":{"get":{"tags":["AccountJobs"],"summary":"Aggregate SSE stream across all of the viewer's jobs","parameters":[{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"active","in":"query"}],"responses":{"200":{"description":"Server-Sent Events stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ServerSentEventsStream"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/jobs/{jobId}":{"get":{"tags":["AccountJobs"],"summary":"Get a single account job (operation or generation)","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountJobResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/jobs/{jobId}/events":{"get":{"tags":["AccountJobs"],"summary":"SSE stream for a single job (operation or generation)","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Server-Sent Events stream","content":{"text/event-stream":{"schema":{"$ref":"#/components/schemas/ServerSentEventsStream"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/jobs/{jobId}/retry":{"post":{"tags":["AccountJobs"],"summary":"Retry an account job (operation or generation)","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Job is not failed (completed, queued or running) — current state returned","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AccountJobResponse"},{"$ref":"#/components/schemas/StudioJob"},{"nullable":true}]}}}},"202":{"description":"Job re-queued","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AccountJobResponse"},{"$ref":"#/components/schemas/StudioJob"},{"nullable":true}]}}}},"400":{"description":"Not enough credits (code BILLING_INSUFFICIENT_CREDITS, reason insufficient_credits or reservation_failed), or the job's model or voice is no longer available to retry or its saved request breaks the model's input limits (code BAD_REQUEST, reason model_unavailable, voice_unavailable or request_invalid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden: the job is another user's (reason job_forbidden)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Job not found (reason job_not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A retry of this generation job is already holding credits (reason retry_in_progress)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The job's voice is not one of the viewer's own and the ElevenLabs voice catalog cannot be read right now (reason voice_catalog_unavailable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account":{"get":{"tags":["Account"],"summary":"Account data overview: deletion availability, re-authentication and recent exports","responses":{"200":{"description":"Overview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountOverview"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"tags":["Account"],"summary":"Delete the account and its data (asynchronous)","description":"Needs a session younger than 10 minutes, otherwise 409 REAUTH_REQUIRED (sign in again, then retry). On 202 every session of the user is revoked; clients sign out locally.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionBody"}}}},"responses":{"202":{"description":"Deletion scheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionAccepted"}}}},"400":{"description":"The body is not {\"confirm\":\"DELETE\"}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Sign in again first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountReauthRequired"}}}}}}},"/v1/account/export":{"post":{"tags":["Account"],"summary":"Request a JSON export of the account's data","description":"Creates an account.export task; its openUrl is the file (GET /v1/account/exports/{jobId}/download).","responses":{"202":{"description":"Export queued (or the one already running)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExportAccepted"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many exports today","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/exports/{jobId}/download":{"get":{"tags":["Account"],"summary":"Download a finished data export","parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"The export file (attachment)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountExport"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such export","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The export is not finished yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"410":{"description":"The export expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/standing":{"get":{"tags":["Account"],"summary":"Whether the account is active or suspended, and why (open while suspended)","responses":{"200":{"description":"Standing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountStanding"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/notices":{"get":{"tags":["Account"],"summary":"The account's notices (every transactional email, shown in-app)","responses":{"200":{"description":"Notices, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountNotices"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/uploads/sessions":{"post":{"tags":["Uploads"],"summary":"Create an upload session","description":"Creates an upload session for an image, video or audio file. `mimeType` must be an allow-listed image/video/audio type; an empty or generic binary type is resolved from the file extension. Other types (HTML, SVG, XML, PDF, ...) are refused with 400. Every `targetRef` id (seriesId, characterId, locationId, episodeId, sceneId) must be the caller's and agree with the others, else 404.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSessionRequest"}}}},"responses":{"201":{"description":"Upload session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadSession"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"A targetRef id is missing or not the caller's","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/uploads/sessions/{sessionId}/body":{"put":{"tags":["Uploads"],"summary":"Upload a single-part body for an upload session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Upload accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResult"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session already has its file (a session writes its file once): start a new upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"CONTENT_BLOCKED: the stored file is not allowed (safety layer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Upload failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/uploads/sessions/{sessionId}/multipart/initiate":{"post":{"tags":["Uploads"],"summary":"Initiate a multipart upload","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Multipart upload initiated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadMultipartInitiateResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session already has its file (a session writes its file once): start a new upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Initiate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/uploads/sessions/{sessionId}/multipart/{partNumber}":{"put":{"tags":["Uploads"],"summary":"Upload a single multipart part","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"partNumber","in":"path"}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Part uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadMultipartPartResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session already has its file (a session writes its file once): start a new upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Upload failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/uploads/sessions/{sessionId}/finalize":{"post":{"tags":["Uploads"],"summary":"Finalize an upload session","parameters":[{"schema":{"type":"string"},"required":true,"name":"sessionId","in":"path"}],"responses":{"200":{"description":"Upload finalized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadFinalizeResponse"}}}},"400":{"description":"The session declares a file type outside the allow-list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The session already has its file (a session writes its file once): start a new upload session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"CONTENT_BLOCKED: the stored file is not allowed (safety layer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Finalize failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/assets/{assetId}/content":{"get":{"tags":["Assets"],"summary":"Stream asset content (supports HTTP Range requests)","description":"Returns the binary content of a media asset. A signed-in caller must own the asset; a signed `token` authorizes the one asset it names. Supports Range requests for partial content (206) and returns 416 when the requested range is not satisfiable. Responses carry the stored file's `ETag`; a matching `If-None-Match` answers 304 without a body, and a Range whose `If-Range` does not match gets the whole file. Every response carries `X-Content-Type-Options: nosniff` and a sandboxing CSP; types outside the image/video/audio allow-list are sent as attachments.","parameters":[{"schema":{"type":"string"},"required":true,"name":"assetId","in":"path"},{"schema":{"type":"string"},"required":false,"name":"token","in":"query"},{"schema":{"type":"string","description":"Ignored. Thumbnails: `/v1/assets/{assetId}/thumbnail?w=`."},"required":false,"description":"Ignored. Thumbnails: `/v1/assets/{assetId}/thumbnail?w=`.","name":"width","in":"query"},{"schema":{"type":"string","description":"Ignored."},"required":false,"description":"Ignored.","name":"quality","in":"query"}],"responses":{"200":{"description":"Full asset content","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"206":{"description":"Partial asset content (range)","content":{"application/octet-stream":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match matched the ETag)"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Asset not found or unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"416":{"description":"Range not satisfiable"}}}},"/v1/catalog/models":{"get":{"tags":["Catalog"],"summary":"List enabled models","description":"Returns every enabled model with its capabilities (metadata.capabilities), whether scenes can render with it (sceneRenderable), a credit price table for its standard jobs and a billing preview.","responses":{"200":{"description":"List of enabled models","content":{"application/json":{"schema":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/ModelDescriptor"}}},"required":["models"]}}}}}}},"/v1/admin/billing/grants":{"get":{"tags":["Admin"],"summary":"List manual billing grants","responses":{"200":{"description":"Grants list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualGrantsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Admin"],"summary":"Create a manual billing grant (synchronous)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantRequestBody"}}}},"responses":{"200":{"description":"Grant created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantResult"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/treasury":{"get":{"tags":["Admin"],"summary":"Get treasury summary","responses":{"200":{"description":"Treasury summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreasurySummary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/treasury/balance-snapshots":{"post":{"tags":["Admin"],"summary":"Record a manual provider balance snapshot","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSnapshotRequest"}}}},"responses":{"200":{"description":"Snapshot recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceSnapshotResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/catalog/models":{"post":{"tags":["Admin"],"summary":"Create a model catalog entry (worker secret)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreateRequest"}}}},"responses":{"201":{"description":"Model created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelCreateResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/catalog/models/{key}":{"patch":{"tags":["Admin"],"summary":"Update a model catalog entry (worker secret)","parameters":[{"schema":{"type":"string"},"required":true,"name":"key","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelUpdateRequest"}}}},"responses":{"200":{"description":"Model updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOkResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Model not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/internal/sentry-smoke":{"get":{"tags":["Admin"],"summary":"Capture a Sentry smoke test event (requires secret header)","responses":{"200":{"description":"Smoke event captured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentrySmokeResponse"}}}},"404":{"description":"Secret missing or mismatched","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Sentry not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/voice-clones":{"get":{"tags":["Admin"],"summary":"List custom voice clones and their consent records","parameters":[{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"unconsented","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Voice clones, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"clones":{"type":"array","items":{"$ref":"#/components/schemas/AdminVoiceClone"}}},"required":["clones"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/moderation/reports":{"get":{"tags":["Admin"],"summary":"The content-report queue","parameters":[{"schema":{"type":"string","enum":["open","actioned","rejected","all"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["standard","unverified","all"]},"required":false,"name":"intake","in":"query"},{"schema":{"type":"string","enum":["illegal","ncii","csam","likeness","copyright","hate","violence","self_harm","spam","other"]},"required":false,"name":"category","in":"query"},{"schema":{"type":"string","pattern":"^[0-3]$"},"required":false,"name":"priority","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"One page of reports; nextCursor is null on the last page. unverifiedOpen counts the open reports outside the default queue.","content":{"application/json":{"schema":{"type":"object","properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/ContentReport"}},"nextCursor":{"type":"string","nullable":true},"unverifiedOpen":{"type":"number"}},"required":["reports","nextCursor","unverifiedOpen"]}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/moderation/reports/{reportId}":{"get":{"tags":["Admin"],"summary":"A report with its resolved target (signed view links) and actions","parameters":[{"schema":{"type":"string"},"required":true,"name":"reportId","in":"path"}],"responses":{"200":{"description":"Report detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationReportDetail"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/moderation/actions":{"post":{"tags":["Admin"],"summary":"Run a moderation action and send its statement of reasons","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationActionBody"}}}},"responses":{"201":{"description":"Action recorded","content":{"application/json":{"schema":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/ModerationAction"}},"required":["action"]}}}},"400":{"description":"Invalid action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Target or report not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Not possible in the target's state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/moderation/accounts":{"get":{"tags":["Admin"],"summary":"Suspended accounts","responses":{"200":{"description":"Suspended accounts","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/SuspendedAccount"}}},"required":["accounts"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/support-requests":{"get":{"tags":["Admin"],"summary":"Support tickets","parameters":[{"schema":{"type":"string","enum":["open","answered","closed","all"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["standard","unverified","all"]},"required":false,"name":"intake","in":"query"},{"schema":{"type":"string","enum":["support","privacy","deletion","billing","withdrawal","report","copyright"]},"required":false,"name":"mode","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"One page of tickets; nextCursor is null on the last page. unverifiedOpen counts the open tickets outside the default list.","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"$ref":"#/components/schemas/SupportRequest"}},"nextCursor":{"type":"string","nullable":true},"unverifiedOpen":{"type":"number"}},"required":["requests","nextCursor","unverifiedOpen"]}}}},"400":{"description":"Invalid filter or cursor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/support-requests/{ticketId}":{"patch":{"tags":["Admin"],"summary":"Update a support ticket's status or note","parameters":[{"schema":{"type":"string"},"required":true,"name":"ticketId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequestPatch"}}}},"responses":{"200":{"description":"Updated ticket","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/SupportRequest"}},"required":["request"]}}}},"400":{"description":"Invalid patch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such ticket","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/billing/refunds":{"get":{"tags":["Admin"],"summary":"An account's purchases and refunds","parameters":[{"schema":{"type":"string"},"required":true,"name":"email","in":"query"}],"responses":{"200":{"description":"Purchases and refunds","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"}},"required":["id","email"]},"purchases":{"type":"array","items":{"$ref":"#/components/schemas/AdminPurchase"}},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/BillingRefund"}}},"required":["user","purchases","refunds"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Admin"],"summary":"Refund a purchase","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminRefundBody"}}}},"responses":{"201":{"description":"Refunded","content":{"application/json":{"schema":{"type":"object","properties":{"refund":{"$ref":"#/components/schemas/BillingRefund"}},"required":["refund"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such purchase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"The purchase has already been refunded (by any path: withdrawal, admin refund, account closure)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"Stripe refused (nothing changed), or reason refund_pending: Stripe has not confirmed it yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/reports":{"post":{"tags":["Reports"],"summary":"Report content (DSA notice and action)","description":"Bearer optional. goodFaith must be true except for category csam. Signed-in reporters get the acknowledgement in-app (GET /v1/account/notices) and by email. A public notifier's address is unconfirmed, so its acknowledgement is stored but not sent; the reportId in this answer is the receipt.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentReportBody"}}}},"responses":{"201":{"description":"Report received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentReportAccepted"}}}},"400":{"description":"Invalid report (details.field names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many reports","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/support/requests":{"post":{"tags":["Support"],"summary":"Open a support, privacy, billing or copyright ticket","description":"Bearer optional; without a session `email` is required. The acknowledgement goes to the email outbox (in-app for the account's own address).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequestBody"}}}},"responses":{"201":{"description":"Ticket opened","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportRequestAccepted"}}}},"400":{"description":"Invalid request (details.field names the field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/providers/webhooks/fal":{"post":{"tags":["Providers"],"summary":"FAL provider webhook","description":"Receives provider-side job status notifications from FAL. Payload shape varies by event; the handler extracts `request_id` to correlate with a generation job.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWebhookPayload"}}}},"responses":{"200":{"description":"Webhook accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWebhookResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Signature check failed (FAL_WEBHOOK_VERIFY enforce)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/providers/webhooks/runway":{"post":{"tags":["Providers"],"summary":"Runway provider webhook","description":"Receives provider-side job status notifications from Runway. The handler extracts `id` to correlate with a generation job.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWebhookPayload"}}}},"responses":{"200":{"description":"Webhook accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderWebhookResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/devices":{"post":{"tags":["Devices"],"summary":"Register a device push notification token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDeviceBody"}}}},"responses":{"200":{"description":"Device token registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/devices/{token}":{"delete":{"tags":["Devices"],"summary":"Remove a device push notification token","parameters":[{"schema":{"type":"string"},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Device token removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs":{"post":{"tags":["magic"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicCreateJobBody"}}}},"responses":{"200":{"description":"Job created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicCreateJobResponse"}}}},"400":{"description":"Invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"seriesId or a userAssetIds item is missing or not the caller's","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"CONTENT_BLOCKED: the prompt is not allowed (safety layer)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs/{jobId}":{"get":{"tags":["magic"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicJobSnapshot"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs/{jobId}/plan":{"patch":{"tags":["magic"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicPlanPatchBody"}}}},"responses":{"200":{"description":"Re-planned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicJobSnapshot"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs/{jobId}/cancel":{"post":{"tags":["magic"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicJobSnapshot"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs/by-episode/{episodeId}":{"get":{"tags":["magic"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"}],"responses":{"200":{"description":"Snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicJobSnapshot"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/jobs/{jobId}/approve":{"post":{"tags":["magic"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"jobId","in":"path"}],"responses":{"200":{"description":"Approved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicJobSnapshot"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Wrong state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/magic/preview":{"post":{"tags":["magic"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicPreviewBody"}}}},"responses":{"200":{"description":"Preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicPreviewResponse"}}}},"400":{"description":"Invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/user-assets/presign-request":{"post":{"tags":["user-assets"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"mime":{"type":"string","minLength":1,"maxLength":100},"sizeBytes":{"type":"integer","minimum":1,"maximum":52428800},"seriesId":{"type":"string","format":"uuid"}},"required":["filename","mime","sizeBytes"]}}}},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"userAssetId":{"type":"string","format":"uuid"},"uploadUrl":{"type":"string","format":"uri"},"expiresInSeconds":{"type":"number"}},"required":["userAssetId","uploadUrl","expiresInSeconds"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}},"404":{"description":"seriesId is missing or not the caller's","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/user-assets":{"get":{"tags":["user-assets"],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":false,"name":"seriesId","in":"query"},{"schema":{"type":"string","enum":["character","location","style_ref","dialogue_script","user_video_restyle","user_video_extend","user_video_lipsync"]},"required":false,"name":"kind","in":"query"}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"name":{"type":"string"},"mime":{"type":"string"},"sizeBytes":{"type":"number"},"thumbnailUrl":{"type":"string","nullable":true},"contentUrl":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["id","kind","name","mime","sizeBytes","thumbnailUrl","contentUrl","createdAt"]}}},"required":["items"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/user-assets/{userAssetId}":{"delete":{"summary":"Delete a reference-library upload","description":"Removes the item, its tags, thumbnails and hidden reference copy, and its file unless one of your images still uses it. Images you already added to characters, locations or scenes from it stay (`copiesKept`). Likeness declarations are kept as consent records.","tags":["user-assets"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":128},"required":true,"name":"userAssetId","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Always true."},"copiesKept":{"type":"integer","minimum":0,"description":"Imports and promotions of the item into the user's characters, locations and scenes. They are copies and stay."}},"required":["deleted","copiesKept"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}},"404":{"description":"Library item missing or not the caller's","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}}}}}},"/v1/content/help":{"get":{"tags":["Content"],"summary":"Get bundled help topics","description":"Returns static help copy keyed by screen id. Public — no auth required. Bearer tokens are accepted but ignored.","responses":{"200":{"description":"Help topics","content":{"application/json":{"schema":{"type":"object","properties":{"topics":{"type":"object","additionalProperties":{"type":"object","properties":{"title":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}}},"required":["title","bullets"]}}},"required":["topics"]}}}}}}},"/v1/content/legal":{"get":{"tags":["Content"],"summary":"List bundled legal documents","description":"Returns legal document summaries with their versions, in the requested locale. Public — no auth required. Bearer tokens are accepted but ignored.","parameters":[{"schema":{"type":"string","maxLength":16},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"Legal document summaries","content":{"application/json":{"schema":{"type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"locale":{"type":"string","enum":["en","ru"]},"eyebrow":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"version":{"type":"string"},"effectiveDate":{"type":"string"},"acceptanceVersion":{"type":"string"}},"required":["slug","title"]}}},"required":["documents"]}}}}}}},"/v1/content/legal/{slug}":{"get":{"tags":["Content"],"summary":"Get a legal document by slug","description":"Returns the current version of a legal document as markdown in the requested locale (?locale=en|ru, else Accept-Language, else en). version is the effective date (YYYY-MM-DD); acceptanceVersion changes when users must accept terms or privacy again. Public — no auth required. Bearer tokens are accepted but ignored.","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","maxLength":16},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"Legal document","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"locale":{"type":"string","enum":["en","ru"]},"eyebrow":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"markdown":{"type":"string"},"effectiveDate":{"type":"string"},"version":{"type":"string"},"acceptanceVersion":{"type":"string"},"changeSummary":{"type":"string"},"edition":{"type":"string"}},"required":["slug","title","markdown"]}}}},"404":{"description":"Unknown slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/content/legal-notices/{slug}":{"get":{"tags":["Content"],"summary":"Get an in-product legal notice by slug","description":"Returns the current wording of an in-product notice (ai-processing: the third-party AI processing sheet the apps show before the first generation) in the requested locale (?locale=en|ru, else Accept-Language, else en). Accepting it is POST /v1/legal/acceptances with aiSharingAcknowledged. Public — no auth required. Bearer tokens are accepted but ignored.","parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","maxLength":16},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"Legal notice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalNotice"}}}},"404":{"description":"Unknown slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/reference-images":{"get":{"tags":["Studio"],"summary":"List the viewer's images to reuse as references","description":"Studio images (character and location images, start frames, uploads) and reference-library uploads, newest first, as one `ReferenceImage` shape with a `ref` handle. Owner only; seriesId, characterId and locationId must be the caller's (else 404). Pass `nextCursor` back as `cursor` for the next page.","parameters":[{"schema":{"type":"string","enum":["series","all","uploads"],"description":"series (needs seriesId; the default when seriesId is given), all (the default otherwise) or uploads."},"required":false,"description":"series (needs seriesId; the default when seriesId is given), all (the default otherwise) or uploads.","name":"tab","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"seriesId","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"characterId","in":"query"},{"schema":{"type":"string","maxLength":128},"required":false,"name":"locationId","in":"query"},{"schema":{"type":"string","maxLength":200,"description":"Comma-separated kinds: character, location, start_frame, render_frame, upload, other.","example":"character,start_frame"},"required":false,"description":"Comma-separated kinds: character, location, start_frame, render_frame, upload, other.","name":"kind","in":"query"},{"schema":{"type":"string","maxLength":80,"description":"Matches labels and character, location and series names."},"required":false,"description":"Matches labels and character, location and series names.","name":"q","in":"query"},{"schema":{"type":"string","enum":["recent","recently_used"],"description":"recent (default, paged) or recently_used (at most 12, no cursor)."},"required":false,"description":"recent (default, paged) or recently_used (at most 12, no cursor).","name":"sort","in":"query"},{"schema":{"type":"string","maxLength":512},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,3}$","description":"Page size, 1-100 (default 40)."},"required":false,"description":"Page size, 1-100 (default 40).","name":"limit","in":"query"}],"responses":{"200":{"description":"One page of reference images","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceImagePage"}}}},"400":{"description":"Invalid query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"seriesId, characterId or locationId is missing or not the caller's","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/reference-limits":{"get":{"tags":["Studio"],"summary":"Reference-image limits per model operation","description":"For every enabled model operation that takes reference images: the count the catalog binding allows, the character-consistency cap, accepted types and sizes. `startFrame` is the start-frame compose limit (characters next to the location plate). With `imageModelId`, `imageModel` is the limit that image model generates with references under.","parameters":[{"schema":{"type":"string","maxLength":160,"description":"An image model id as the character / location generate routes take it (`selectedImageModelId`): the response's `imageModel` is the limit that model generates with references under.","example":"fal/google-nano-banana-2"},"required":false,"description":"An image model id as the character / location generate routes take it (`selectedImageModelId`): the response's `imageModel` is the limit that model generates with references under.","name":"imageModelId","in":"query"}],"responses":{"200":{"description":"Reference limits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceLimits"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/assets/{assetId}/thumbnail":{"get":{"tags":["Assets"],"summary":"Thumbnail of a studio image","description":"WebP thumbnail when Cloudflare Images is enabled, else the original image. The signed-in owner, or a signed asset `token` for this id. `Cache-Control: private`.","parameters":[{"schema":{"type":"string","maxLength":128},"required":true,"name":"assetId","in":"path"},{"schema":{"type":"string","maxLength":5,"description":"Width: 200, 400 (default) or 800; other values snap to the nearest."},"required":false,"description":"Width: 200, 400 (default) or 800; other values snap to the nearest.","name":"w","in":"query"},{"schema":{"type":"string","maxLength":2048},"required":false,"name":"token","in":"query"}],"responses":{"200":{"description":"Thumbnail","content":{"image/webp":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Asset missing, not the caller's, or not an image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/user-assets/{userAssetId}/thumbnail":{"get":{"tags":["user-assets"],"summary":"Thumbnail of a reference-library upload","description":"Same as /v1/assets/{assetId}/thumbnail for a library item. Signed-in owner only.","parameters":[{"schema":{"type":"string","maxLength":128},"required":true,"name":"userAssetId","in":"path"},{"schema":{"type":"string","maxLength":5,"description":"Width: 200, 400 (default) or 800; other values snap to the nearest."},"required":false,"description":"Width: 200, 400 (default) or 800; other values snap to the nearest.","name":"w","in":"query"}],"responses":{"200":{"description":"Thumbnail","content":{"image/webp":{"schema":{"type":"string"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Library item missing, not the caller's, or not an image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/characters/{characterId}/image-assets/import":{"post":{"tags":["Studio"],"summary":"Copy any of your images into a character's images","description":"`ref` from GET /v1/studio/reference-images (any series, or the library). The character gets its own copy; an image that already is this character's is used as it is. Free; a retry returns the same image.","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"characterId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportImageBody"}}}},"responses":{"201":{"description":"The character's image","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportImageResponse"}}}},"400":{"description":"Invalid body or reference (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Character or reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/locations/{locationId}/assets/import":{"post":{"tags":["Studio"],"summary":"Copy any of your images into a location's plates","description":"As the character import, for a location: a start frame imported here becomes a plate.","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"locationId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportImageBody"}}}},"responses":{"201":{"description":"The location's plate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportImageResponse"}}}},"400":{"description":"Invalid body or reference (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Location or reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/studio/series/{seriesId}/episodes/{episodeId}/scenes/{sceneId}/start-frames/import":{"post":{"tags":["Studio"],"summary":"Make any of your images a start-frame candidate of a scene","description":"The scene gets its own copy and a candidate start frame (once per source); then approve and preview as usual.","parameters":[{"schema":{"type":"string"},"required":true,"name":"seriesId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"episodeId","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sceneId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportStartFrameBody"}}}},"responses":{"201":{"description":"The start frame","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportStartFrameResponse"}}}},"400":{"description":"Invalid body or reference (`reason`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Scene or reference not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/legal/acceptances":{"post":{"tags":["Legal"],"summary":"Record the user's acceptance of the current legal documents","description":"Records that the signed-in user accepted the listed documents at their current versions (viewer.legal.required from GET /v1/auth/session or /v1/auth/profile), confirmed being 18 or older and, with aiSharingAcknowledged, allowed the third-party AI processing notice. Each record keeps the version, the locale, the surface and a SHA-256 of the exact text. 409 LEGAL_VERSION_MISMATCH when a document changed since it was shown: reload viewer.legal and ask again. Never callable from MCP tools.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalAcceptanceRequest"}}}},"responses":{"201":{"description":"Recorded; the user's status after the write","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalAcceptanceResponse"}}}},"400":{"description":"Unknown document or invalid body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Not available to MCP tools","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A document has a newer version than the one sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}