{
  "openapi": "3.0.0",
  "info": {
    "title": "Hooked API",
    "version": "1.0.0",
    "description": "AI Video Generation API"
  },
  "servers": [
    {
      "url": "https://api.hooked.so"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Error401": {
        "type": "object",
        "description": "Missing or invalid `x-api-key`.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "not_authenticated"
            ]
          },
          "message": {
            "type": "string",
            "example": "Not authenticated"
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "NOT_AUTHENTICATED"
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "example": {
          "code": "not_authenticated",
          "message": "Not authenticated",
          "errorCode": "NOT_AUTHENTICATED",
          "details": {
            "x-api-key": "Header not provided or API Key invalid"
          }
        }
      },
      "MissingCredentials402": {
        "type": "object",
        "description": "BYOK team without the provider keys this request uses. Nothing was created or charged. Add the keys in Settings → AI keys.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ],
            "description": "Present when raised by the spend check"
          },
          "code": {
            "type": "string",
            "enum": [
              "missing_credentials"
            ]
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "MISSING_CREDENTIALS"
            ]
          },
          "missingProviders": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "openrouter",
                "elevenlabs",
                "gemini",
                "bria",
                "firecrawl"
              ]
            }
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object"
          }
        },
        "required": [
          "code",
          "errorCode",
          "missingProviders",
          "message"
        ],
        "example": {
          "code": "missing_credentials",
          "message": "Your team uses its own provider keys (BYOK) and these are missing or invalid: OpenRouter, ElevenLabs. Add them in Settings → AI keys.",
          "errorCode": "MISSING_CREDENTIALS",
          "missingProviders": [
            "openrouter",
            "elevenlabs"
          ],
          "details": {}
        }
      },
      "SubscriptionRequired402": {
        "type": "object",
        "description": "Managed team (generates with Hooked's keys) without a live subscription.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "subscription_required"
            ]
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "SUBSCRIPTION_REQUIRED"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "code",
          "errorCode",
          "message"
        ],
        "example": {
          "success": false,
          "code": "subscription_required",
          "errorCode": "SUBSCRIPTION_REQUIRED",
          "message": "Your team generates with Hooked's keys, which are paid by your plan. Subscribe to keep generating."
        }
      },
      "InsufficientCredits402": {
        "type": "object",
        "description": "Not enough credits for this request. `creditsNeeded` / `creditsAvailable` are included when the estimate is known.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "INSUFFICIENT_CREDITS"
            ]
          },
          "message": {
            "type": "string"
          },
          "creditsNeeded": {
            "type": "number"
          },
          "creditsAvailable": {
            "type": "number"
          }
        },
        "required": [
          "success",
          "errorCode",
          "message"
        ],
        "example": {
          "success": false,
          "errorCode": "INSUFFICIENT_CREDITS",
          "message": "Not enough credits to perform this action",
          "creditsNeeded": 40,
          "creditsAvailable": 12
        }
      },
      "EntitlementRequired403": {
        "type": "object",
        "description": "Valid key, but the team does not have the product this endpoint belongs to.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "entitlement_required"
            ]
          },
          "error": {
            "type": "string",
            "enum": [
              "entitlement_required"
            ]
          },
          "message": {
            "type": "string"
          },
          "product": {
            "type": "string",
            "example": "app"
          }
        },
        "required": [
          "code",
          "error",
          "message",
          "product"
        ],
        "example": {
          "code": "entitlement_required",
          "error": "entitlement_required",
          "message": "This endpoint requires the \"app\" product.",
          "product": "app"
        }
      },
      "ValidationError400": {
        "type": "object",
        "description": "The request is invalid. `message` is `<field>: <reason>` when a field is to blame.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "example": {
          "success": false,
          "message": "webhook: Must be a valid HTTPS URL"
        }
      },
      "NotFound404": {
        "type": "object",
        "description": "Not found. Another team's resource answers the same way as a missing one.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "message"
        ],
        "example": {
          "success": false,
          "message": "Project not found"
        }
      },
      "Error500": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "message": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "description": "Present on some endpoints"
          }
        },
        "example": {
          "success": false,
          "message": "Internal server error"
        }
      },
      "ApiError": {
        "type": "object",
        "description": "Error shape used by the scheduling, integration and social account endpoints.",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "bad_request",
              "forbidden",
              "not_found"
            ]
          },
          "message": {
            "type": "string"
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "INVALID_INPUT",
              "FORBIDDEN",
              "RESOURCE_NOT_FOUND"
            ]
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "code",
          "message"
        ],
        "example": {
          "code": "not_found",
          "message": "Schedule not found",
          "errorCode": "RESOURCE_NOT_FOUND",
          "details": {
            "resource_id": "clx...",
            "resource_type": "Schedule"
          }
        }
      },
      "ProjectCreateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "type": "object",
            "properties": {
              "projectId": {
                "type": "string",
                "description": "Follow it with GET /v1/project/{projectId}"
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "processing",
                  "completed",
                  "failed"
                ],
                "description": "The project status right after creation, usually `draft` or `processing`. Follow it with GET /v1/project/{projectId}."
              }
            },
            "required": [
              "projectId",
              "status"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "success",
          "data",
          "message"
        ]
      },
      "Video": {
        "type": "object",
        "description": "A rendered video. A video exists once a project's render has started; each render of a project is a new video.",
        "properties": {
          "id": {
            "type": "string",
            "example": "cm4x9n7q20003ab12xy98zt10",
            "description": "The video ID."
          },
          "name": {
            "type": "string",
            "example": "Serum ad",
            "description": "The video name: the name of the project it was rendered from."
          },
          "projectId": {
            "type": "string",
            "nullable": true,
            "description": "The project this video was rendered from (the `projectId` a create endpoint answered)."
          },
          "projectType": {
            "type": "string",
            "nullable": true,
            "enum": [
              "ugc_video",
              "ugc_ads",
              "hook_demo",
              "script_to_video",
              "prompt_to_video",
              "tiktok_slideshow",
              "podcast_interview",
              "scenes",
              "cinematic",
              "caption_video",
              "remove_background",
              "extend_video",
              "scrolling_video",
              "music_to_video",
              "article_to_video",
              "pdf_to_video",
              "pdf_to_brainrot",
              "reddit_story",
              "quiz_video",
              "clone_video"
            ],
            "description": "That project's type. API formats: `script_to_video`, `prompt_to_video`, `ugc_ads`, `ugc_video` (Talking Avatar), `hook_demo`, `scenes`, `tiktok_slideshow`, `caption_video` (Add Captions), `extend_video`, `remove_background`, `podcast_interview`, `quiz_video`, `reddit_story`, `scrolling_video`. Dashboard-only formats: `cinematic`, `article_to_video`, `pdf_to_video`, `pdf_to_brainrot`, `music_to_video`, `clone_video`."
          },
          "status": {
            "type": "string",
            "enum": [
              "STARTED",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`STARTED` while rendering, `COMPLETED` when the file is ready, `FAILED` when the render failed or was canceled. A failed render can be retried with POST /v1/render, at no cost."
          },
          "progress": {
            "type": "number",
            "example": 100,
            "description": "Render progress, 0 to 100."
          },
          "message": {
            "type": "string",
            "nullable": true,
            "example": "Video ready",
            "description": "The current step (`Rendering video...`, `Video ready`), or why the render failed (`Rendering failed`, `Rendering timed out`)."
          },
          "url": {
            "type": "string",
            "description": "Signed download link of the MP4. Empty string (`\"\"`) until the video is `COMPLETED`. The link expires: request the video again for a fresh one instead of storing it."
          },
          "thumbnail": {
            "type": "string",
            "description": "Signed link of the thumbnail image, or `\"\"` while there is none. It is generated shortly after the video completes, and expires like `url`."
          },
          "durationInFrames": {
            "type": "number",
            "example": 750,
            "description": "Length in frames, at 25 frames per second. `0` until the video is ready."
          },
          "durationInSeconds": {
            "type": "number",
            "example": 30,
            "description": "Length in seconds (`durationInFrames / 25`). `0` until the video is ready."
          },
          "size": {
            "type": "number",
            "example": 15728640,
            "description": "File size in bytes, or `0` when unknown."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the render started."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the video last changed."
          }
        }
      },
      "Project": {
        "type": "object",
        "description": "A project and where it stands. `video` is its latest render, or null while there is none.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The project ID (the `projectId` a create endpoint answered)."
          },
          "name": {
            "type": "string",
            "description": "The project name: the `name` you sent, or one generated from the content."
          },
          "type": {
            "type": "string",
            "enum": [
              "ugc_video",
              "ugc_ads",
              "hook_demo",
              "script_to_video",
              "prompt_to_video",
              "tiktok_slideshow",
              "podcast_interview",
              "scenes",
              "cinematic",
              "caption_video",
              "remove_background",
              "extend_video",
              "scrolling_video",
              "music_to_video",
              "article_to_video",
              "pdf_to_video",
              "pdf_to_brainrot",
              "reddit_story",
              "quiz_video",
              "clone_video",
              "class",
              "product_ads"
            ],
            "description": "The stored project type. Create endpoint → type: `add-captions` → `caption_video`, `article-to-video` → `article_to_video`, `cinematic` → `cinematic`, `clone-video` → `clone_video`, `extend-video` → `extend_video`, `hook-demo` → `hook_demo`, `music-to-video` → `music_to_video`, `pdf-to-brainrot` → `pdf_to_brainrot`, `pdf-to-video` → `pdf_to_video`, `podcast-interview` → `podcast_interview`, `prompt-to-video` → `prompt_to_video`, `quiz-video` → `quiz_video`, `reddit-story` → `reddit_story`, `remove-background` → `remove_background`, `scenes` → `scenes`, `script-to-video` → `script_to_video`, `scrolling-video` → `scrolling_video`, `talking-avatar` → `ugc_video`, `tiktok-slideshow` → `tiktok_slideshow`, `ugc-ads` → `ugc_ads`, `ugc-studio` → `ugc_ads`. `product_ads` is a dashboard-only (older) format."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "processing",
              "completed",
              "failed"
            ],
            "description": "`draft` right after creation, `processing` while generating, `completed` once generated (the render then starts on its own), `failed` when generation failed (the credits it charged are refunded)."
          },
          "source": {
            "type": "string",
            "enum": [
              "api",
              "web",
              "mcp"
            ],
            "description": "Where the project was made: `api` (a create endpoint), `mcp` (an AI app through the MCP server) or `web` (the dashboard, including its automations)."
          },
          "progress": {
            "type": "number",
            "description": "Generation progress, 0 to 100."
          },
          "message": {
            "type": "string",
            "nullable": true,
            "description": "The current step, or why the project failed."
          },
          "usedCredits": {
            "type": "number",
            "description": "Credits charged for this project so far. `0` once a failed project is refunded; usually `0` for teams on their own provider keys (BYOK)."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "The `metadata` object you sent on create, or `{}`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the project was created."
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the project last changed."
          },
          "video": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/Video"
              }
            ],
            "nullable": true,
            "description": "The project's latest render, the same object GET /v1/video/{videoId} returns. `null` until the render starts."
          }
        }
      },
      "Avatar": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "1",
            "description": "Pass it as `avatarId`. Library avatars have short numeric IDs (`\"1\"`, `\"2\"`, ...); custom avatars have generated IDs."
          },
          "name": {
            "type": "string",
            "example": "Harper",
            "description": "Display name."
          },
          "type": {
            "type": "string",
            "example": "AI",
            "description": "`AI` (generated) or `Realistic` (real actor)."
          },
          "gender": {
            "type": "string",
            "example": "Female",
            "description": "For example `Female` or `Male`."
          },
          "age": {
            "type": "string",
            "example": "Young Adult",
            "description": "Age group, for example `Young Adult`, `Adult`, `Middle-aged`."
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "URL of the avatar image. Signed (and expiring) for custom avatars."
          },
          "isHD": {
            "type": "boolean",
            "description": "HD source image."
          },
          "isPro": {
            "type": "boolean",
            "description": "Marked as a Pro avatar."
          },
          "isNew": {
            "type": "boolean",
            "description": "Recently added."
          },
          "situation": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Kitchen"
            ],
            "description": "Setting tags."
          },
          "emotions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Calm"
            ],
            "description": "Expression tags."
          },
          "skinTone": {
            "type": "string",
            "example": "light",
            "description": "Skin tone tag: `light`, `medium-light`, `medium` or `dark`."
          },
          "isCustom": {
            "type": "boolean",
            "description": "`true` for your team's avatars."
          },
          "source": {
            "type": "string",
            "enum": [
              "library",
              "custom"
            ],
            "description": "`library` or `custom`."
          },
          "status": {
            "type": "integer",
            "description": "Custom avatars only; always `2` (ready), as only ready avatars are listed."
          }
        },
        "description": "An avatar: a still image every avatar video is generated from."
      },
      "Voice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Pass it as `voiceId`. For library voices it is the ElevenLabs voice ID; for your cloned voices it is a Hooked ID."
          },
          "voiceId": {
            "type": "string",
            "description": "The ElevenLabs voice ID. The same as `id` for library voices."
          },
          "name": {
            "type": "string",
            "example": "Jude",
            "description": "Display name."
          },
          "gender": {
            "type": "string",
            "example": "Male",
            "description": "`Male`, `Female`, ... (`Unknown` when the voice is not labelled)."
          },
          "language": {
            "type": "string",
            "example": "English",
            "description": "Language name."
          },
          "accent": {
            "type": "string",
            "nullable": true,
            "example": "British",
            "description": "Accent label (`Standard` for library voices without one)."
          },
          "country": {
            "type": "string",
            "nullable": true,
            "example": "GB",
            "description": "Country code derived from the language."
          },
          "age": {
            "type": "string",
            "example": "young",
            "description": "Age label (`unknown` for cloned voices and unlabelled library voices)."
          },
          "templateUrl": {
            "type": "string",
            "description": "Preview audio URL."
          },
          "thumbnail": {
            "type": "string",
            "nullable": true,
            "description": "Thumbnail path."
          },
          "isCustom": {
            "type": "boolean",
            "description": "`true` for your team's own voices (cloned or designed). Delete one with DELETE /v1/voice/{voiceId}."
          },
          "source": {
            "type": "string",
            "enum": [
              "library",
              "custom"
            ],
            "description": "`library` or `custom`."
          },
          "ownerProvider": {
            "type": "string",
            "enum": [
              "managed",
              "byok"
            ],
            "description": "Cloned voices only: `managed` (cloned with Hooked's keys) or `byok` (cloned with your team's ElevenLabs key). The voice only works while the team is in that mode."
          },
          "unavailable": {
            "type": "boolean",
            "description": "Present, and `true`, when the voice cannot be used in the team's current mode."
          },
          "unavailableReason": {
            "type": "string",
            "nullable": true,
            "description": "Why the voice is unavailable. Present with `unavailable`."
          },
          "description": {
            "type": "string",
            "description": "Present when the voice has one."
          }
        },
        "description": "A narration voice."
      },
      "Music": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "1",
            "description": "Pass it as `musicId`."
          },
          "name": {
            "type": "string",
            "example": "Bladerunner 2049",
            "description": "Track name."
          },
          "url": {
            "type": "string",
            "description": "Audio file URL."
          },
          "thumbnail": {
            "type": "string",
            "description": "Cover image URL."
          },
          "category": {
            "type": "string",
            "example": "Futuristic",
            "description": "The track's category."
          },
          "duration": {
            "type": "string",
            "example": "03:00",
            "description": "Length as `mm:ss`."
          },
          "genres": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "Futuristic",
              "Electronic"
            ],
            "description": "Genre tags."
          }
        },
        "description": "A library background music track."
      },
      "HealthStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "error"
            ],
            "description": "`ok` (200), or `error` (503) when the database does not answer."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "services": {
            "type": "object",
            "properties": {
              "database": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "ok",
                      "error"
                    ]
                  },
                  "responseTime": {
                    "type": "number",
                    "description": "ms"
                  },
                  "error": {
                    "type": "string",
                    "example": "Database unavailable",
                    "description": "Only when `status` is `error`."
                  }
                }
              }
            }
          }
        },
        "required": [
          "status",
          "timestamp",
          "version",
          "services"
        ],
        "description": "Whether the API and its database are up. Nothing about the host is reported."
      },
      "ApiStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded"
            ]
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "responseTime": {
            "type": "number",
            "description": "ms"
          },
          "services": {
            "type": "object",
            "properties": {
              "database": {
                "type": "string",
                "enum": [
                  "ok",
                  "error"
                ]
              },
              "api": {
                "type": "string",
                "enum": [
                  "ok"
                ]
              }
            }
          },
          "dbResponseTime": {
            "type": "number",
            "description": "ms; only when the database answered"
          }
        }
      },
      "Integration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Integration id. Pass it as `integrationId` when scheduling."
          },
          "type": {
            "type": "string",
            "enum": [
              "tiktok",
              "youtube",
              "instagram",
              "facebook"
            ],
            "example": "tiktok",
            "description": "Platform"
          },
          "identifier": {
            "type": "string",
            "nullable": true,
            "description": "Platform-specific identifier of the account"
          },
          "account": {
            "type": "object",
            "description": "What the platform told us about the account. Any field can be `null`.",
            "properties": {
              "id": {
                "type": "string",
                "nullable": true,
                "description": "Account id on the platform"
              },
              "name": {
                "type": "string",
                "nullable": true,
                "description": "Display name"
              },
              "username": {
                "type": "string",
                "nullable": true,
                "description": "Handle"
              },
              "avatarUrl": {
                "type": "string",
                "nullable": true,
                "description": "Profile picture URL"
              }
            }
          }
        }
      },
      "ScheduledPost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scheduled post id"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "published",
              "failed"
            ],
            "example": "pending",
            "description": "`pending` while waiting for its time (or being published), `published` once the platform accepted it, `failed` when publishing failed"
          },
          "scheduledDateTime": {
            "type": "string",
            "format": "date-time",
            "description": "When it is (or was) published"
          },
          "platform": {
            "type": "string",
            "enum": [
              "tiktok",
              "youtube",
              "instagram",
              "facebook"
            ],
            "description": "The integration's platform"
          },
          "integration": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Integration id"
              },
              "type": {
                "type": "string",
                "enum": [
                  "tiktok",
                  "youtube",
                  "instagram",
                  "facebook"
                ],
                "description": "Platform"
              },
              "account": {
                "type": "object",
                "description": "Any field can be `null`",
                "properties": {
                  "id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Account id on the platform"
                  },
                  "name": {
                    "type": "string",
                    "nullable": true,
                    "description": "Display name"
                  },
                  "username": {
                    "type": "string",
                    "nullable": true,
                    "description": "Handle"
                  },
                  "avatarUrl": {
                    "type": "string",
                    "nullable": true,
                    "description": "Profile picture URL"
                  }
                }
              }
            }
          },
          "video": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The video being published"
              },
              "name": {
                "type": "string",
                "nullable": true,
                "description": "Video name"
              },
              "url": {
                "type": "string",
                "description": "Signed URL of the video, or `\"\"` if unavailable"
              },
              "thumbnail": {
                "type": "string",
                "description": "Signed URL of the thumbnail, or `\"\"`"
              },
              "durationInSeconds": {
                "type": "number",
                "description": "Video duration"
              }
            }
          },
          "platformData": {
            "type": "object",
            "additionalProperties": true,
            "description": "The post details you sent while the post is not published. Once published it is replaced by what the platform returned: `videoId` and `videoUrl` (YouTube), `videoId` and `instagramId` (Instagram), `videoId`, `publish_id` and `upload_url` (TikTok)."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "SocialAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Account id in Hooked"
          },
          "username": {
            "type": "string",
            "description": "Handle, lowercased, without `@`"
          },
          "platform": {
            "type": "string",
            "enum": [
              "tiktok",
              "youtube"
            ]
          },
          "displayName": {
            "type": "string",
            "description": "Display name"
          },
          "bio": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true,
            "description": "Profile picture URL"
          },
          "isVerified": {
            "type": "boolean",
            "description": "Verified on the platform"
          },
          "stats": {
            "type": "object",
            "properties": {
              "followers": {
                "type": "number"
              },
              "following": {
                "type": "number"
              },
              "videos": {
                "type": "number"
              },
              "likes": {
                "type": "number"
              }
            }
          },
          "analytics": {
            "type": "object",
            "properties": {
              "engagementRate": {
                "type": "number"
              },
              "viralityScore": {
                "type": "number"
              },
              "avgViews": {
                "type": "number"
              }
            }
          },
          "topHashtags": {
            "type": "array",
            "description": "Up to 10 hashtags (all saved ones in the account details)",
            "items": {
              "$ref": "#/components/schemas/SocialAccountHashtag"
            }
          },
          "keywords": {
            "type": "array",
            "description": "Up to 10 keywords (all saved ones in the account details). Generated in the background after an analysis, so often empty right after it.",
            "items": {
              "$ref": "#/components/schemas/SocialAccountKeyword"
            }
          },
          "keywordsStatus": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ],
            "description": "Keyword generation state. In the list and the account details only, not in the analyze answer."
          },
          "lastAnalyzed": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Last analysis or refresh"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was first saved"
          },
          "profileUrl": {
            "type": "string",
            "description": "Link to the profile"
          }
        }
      },
      "SocialAccountHashtag": {
        "type": "object",
        "properties": {
          "hashtag": {
            "type": "string",
            "example": "#fitness"
          },
          "name": {
            "type": "string",
            "example": "fitness"
          },
          "count": {
            "type": "integer"
          },
          "videoCount": {
            "type": "integer"
          },
          "totalViews": {
            "type": "number"
          },
          "avgViews": {
            "type": "number"
          },
          "engagementRate": {
            "type": "number"
          },
          "trending": {
            "type": "boolean"
          },
          "lastUsed": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "SocialAccountKeyword": {
        "type": "object",
        "properties": {
          "keyword": {
            "type": "string"
          },
          "videoCount": {
            "type": "integer"
          },
          "totalViews": {
            "type": "number"
          },
          "avgViews": {
            "type": "number"
          },
          "engagementRate": {
            "type": "number"
          },
          "sentiment": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "trending": {
            "type": "boolean"
          },
          "performance": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "recommendation": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LibraryMedia": {
        "type": "object",
        "description": "An image or video of your team's media library. Pass its `id` wherever a create endpoint takes a media id, once `status` is `COMPLETED`.",
        "required": [
          "id",
          "name",
          "type",
          "status",
          "error",
          "url",
          "thumbnail",
          "durationSeconds",
          "size",
          "aspectRatio",
          "isAIGenerated",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The media id"
          },
          "name": {
            "type": "string",
            "description": "The name shown in your library"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`PENDING`: an upload waiting for its file and the complete call. `PROCESSING`: an import downloading or a generation running. `COMPLETED`: ready to use. `FAILED`: the import, upload or generation did not work (a failed generation's credits are given back); an import still running after 15 minutes, or a generation after 60, also reads as `FAILED`."
          },
          "error": {
            "type": "string",
            "nullable": true,
            "description": "Why it failed, when `status` is `FAILED` (a provider's refusal, a URL that did not answer, a file of the wrong type, a job that timed out). `null` otherwise, and for a failure from before the reason was kept."
          },
          "url": {
            "type": "string",
            "description": "URL of the file; an empty string until `status` is `COMPLETED`"
          },
          "thumbnail": {
            "type": "string",
            "nullable": true,
            "description": "URL of the video's thumbnail, once made; `null` for images and until then"
          },
          "durationSeconds": {
            "type": "number",
            "nullable": true,
            "description": "Length of a video in seconds; `null` for images and while unknown"
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes (0 until the file is in your library)"
          },
          "aspectRatio": {
            "type": "string",
            "nullable": true,
            "description": "`ratio_9_16`, `ratio_1_1` or `ratio_16_9` when known, otherwise `null`"
          },
          "isAIGenerated": {
            "type": "boolean",
            "description": "Whether a model made it in Hooked"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "backgroundRemoval": {
            "type": "object",
            "description": "Its background-removed version: a clip on green (POST /v1/media/{mediaId}/remove-background) or an image as a PNG (POST /v1/image/remove-background), which a composed layer shows with `cutOut`.",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "NONE",
                  "PROCESSING",
                  "COMPLETED",
                  "FAILED"
                ]
              },
              "url": {
                "type": "string",
                "nullable": true,
                "description": "COMPLETED: signed URL of the cut-out"
              }
            }
          }
        }
      },
      "Conflict409": {
        "type": "object",
        "description": "The resource cannot be deleted right now. `message` says why; nothing was deleted.",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "message": {
            "type": "string"
          },
          "data": {
            "type": "object",
            "properties": {
              "scheduleIds": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "The pending scheduled posts in the way. Cancel each with DELETE /v1/schedule/{scheduleId}, then retry."
              }
            }
          }
        },
        "required": [
          "success",
          "message"
        ]
      },
      "CatalogItem": {
        "type": "object",
        "description": "One value a create endpoint accepts. `id` is what you send; `name` is the label the dashboard shows. The other fields depend on the catalog.",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The value to send in the field the catalog feeds."
          },
          "name": {
            "type": "string",
            "description": "Human-readable name, as the dashboard shows it."
          },
          "nameEs": {
            "type": "string",
            "description": "`camera-moves`, `gestures`, `voice-presets` and `accents`: the name in Spanish, when the prompt library has it. `id` is still what you send."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "Short description, when the catalog has one."
          },
          "source": {
            "type": "string",
            "enum": [
              "library",
              "custom"
            ],
            "description": "`visual-styles` and `reactions`: a Hooked library entry or one your team made."
          },
          "previewImageUrl": {
            "type": "string",
            "nullable": true,
            "description": "`visual-styles`: a sample image of the style."
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true,
            "description": "`reactions`: a still of the reaction."
          },
          "videoUrl": {
            "type": "string",
            "nullable": true,
            "description": "`reactions`: the reaction clip."
          },
          "reaction": {
            "type": "string",
            "nullable": true,
            "description": "`reactions`: the expression, e.g. `surprise`."
          },
          "clips": {
            "type": "array",
            "description": "`games`: the clips of the game; pass one `id` as `gameplaySettings.selectedVideo`. Empty for `custom`, which takes a video of your media library.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "thumbnailUrl": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "mediaTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ai-images",
                "ai-videos"
              ]
            },
            "description": "`video-models` / `image-models`: the `mediaType` the model can be used with."
          },
          "quality": {
            "type": "string",
            "nullable": true,
            "enum": [
              "base",
              "pro",
              "ultra"
            ],
            "description": "`video-models` / `image-models`: the quality tier the model belongs to."
          },
          "makesSound": {
            "type": "boolean",
            "description": "`video-models`: the model generates audio with the clip (needed for a speaking cast)."
          },
          "durations": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "`video-models`: clip lengths, in seconds, the model generates."
          },
          "resolutions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`video-models`: resolutions the model generates."
          },
          "aspectRatios": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`video-models`: aspect ratios the model films."
          },
          "maxReferenceImages": {
            "type": "integer",
            "description": "`image-models` / `video-models`: reference images the model takes (0 = none), for `referenceMediaIds` of Generate Image / Generate Video."
          },
          "credits": {
            "type": "number",
            "description": "`image-models`: credits one image costs with Generate Image (managed teams; a byok team pays its own provider)."
          },
          "creditsByDuration": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "`video-models`: credits one clip costs with Generate Video, by clip length in seconds, at the default resolution (managed teams; a byok team pays its own provider).",
            "example": {
              "5": 30,
              "10": 60
            }
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "`cinematic`: the values the field accepts (`id`, `name`, and per value details)."
          },
          "min": {
            "type": "number",
            "description": "`cinematic`: lower bound of a numeric field."
          },
          "max": {
            "type": "number",
            "description": "`cinematic`: upper bound of a numeric field, or the most items of a list."
          },
          "default": {
            "description": "`cinematic`: the value used when the field is left out."
          },
          "group": {
            "type": "string",
            "description": "`camera-moves`: the section of the prompt library the move belongs to."
          },
          "ugcStudioFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`camera-moves`: the UGC Studio endpoints that allow the move."
          },
          "language": {
            "type": "string",
            "description": "`accents`: the language the accent speaks (`en`, `es`). An accent is only applied to a video in that language."
          },
          "defaultDuration": {
            "type": "number",
            "description": "`video-models`: the clip length used when `durationSeconds` is left out."
          },
          "defaultResolution": {
            "type": "string",
            "nullable": true,
            "description": "`video-models`: the resolution used when none is sent; null when the model has no choice."
          },
          "startFrame": {
            "type": "boolean",
            "description": "`video-models`: the model animates a start image (Generate Video `imageMediaId` / `imageUrl`)."
          },
          "endFrame": {
            "type": "boolean",
            "description": "`video-models`: the model takes an end image (`endImageMediaId`)."
          }
        }
      },
      "Character": {
        "type": "object",
        "description": "A Cinematic character of your team (Studio → Characters in the dashboard). Pass its `id` in `characterIds` of Create Cinematic Video.",
        "required": [
          "id",
          "name",
          "description",
          "voiceProfile",
          "presetId",
          "imageUrl",
          "imageStatus",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Pass it in `characterIds`."
          },
          "name": {
            "type": "string",
            "description": "The character's name, as the story calls it."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "The visual description you gave it."
          },
          "voiceProfile": {
            "type": "string",
            "nullable": true,
            "description": "How the character sounds, in words. It drives the AI-imagined voice."
          },
          "presetId": {
            "type": "string",
            "nullable": true,
            "description": "The visual style its portrait is generated in (a `visual-styles` catalog id or your `custom-<id>`)."
          },
          "imageUrl": {
            "type": "string",
            "nullable": true,
            "description": "Its reference photo, as a signed URL that expires. `null` until `imageStatus` is `COMPLETED`."
          },
          "imageStatus": {
            "type": "string",
            "enum": [
              "NONE",
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`NONE`: no photo. `PROCESSING`: a photo imported from `imageUrl` or a generated portrait is on its way. `COMPLETED`: `imageUrl` is set. `FAILED`: the import or the portrait failed (a portrait's credits are given back); set another photo with Update Character."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Account": {
        "type": "object",
        "description": "The team behind the API key. Never contains a key value.",
        "required": [
          "team",
          "billingMode",
          "plan",
          "credits",
          "storage",
          "keys"
        ],
        "properties": {
          "team": {
            "type": "object",
            "required": [
              "id",
              "name"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "billingMode": {
            "type": "string",
            "enum": [
              "managed",
              "byok"
            ],
            "description": "`managed`: generation runs on Hooked's provider keys and is paid with credits. `byok`: your team generates with its own provider keys (Settings → AI keys) and no credits are taken."
          },
          "plan": {
            "type": "object",
            "required": [
              "name",
              "status",
              "renewsAt"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The plan, e.g. `free`, `starter`, `pro`, `premium`, `ultra`."
              },
              "status": {
                "type": "string",
                "description": "Subscription status: `active`, `trialing`, `past_due`, `canceled`, `inactive`, …"
              },
              "renewsAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true,
                "description": "Next renewal, or `null` when the plan does not renew."
              }
            }
          },
          "credits": {
            "type": "object",
            "required": [
              "balance",
              "chargedForGeneration"
            ],
            "properties": {
              "balance": {
                "type": "number",
                "description": "Credits left: the plan's plus any extra credits bought."
              },
              "chargedForGeneration": {
                "type": "boolean",
                "description": "`true` on managed: creating a video spends from `balance`. `false` on byok: the balance is not used for generation."
              }
            }
          },
          "storage": {
            "type": "object",
            "required": [
              "usedBytes",
              "limitBytes"
            ],
            "properties": {
              "usedBytes": {
                "type": "integer",
                "description": "Bytes your media library and videos take."
              },
              "limitBytes": {
                "type": "integer",
                "description": "Your plan's storage limit, in bytes."
              }
            }
          },
          "keys": {
            "type": "array",
            "nullable": true,
            "description": "byok only (`null` on managed): each provider and whether its key is set and working. Never the key itself.",
            "items": {
              "type": "object",
              "required": [
                "provider",
                "configured",
                "status"
              ],
              "properties": {
                "provider": {
                  "type": "string",
                  "description": "e.g. `openrouter`, `elevenlabs`, `gemini`."
                },
                "configured": {
                  "type": "boolean",
                  "description": "A key is saved for this provider."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "missing",
                    "invalid"
                  ],
                  "description": "`ok`: validated and working. `missing`: none saved. `invalid`: saved but it failed (fix it in Settings → AI keys)."
                }
              }
            }
          }
        }
      },
      "CharacterWritten": {
        "description": "The character as saved, and what it cost.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Character"
          },
          {
            "type": "object",
            "required": [
              "creditsCharged"
            ],
            "properties": {
              "creditsCharged": {
                "type": "number",
                "description": "Credits taken for a generated portrait (0 for anything else, and on BYOK). Given back if the portrait fails."
              }
            }
          }
        ]
      },
      "CustomVoiceDenied403": {
        "type": "object",
        "description": "Your team cannot create a custom voice: it uses its own ElevenLabs account (`byok`: clone the voice there and it appears in List Voices), or the plan's custom voice quota is used up (`limit_reached`).",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "byok",
              "limit_reached"
            ]
          },
          "message": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "description": "Custom voices your plan allows (0 on BYOK)."
          },
          "currentCount": {
            "type": "integer",
            "description": "Custom voices your team has (cloned and designed)."
          }
        },
        "required": [
          "success",
          "code",
          "message"
        ],
        "example": {
          "success": false,
          "code": "limit_reached",
          "message": "You've reached your custom voice limit (1). Upgrade your plan to create more voices.",
          "limit": 1,
          "currentCount": 1
        }
      },
      "AvatarReaction": {
        "type": "object",
        "description": "A Hook + Demo reaction of one of your avatars: a short clip of the avatar making a face, used as `avatarId` in Create Hook Demo once `COMPLETED`.",
        "required": [
          "id",
          "reaction",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The reaction id. Once `COMPLETED`, pass it as `avatarId` to Create Hook Demo; it is also listed in GET /v1/catalog/reactions."
          },
          "reaction": {
            "type": "string",
            "enum": [
              "surprise",
              "shock",
              "excitement",
              "smirk",
              "confusion",
              "disgust",
              "happy",
              "laughing",
              "whispers",
              "nervous",
              "frustrated",
              "crying",
              "turn_reveal",
              "side_look",
              "double_take",
              "lean_in",
              "custom"
            ],
            "description": "The reaction asked for."
          },
          "status": {
            "type": "string",
            "enum": [
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`PROCESSING` while the still and the clip are made (about 1-3 minutes), then `COMPLETED` or `FAILED` (a failed reaction gives its credits back)."
          },
          "videoUrl": {
            "type": "string",
            "nullable": true,
            "description": "The clip (signed, expiring). `null` until `COMPLETED`."
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true,
            "description": "A still of the clip (signed, expiring). `null` until `COMPLETED`."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CustomAvatar": {
        "type": "object",
        "description": "One of your team's own avatars (an Actor under My Actors in the dashboard).",
        "required": [
          "id",
          "name",
          "status",
          "isCustom",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Pass it as `avatarId` in the create endpoints once `status` is `COMPLETED`."
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "`Realistic` (made from a photo) or `AI` (generated)."
          },
          "gender": {
            "type": "string",
            "description": "`Female` or `Male`. Read from the photo unless you set it; a generation shows `Female` until it is `COMPLETED`."
          },
          "age": {
            "type": "string",
            "description": "Age group read from the photo, for example `Young Adult` or `Adult`."
          },
          "image": {
            "type": "string",
            "nullable": true,
            "description": "The avatar image (signed, expiring). `null` until `COMPLETED`."
          },
          "status": {
            "type": "string",
            "enum": [
              "PROCESSING",
              "COMPLETED",
              "FAILED"
            ],
            "description": "`PROCESSING` while a generation runs, `COMPLETED` when the avatar can be used, `FAILED` when the generation failed (its credits are given back). A generation still `PROCESSING` after 15 minutes reads `FAILED`."
          },
          "situation": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Setting tags read from the photo."
          },
          "emotions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Expression tags read from the photo."
          },
          "skinTone": {
            "type": "string",
            "description": "`light`, `medium-light`, `medium` or `dark`."
          },
          "isCustom": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "custom"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvatarReaction"
            },
            "description": "Only in Get Avatar: the avatar's Hook + Demo reactions, newest first."
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Missing or invalid API key",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error401"
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Payment required: a BYOK team is missing provider keys (nothing was created or charged), a managed team has no live subscription, or there are not enough credits.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MissingCredentials402"
                },
                {
                  "$ref": "#/components/schemas/SubscriptionRequired402"
                },
                {
                  "$ref": "#/components/schemas/InsufficientCredits402"
                }
              ]
            },
            "examples": {
              "missingCredentials": {
                "value": {
                  "code": "missing_credentials",
                  "message": "Your team uses its own provider keys (BYOK) and these are missing or invalid: OpenRouter, ElevenLabs. Add them in Settings → AI keys.",
                  "errorCode": "MISSING_CREDENTIALS",
                  "missingProviders": [
                    "openrouter",
                    "elevenlabs"
                  ],
                  "details": {}
                }
              },
              "subscriptionRequired": {
                "value": {
                  "success": false,
                  "code": "subscription_required",
                  "errorCode": "SUBSCRIPTION_REQUIRED",
                  "message": "Your team generates with Hooked's keys, which are paid by your plan. Subscribe to keep generating."
                }
              },
              "insufficientCredits": {
                "value": {
                  "success": false,
                  "errorCode": "INSUFFICIENT_CREDITS",
                  "message": "Not enough credits to perform this action",
                  "creditsNeeded": 40,
                  "creditsAvailable": 12
                }
              }
            }
          }
        }
      },
      "EntitlementRequired": {
        "description": "The team does not have the product this endpoint needs",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/EntitlementRequired403"
            }
          }
        }
      },
      "ValidationError": {
        "description": "Validation error (also `Invalid JSON body`)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ValidationError400"
            }
          }
        }
      },
      "NotFound": {
        "description": "Not found (another team's resource answers the same)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFound404"
            }
          }
        }
      },
      "InternalError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error500"
            }
          }
        }
      },
      "ApiBadRequest": {
        "description": "Invalid input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "bad_request",
              "message": "Invalid input",
              "errorCode": "INVALID_INPUT",
              "details": {
                "scheduledDateTime": [
                  "scheduledDateTime must be a valid ISO 8601 date"
                ]
              }
            }
          }
        }
      },
      "ApiNotFound": {
        "description": "Not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "IdempotencyInProgress": {
        "description": "A request with the same `Idempotency-Key` is still running. Retry in a few seconds.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "details": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "required": [
                "success",
                "code",
                "message"
              ]
            },
            "example": {
              "success": false,
              "code": "idempotency_conflict",
              "message": "A request with this Idempotency-Key is still in progress",
              "details": {}
            }
          }
        }
      },
      "IdempotencyMismatch": {
        "description": "The `Idempotency-Key` was already used with a different body. Use a new key for a new request.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                },
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "details": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "required": [
                "success",
                "code",
                "message"
              ]
            },
            "example": {
              "success": false,
              "code": "idempotency_mismatch",
              "message": "Idempotency-Key was used with a different request",
              "details": {}
            }
          }
        }
      },
      "RateLimited429": {
        "description": "Your team is over a rate limit: 30 POST requests per minute, 120 other requests per minute, or 3 downloads of your URLs running at once. Nothing ran and nothing was charged: wait `Retry-After` seconds and send the request again. See [Rate limits](/guides/error-handling#rate-limits-429).",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before sending again.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "The limit of the bucket you hit (not sent for the download cap).",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in this window: 0 (not sent for the download cap).",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "When the window ends, in Unix seconds (not sent for the download cap).",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean",
                  "enum": [
                    false
                  ]
                },
                "errorCode": {
                  "type": "string",
                  "enum": [
                    "RATE_LIMITED"
                  ]
                },
                "message": {
                  "type": "string"
                },
                "retryAfterSeconds": {
                  "type": "integer"
                }
              },
              "required": [
                "success",
                "errorCode",
                "message",
                "retryAfterSeconds"
              ]
            },
            "example": {
              "success": false,
              "errorCode": "RATE_LIMITED",
              "message": "Rate limit exceeded: 30 POST requests per minute per team. Retry after 12 s.",
              "retryAfterSeconds": 12
            }
          }
        }
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header `Idempotent-Replayed: true`, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See [Idempotency](/guides/idempotency).",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255,
          "pattern": "^[\\x20-\\x7E]+$"
        },
        "example": "order-1042-video"
      }
    }
  },
  "paths": {
    "/v1/avatar/list": {
      "get": {
        "summary": "List Avatars",
        "description": "The avatars your team can use: the Hooked library first, then your team's custom avatars (only those that finished processing), one page of the merged list. Pass an avatar's `id` as `avatarId`. Avatars are the Actors of the dashboard; your team's custom avatars are its My Actors.",
        "operationId": "listAvatars",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "`library` (Hooked library only), `custom` (your team's only) or `all`. Any other value returns an empty list.",
            "schema": {
              "type": "string",
              "enum": [
                "library",
                "custom",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Avatars",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "avatars": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Avatar"
                          },
                          "description": "One page of avatars, library first."
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many avatars match `type`, across all pages."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size used."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset used."
                        },
                        "library": {
                          "type": "integer",
                          "description": "How many library avatars match, across all pages."
                        },
                        "custom": {
                          "type": "integer",
                          "description": "How many custom avatars match, across all pages."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "avatars": [
                      {
                        "id": "1",
                        "name": "Harper",
                        "type": "AI",
                        "gender": "Female",
                        "age": "Young Adult",
                        "image": "https://.../harper.png",
                        "isHD": true,
                        "isPro": false,
                        "isNew": true,
                        "situation": [
                          "couch"
                        ],
                        "emotions": [
                          "Calm",
                          "Attentive"
                        ],
                        "skinTone": "light",
                        "isCustom": false,
                        "source": "library"
                      }
                    ],
                    "total": 90,
                    "limit": 50,
                    "offset": 0,
                    "library": 83,
                    "custom": 7
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to fetch avatars"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice/list": {
      "get": {
        "summary": "List Voices",
        "description": "Voices you can pass as `voiceId`: the ElevenLabs library voices, then your team's cloned voices. On a team using its own keys (BYOK) the library is the voice list of your own ElevenLabs account, and it is empty without an ElevenLabs key. A cloned voice only works in the mode (managed or BYOK) it was cloned in: in the other mode it is listed with `unavailable: true` and an `unavailableReason`. If the voice provider cannot be reached, the library part comes back empty instead of failing. Voices you clone with Clone a Voice (POST /v1/voice/clone) are listed with `isCustom: true`.",
        "operationId": "listVoices",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "`library` (library voices only), `custom` (your team's cloned voices only) or `all` (both).",
            "schema": {
              "type": "string",
              "enum": [
                "library",
                "custom",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Only voices in this language, case-insensitive exact match (for example `English`, `Spanish`).",
            "schema": {
              "type": "string"
            },
            "example": "English"
          },
          {
            "name": "gender",
            "in": "query",
            "required": false,
            "description": "Only voices of this gender, case-insensitive exact match (for example `Male`, `Female`).",
            "schema": {
              "type": "string"
            },
            "example": "Female"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Voices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "voices": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Voice"
                          },
                          "description": "One page of voices, library first."
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many voices match the filters, across all pages."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size used."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset used."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "voices": [
                      {
                        "id": "tzX5paJ07p5hyWFcU3uG",
                        "voiceId": "tzX5paJ07p5hyWFcU3uG",
                        "name": "Jude",
                        "gender": "Male",
                        "language": "English",
                        "accent": "British",
                        "country": "GB",
                        "age": "young",
                        "templateUrl": "https://.../preview.mp3",
                        "thumbnail": "/images/voice-default.png",
                        "isCustom": false,
                        "source": "library",
                        "description": "Calm and clear"
                      },
                      {
                        "id": "cm2b3c4d5e6f7g8h9i0j1k2l3",
                        "voiceId": "Xb7hH8MSUJpSbSDYk0k2",
                        "name": "My cloned voice",
                        "gender": "Female",
                        "language": "English",
                        "country": "US",
                        "age": "unknown",
                        "templateUrl": "https://.../sample.mp3",
                        "isCustom": true,
                        "source": "custom",
                        "ownerProvider": "byok",
                        "unavailable": true,
                        "unavailableReason": "This voice lives in your team's own ElevenLabs account and is unavailable while the team is in managed mode."
                      }
                    ],
                    "total": 2,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to fetch voices"
                }
              }
            }
          }
        }
      }
    },
    "/v1/music/list": {
      "get": {
        "summary": "List Music",
        "description": "The library's background music tracks; pass a track's `id` as `musicId`. Not paginated: every matching track comes back in one response.",
        "operationId": "listMusic",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Only tracks of this category, case-insensitive exact match (for example `Electronic`, `Pop`, `Cinematic`).",
            "schema": {
              "type": "string"
            },
            "example": "Electronic"
          },
          {
            "name": "genre",
            "in": "query",
            "required": false,
            "description": "Only tracks tagged with this genre, case-insensitive exact match.",
            "schema": {
              "type": "string"
            },
            "example": "Electronic"
          }
        ],
        "responses": {
          "200": {
            "description": "Music tracks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "music": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Music"
                          },
                          "description": "The matching tracks."
                        },
                        "categories": {
                          "type": "array",
                          "description": "The category list, the same whatever the filters.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Electronic"
                              },
                              "description": {
                                "type": "string",
                                "example": "Electronic music collection"
                              }
                            }
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "Number of tracks in `music`."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "music": [
                      {
                        "id": "1",
                        "name": "Bladerunner 2049",
                        "url": "https://.../music/audio/bladerunner-2049.mp3",
                        "thumbnail": "https://.../music/thumbnail/bladerunner-2049.jpg",
                        "category": "Futuristic",
                        "duration": "03:00",
                        "genres": [
                          "Futuristic",
                          "Electronic"
                        ]
                      }
                    ],
                    "categories": [
                      {
                        "id": 1,
                        "name": "Electronic",
                        "description": "Electronic music collection"
                      },
                      {
                        "id": 2,
                        "name": "Pop",
                        "description": "Pop music collection"
                      }
                    ],
                    "total": 1
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to fetch music tracks"
                }
              }
            }
          }
        }
      }
    },
    "/v1/project/create/hook-demo": {
      "post": {
        "summary": "Create Hook + Demo Video",
        "description": "An avatar reaction clip with your hook text on top, followed by your demo media. Nothing is generated by an AI model, so the project is assembled during the request (`status: completed`) and its render starts right away. Managed teams pay a fixed 7 credits; BYOK teams need an OpenRouter key (used for the project name). On the free plan the number of projects is limited (403 with `limitReached: true`).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createHookDemo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "avatarId",
                  "text"
                ],
                "properties": {
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "ID of an avatar **reaction** (the clip that opens the video): a library reaction (`\"1\"` to `\"38\"`, listed on this page) or one of your team's custom reactions. Not an ID from /v1/avatar/list. Send it as a string. An unknown ID answers `400 avatarId: Avatar \"…\" not found.`",
                    "minLength": 1,
                    "example": "8"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000,
                    "description": "The hook text. It is drawn on top of the whole video, the reaction and the demo media, and is the only text on screen (there are no captions)."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the text when omitted."
                  },
                  "textSettings": {
                    "type": "object",
                    "description": "Style of the hook text (the text is always drawn).",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "modern",
                          "tiktok",
                          "social",
                          "impact",
                          "slicedText",
                          "minimalMonochrome",
                          "highlight",
                          "gradient",
                          "neonFuture",
                          "avantGarde",
                          "glassmorphic",
                          "stageEffect",
                          "neonEffect",
                          "glowEffect",
                          "wrapEffect"
                        ],
                        "default": "tiktok",
                        "description": "Text style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Where the text sits on the video."
                      },
                      "textColor": {
                        "type": "string",
                        "description": "Text color, e.g. `#FFFFFF`. Defaults to the preset's color."
                      },
                      "backgroundColor": {
                        "type": "string",
                        "description": "Color of the box behind the text, e.g. `#000000`, or `transparent`. Defaults to the preset's."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "description": "IDs of images or videos in your team's media library (max 50), played after the reaction in this order. Images are shown for 5 seconds; videos play at their own length. An ID that is not in your library answers `400 media: Media \"…\" not found`. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`.",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16"
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list or your own music. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "avatarId": "8",
                "text": "I did not expect this app to fix my mornings",
                "media": [
                  "cm4x9k2p10001ab12cd34ef56",
                  "cm4x9k2p10002ab12cd34ef56"
                ],
                "textSettings": {
                  "preset": "tiktok",
                  "alignment": "bottom",
                  "textColor": "#FFFFFF"
                },
                "aspectRatio": "ratio_9_16",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET",
                "metadata": {
                  "campaignId": "campaign_42"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. `data.status` is `completed` (assembled; the render starts on its own) or `failed` when the video could not be built (credits refunded, nothing is rendered). Follow the render with GET /v1/project/{projectId} or the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "completed"
                  },
                  "message": "Hook Demo successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/ugc-studio/product-in-hand": {
      "post": {
        "summary": "UGC Studio: Product in Hand",
        "description": "The avatar shows, prepares and uses your product while talking to camera; a one-line hook is written at the top of the video. BYOK: needs OpenRouter and Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUgcStudioProductInHand",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId",
                  "productImageKey"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says. Wrap the words where the product should appear in `[product] … [/product]`; it also adds a short silent shot of the product alone (priced on top). Marks are never spoken; unmarked, the director decides."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted. Outside the voiceover format it may be replaced by the on-screen hook the director writes once the clips are planned."
                  },
                  "productImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Your product photo: the id of an image in your media library, or a public `https` image URL (imported into your library first; a stored key of your library still works). The avatar shows, prepares and uses it."
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "B-roll: media IDs from your team's library (max 50), shown full frame in short muted bursts (up to 3 s each) over the middle of the video, when it is longer than 10 s. Any ID not in your library answers 400. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "adSettings": {
                    "type": "object",
                    "description": "B-roll. Also accepted as `projectSettings.ad`.",
                    "properties": {
                      "addBRoll": {
                        "type": "boolean",
                        "description": "Show the `media` as B-roll. Default: true when media is sent."
                      }
                    }
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "depth-of-field-bokeh"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Only the steady moves are offered, so what the avatar holds or shows stays framed. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` and `pointsAtContent` too."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Serum ad",
                "script": "I was skeptical, but after two weeks with [product]this serum[/product] my skin has never looked better.",
                "avatarId": "1",
                "productImageKey": "https://example.com/images/serum.png",
                "videoStyle": {
                  "cameras": [
                    "static-shot",
                    "slow-zoom-to-the-face"
                  ]
                },
                "caption": {
                  "preset": "tiktok",
                  "alignment": "bottom",
                  "disabled": false
                },
                "language": "en",
                "webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET",
                "metadata": {
                  "campaign": "serum-q4"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/ugc-studio/app-demo": {
      "post": {
        "summary": "UGC Studio: App Demo",
        "description": "The avatar pitches your app while your screen recording takes over the frame, the avatar in a corner card. Needs `media` (a screen recording or screenshots) or `appUrl`. BYOK: needs OpenRouter, Gemini and Bria (Bria not with `adSettings.removeAvatarBackground: false` or `adSettings.avatarPresentation: cover`).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUgcStudioAppDemo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says. Wrap the words where your app should take over in `[app] … [/app]`. Marks are never spoken; unmarked, the director decides."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted. Outside the voiceover format it may be replaced by the on-screen hook the director writes once the clips are planned."
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "Your screen recording or screenshots: media IDs from your team's library (max 50). A screenshot also puts the app in the avatar's hands (priced). Send `media` or `appUrl`; any ID not in your library answers 400. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "appUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 1000,
                    "description": "A website to record as the screencast, used only when you send no `media`."
                  },
                  "scrollMode": {
                    "type": "string",
                    "enum": [
                      "restart",
                      "loop",
                      "once",
                      "fixed"
                    ],
                    "description": "With `appUrl`: how the recorded page scrolls. restart: down, then jump back to the top. loop: down and up. once: down and stay. fixed: no scroll.",
                    "default": "once"
                  },
                  "showcaseAfterSeconds": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 15,
                    "description": "Seconds (0-15) before the screencast enters. Omit it to let the director choose (or to follow your `[app]` mark)."
                  },
                  "adSettings": {
                    "type": "object",
                    "description": "How the content and the avatar share the frame. Also accepted as `projectSettings.ad`.",
                    "properties": {
                      "bRollType": {
                        "type": "string",
                        "enum": [
                          "down",
                          "up",
                          "left",
                          "right",
                          "rounded-left",
                          "rounded-right",
                          "circle-left",
                          "circle-right",
                          "full-width"
                        ],
                        "description": "Where the content and the avatar sit. up / down: split screen, content on the top / bottom half. left / right: split screen, content on that half. rounded-left / rounded-right: content full frame, avatar in a rounded card on that side. circle-left / circle-right: the same in a circle. full-width: the content covers the whole frame. Default: rounded-right."
                      },
                      "removeAvatarBackground": {
                        "type": "boolean",
                        "description": "Cut the avatar out of its background in the picture-in-picture card (not with `avatarPresentation` `cover`). BYOK: needs the Bria key.",
                        "default": true
                      },
                      "avatarPresentation": {
                        "type": "string",
                        "enum": [
                          "pip",
                          "cover"
                        ],
                        "default": "pip",
                        "description": "`pip` keeps the avatar on screen while the content shows; `cover` lets the content cover it (only its voice is heard)."
                      }
                    }
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "depth-of-field-bokeh"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Only the steady moves are offered, so what the avatar holds or shows stays framed. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` and `pointsAtContent` too."
                      },
                      "pointsAtContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Only with `naturalGestures`: the avatar points to where the content enters."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Planner app ad",
                "script": "This app plans my whole week in two minutes. [app]Look how simple this is.[/app]",
                "avatarId": "1",
                "appUrl": "https://example.com",
                "scrollMode": "once",
                "adSettings": {
                  "avatarPresentation": "pip"
                },
                "language": "en",
                "webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/ugc-studio/fashion": {
      "post": {
        "summary": "UGC Studio: Outfit / Fashion",
        "description": "The avatar wears your outfits, one look per clip, from your reference photos (or your own outfit videos). Needs `outfitImageKeys` or outfit videos in `media`. BYOK: needs OpenRouter, Gemini and Bria (Bria not with `adSettings.removeAvatarBackground: false` or `adSettings.avatarPresentation: cover`).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUgcStudioFashion",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says. Wrap the words for each look in `[look 1] … [/look]`, `[look 2] … [/look]` and so on. Marks are never spoken; unmarked, the director decides."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted. Outside the voiceover format it may be replaced by the on-screen hook the director writes once the clips are planned."
                  },
                  "outfitImageKeys": {
                    "type": "array",
                    "maxItems": 4,
                    "items": {
                      "type": "string",
                      "maxLength": 1000
                    },
                    "description": "Up to 4 outfit photos, each the id of an image in your media library, or a public `https` image URL (imported into your library first; a stored key of your library still works). Each one is dressed on the avatar and filmed (priced per look). Needed unless you send outfit videos in `media`, which then replace them."
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "Your own outfit VIDEOS: media IDs from your team's library (max 50). Photos here are not read: send them as `outfitImageKeys` (photos in `media` alone answer 400). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "adSettings": {
                    "type": "object",
                    "description": "How the content and the avatar share the frame. Also accepted as `projectSettings.ad`.",
                    "properties": {
                      "bRollType": {
                        "type": "string",
                        "enum": [
                          "down",
                          "up",
                          "left",
                          "right",
                          "rounded-left",
                          "rounded-right",
                          "circle-left",
                          "circle-right",
                          "full-width"
                        ],
                        "description": "Where the content and the avatar sit. up / down: split screen, content on the top / bottom half. left / right: split screen, content on that half. rounded-left / rounded-right: content full frame, avatar in a rounded card on that side. circle-left / circle-right: the same in a circle. full-width: the content covers the whole frame. Default: rounded-right."
                      },
                      "removeAvatarBackground": {
                        "type": "boolean",
                        "description": "Cut the avatar out of its background in the picture-in-picture card (not with `avatarPresentation` `cover`). BYOK: needs the Bria key.",
                        "default": true
                      },
                      "avatarPresentation": {
                        "type": "string",
                        "enum": [
                          "pip",
                          "cover"
                        ],
                        "default": "pip",
                        "description": "`pip` keeps the avatar on screen while the content shows; `cover` lets the content cover it (only its voice is heard)."
                      }
                    }
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "depth-of-field-bokeh"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Only the steady moves are offered, so what the avatar holds or shows stays framed. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` and `pointsAtContent` too."
                      },
                      "pointsAtContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Only with `naturalGestures`: the avatar points to where the content enters."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Spring drop",
                "script": "Three looks for spring. [look 1]This linen set is my favourite.[/look] [look 2]And this one for the weekend.[/look]",
                "avatarId": "1",
                "outfitImageKeys": [
                  "https://example.com/images/linen-set.png",
                  "https://example.com/images/weekend.png"
                ],
                "language": "en",
                "webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/ugc-studio/before-after": {
      "post": {
        "summary": "UGC Studio: Before / After",
        "description": "A transformation ad: the before and the after enter on the lines that name them, pointed at by the avatar during the hook. Your own photos, or generated from the avatar. BYOK: needs OpenRouter and Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUgcStudioBeforeAfter",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says. Wrap the words for each state in `[before] … [/before]` and `[after] … [/after]`. Marks are never spoken; unmarked, the director decides."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted. Outside the voiceover format it may be replaced by the on-screen hook the director writes once the clips are planned."
                  },
                  "beforeImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Your own before photo: the id of an image in your media library, or a public `https` image URL (imported into your library first; a stored key of your library still works). Send it with `afterImageKey`; with only one of the two both are ignored. Without them the before and after are generated from the avatar (priced)."
                  },
                  "afterImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Your own after photo. Send it with `beforeImageKey`."
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "B-roll: media IDs from your team's library (max 50), shown full frame in short muted bursts (up to 3 s each) over the middle of the video, when it is longer than 10 s. Any ID not in your library answers 400. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "adSettings": {
                    "type": "object",
                    "description": "B-roll. Also accepted as `projectSettings.ad`.",
                    "properties": {
                      "addBRoll": {
                        "type": "boolean",
                        "description": "Show the `media` as B-roll. Default: true when media is sent."
                      }
                    }
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "pull-back-reveal",
                            "slow-orbit",
                            "tracking-while-walking",
                            "push-in-to-the-eyes",
                            "heroic-low-angle",
                            "depth-of-field-bokeh",
                            "slow-motion"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` and `pointsAtContent` too."
                      },
                      "pointsAtContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "Only with `naturalGestures`: the avatar points to where the content enters."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Skin routine",
                "script": "[before]Six weeks ago my skin looked like this.[/before] [after]This is it today.[/after] Here is what changed.",
                "avatarId": "1",
                "language": "en",
                "webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/ugc-studio/voiceover": {
      "post": {
        "summary": "UGC Studio: Voiceover",
        "description": "Nobody talks to camera: a narrator voice reads the script over silent scenes of the avatar, one scene per stretch of the script. BYOK: needs OpenRouter and ElevenLabs.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUgcStudioVoiceover",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId",
                  "voiceId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the narrator reads over the scenes."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted."
                  },
                  "voiceId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "The narrator: a voice ID from /v1/voice/list (yours or the library's). An unknown ID answers 400."
                  },
                  "audio": {
                    "type": "object",
                    "description": "The narrator's voice settings (ElevenLabs).",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Narration speed (0.7-1.2)"
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Voice stability (0-1)"
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "Similarity to the original voice (0-1)"
                      }
                    }
                  },
                  "productImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Optional product photo (the id of an image in your media library, or a public `https` image URL (imported into your library first; a stored key of your library still works)): one scene shows the product alone."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Morning routine",
                "script": "Mornings used to be chaos. Now I start every day with ten quiet minutes.",
                "avatarId": "1",
                "voiceId": "1000",
                "language": "en",
                "webhook": "https://example.com/hooks/hooked?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/ugc-ads": {
      "post": {
        "summary": "Create UGC Ad (older endpoint)",
        "description": "Older endpoint, kept working for existing integrations: use the UGC Studio endpoint of your format (`/v1/project/create/ugc-studio/{format}`) instead. A UGC ad: an avatar presents your product, app or outfit. The avatar speaks with the video model's own voice (except in the voiceover format, where an ElevenLabs narrator reads the script). Without `ugcStudio` the request makes a plain avatar ad with your `media` as B-roll. BYOK: needs OpenRouter and Gemini; the voiceover format needs OpenRouter and ElevenLabs instead; app_demo and fashion also need Bria unless `adSettings.removeAvatarBackground` is false or `adSettings.avatarPresentation` is cover.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createUGCAd",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says (or, in the voiceover format, what the narrator reads). Optional marks place the content on the words they wrap and are never spoken: `[look 1] … [/look]` (fashion), `[app] … [/app]` (app_demo), `[before] … [/before]` and `[after] … [/after]` (before_after), `[product] … [/product]` (product_in_hand: also adds a short silent shot of the product alone, priced on top). Unmarked, the director decides."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted. Outside the voiceover format it may be replaced by the on-screen hook the director writes once the clips are planned."
                  },
                  "ugcStudio": {
                    "type": "object",
                    "description": "The ad format and its assets. Image keys are a public `https` image URL or the storage key of an image in your team's library; a key of another team answers 400. Omit `ugcStudio` for a plain avatar ad.",
                    "properties": {
                      "format": {
                        "type": "string",
                        "enum": [
                          "product_in_hand",
                          "before_after",
                          "app_demo",
                          "fashion",
                          "voiceover"
                        ],
                        "default": "product_in_hand",
                        "description": "product_in_hand: the avatar shows and uses your product (needs productImageKey); a one-line hook is written at the top of the video. before_after: before and after photos enter on the lines that name them. app_demo: your screencast covers the frame while the avatar narrates (needs media or appUrl). fashion: the avatar wears each outfit (needs outfitImageKeys, or outfit videos in media). voiceover: nobody talks to camera; a narrator (voiceId) reads the script over silent scenes of the avatar."
                      },
                      "productImageKey": {
                        "type": "string",
                        "maxLength": 1000,
                        "description": "Product photo. Required by product_in_hand; optional in voiceover, where one scene shows the product alone. Ignored by the other formats."
                      },
                      "outfitImageKeys": {
                        "type": "array",
                        "maxItems": 4,
                        "items": {
                          "type": "string",
                          "maxLength": 1000
                        },
                        "description": "Fashion: up to 4 outfit photos; each one is dressed on the avatar and filmed (priced per look). Needed unless you send outfit videos in media, which then replace them."
                      },
                      "beforeImageKey": {
                        "type": "string",
                        "maxLength": 1000,
                        "description": "Before/after: your own before photo. Send it with afterImageKey; with only one of the two both are ignored and the states are generated from the avatar (priced)."
                      },
                      "afterImageKey": {
                        "type": "string",
                        "maxLength": 1000,
                        "description": "Before/after: your own after photo. Send it with beforeImageKey."
                      },
                      "appUrl": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 1000,
                        "description": "App demo: a website to record as the screencast. Used only when you send no media."
                      },
                      "scrollMode": {
                        "type": "string",
                        "enum": [
                          "restart",
                          "loop",
                          "once",
                          "fixed"
                        ],
                        "description": "App demo with appUrl (and no media): how the recorded page scrolls. restart: down, then jump back to the top. loop: down and up. once: down and stay. fixed: no scroll.",
                        "default": "once"
                      },
                      "showcaseAfterSeconds": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 15,
                        "description": "App demo: seconds (0-15) before the screencast enters. Omit it to let the director choose (or to follow your `[app]` mark)."
                      }
                    }
                  },
                  "voiceId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Voiceover format only, and required there: the narrator, a voice ID from /v1/voice/list (unknown ID: 400). The other formats ignore it: the avatar speaks with its own voice."
                  },
                  "media": {
                    "type": "array",
                    "description": "Media IDs from your team's library (max 50). Any ID not in your library answers 400. Not used by the voiceover format. product_in_hand, before_after or no format: B-roll, shown full frame in short muted bursts (up to 3 s each) over the middle of the video, when it is longer than 10 s. app_demo: the screen recording or screenshots (a screenshot also puts the app in the avatar's hands, priced). fashion: outfit VIDEOS (photos in media alone answer 400; send photos as ugcStudio.outfitImageKeys). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`.",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    }
                  },
                  "adSettings": {
                    "type": "object",
                    "description": "Layout. Not used by the voiceover format. Also accepted as `projectSettings.ad`.",
                    "properties": {
                      "addBRoll": {
                        "type": "boolean",
                        "description": "product_in_hand, before_after or no format, only with media: show it as B-roll. Default: true when media is sent."
                      },
                      "bRollType": {
                        "type": "string",
                        "enum": [
                          "down",
                          "up",
                          "left",
                          "right",
                          "rounded-left",
                          "rounded-right",
                          "circle-left",
                          "circle-right",
                          "full-width"
                        ],
                        "description": "app_demo and fashion only: where the content and the avatar sit. up / down: split screen, content on the top / bottom half. left / right: split screen, content on that half. rounded-left / rounded-right: content full frame, avatar in a rounded card on that side. circle-left / circle-right: the same in a circle. full-width: the content covers the whole frame. Default: rounded-right."
                      },
                      "removeAvatarBackground": {
                        "type": "boolean",
                        "description": "app_demo and fashion only, not with avatarPresentation cover: cut the avatar out of its background in the picture-in-picture card. BYOK: needs the Bria key.",
                        "default": true
                      },
                      "avatarPresentation": {
                        "type": "string",
                        "enum": [
                          "pip",
                          "cover"
                        ],
                        "default": "pip",
                        "description": "app_demo and fashion only: pip keeps the avatar on screen while the content shows; cover lets the content cover it (only its voice is heard)."
                      }
                    }
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional. Not used by the voiceover format.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "pull-back-reveal",
                            "slow-orbit",
                            "tracking-while-walking",
                            "push-in-to-the-eyes",
                            "heroic-low-angle",
                            "depth-of-field-bokeh",
                            "slow-motion"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`. `product_in_hand`, `app_demo` and `fashion` only use the steady ones (`most-used-still-camera-gestures`, `static-shot`, `slow-zoom-to-the-face`, `fast-zoom-as-they-speak`, `subtle-handheld`, `subtle-push-in-podcast`, `depth-of-field-bokeh`); the others are dropped, and if none is left the video uses `most-used-still-camera-gestures`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` and `pointsAtContent` too."
                      },
                      "pointsAtContent": {
                        "type": "boolean",
                        "default": true,
                        "description": "`app_demo`, `fashion` and `before_after` only, and only with `naturalGestures`: the avatar points to where the content (the app, the outfit, the before/after photo) enters."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Shape of the video."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Voiceover format only: the narrator's voice settings (ElevenLabs). The other formats speak with the avatar's own voice.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Narration speed (0.7-1.2)"
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Voice stability (0-1)"
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "Similarity to the original voice (0-1)"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Serum ad",
                "script": "I've tried every serum out there, and this is the first one that actually made a difference.",
                "avatarId": "1",
                "ugcStudio": {
                  "format": "product_in_hand",
                  "productImageKey": "https://yoursite.com/serum.png"
                },
                "videoStyle": {
                  "cameras": [
                    "static-shot",
                    "slow-zoom-to-the-face"
                  ]
                },
                "caption": {
                  "preset": "tiktok",
                  "alignment": "bottom",
                  "disabled": false
                },
                "aspectRatio": "ratio_9_16",
                "language": "en",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET",
                "metadata": {
                  "campaignId": "campaign_42"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC ad successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/talking-avatar": {
      "post": {
        "summary": "Create Talking Avatar Video",
        "description": "An avatar talking to camera, filmed with the camera moves and gestures you choose. Always 9:16. The avatar speaks with the video model's own voice: no voiceId. BYOK: needs OpenRouter and Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createTalkingAvatar",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "avatarId"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "What the avatar says. It is split into short clips; write it the way a person would say it: punctuation and short sentences shape the delivery."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Avatar ID from /v1/avatar/list (the library's or your team's own). An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated when omitted."
                  },
                  "videoStyle": {
                    "type": "object",
                    "description": "How the avatar is filmed and how it speaks. Every field is optional.",
                    "properties": {
                      "cameras": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "most-used-still-camera-gestures",
                            "static-shot",
                            "slow-zoom-to-the-face",
                            "fast-zoom-as-they-speak",
                            "subtle-handheld",
                            "subtle-push-in-podcast",
                            "pull-back-reveal",
                            "slow-orbit",
                            "tracking-while-walking",
                            "push-in-to-the-eyes",
                            "heroic-low-angle",
                            "depth-of-field-bokeh",
                            "slow-motion"
                          ]
                        },
                        "description": "Camera moves this video may use, at least one; the director picks one per clip. Default: `most-used-still-camera-gestures`, `subtle-handheld`, `subtle-push-in-podcast`, `slow-zoom-to-the-face`."
                      },
                      "naturalGestures": {
                        "type": "boolean",
                        "default": true,
                        "description": "Let the avatar move its hands and head while talking. `false` turns off `gestures` too."
                      },
                      "gestures": {
                        "type": "array",
                        "maxItems": 20,
                        "items": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "default": [],
                        "description": "Gestures to use, in alternate clips (never the first or the last), word for word from this list: `adjusts their cap`, `takes a sip of coffee and sets the cup down`, `fixes their hair`, `waves hello`, `laughs`, `with a surprised look on their face`, `and nods slowly, smiling`, `points up`, `points up to the left`, `points to the right`, `crosses their arms`, `shrugs`, `gives a thumbs up`, `claps once`, `tilts their head curiously`, `adjusts their glasses`, `tucks hair behind their ear`, `taps their chin thoughtfully`, `snaps their fingers`, `rolls their eyes playfully`. Anything else is ignored. Empty: picked automatically. Needs `naturalGestures`."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "Voice card of the avatar, repeated in every clip. Picked from the avatar's gender and age when omitted. `voiceTone` wins over it."
                      },
                      "accent": {
                        "type": "string",
                        "enum": [
                          "us-neutral-general-american",
                          "us-southern",
                          "us-new-york",
                          "uk-london",
                          "uk-northern-manchester",
                          "australian-neutral",
                          "irish-dublin",
                          "spanish-neutral-latin-american",
                          "spanish-spain-neutral-peninsular",
                          "spanish-mexico",
                          "spanish-colombia",
                          "spanish-argentina-rioplatense",
                          "spanish-caribbean"
                        ],
                        "description": "Accent card. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); otherwise the neutral accent of that language is used. Languages other than English and Spanish get no accent card."
                      },
                      "voiceTone": {
                        "type": "string",
                        "maxLength": 400,
                        "description": "Your own description of the voice (max 400 characters). Wins over `voice`."
                      }
                    }
                  },
                  "language": {
                    "type": "string",
                    "description": "Language the avatar speaks; detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Morning tip",
                "script": "Here's one thing I do every morning that changed my productivity.",
                "avatarId": "1",
                "videoStyle": {
                  "cameras": [
                    "static-shot"
                  ],
                  "naturalGestures": true
                },
                "language": "en",
                "caption": {
                  "preset": "tiktok",
                  "alignment": "bottom",
                  "disabled": false
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "UGC video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/podcast-interview": {
      "post": {
        "summary": "Create Podcast / Dualcast Video",
        "description": "A two-person podcast clip. Podcast mode needs `avatarId` (host) and `guest`; dualcast mode needs one of `dualcastImageKey`, `dualcastAvatarId` or `dualcastAvatars`. BYOK: needs OpenRouter and Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createPodcastInterview",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "podcast",
                      "dualcast"
                    ],
                    "default": "podcast",
                    "description": "podcast: each person filmed on their own and cut back and forth (needs avatarId and guest). dualcast: both people in one shot, one talks while the other listens (needs dualcastImageKey, dualcastAvatars or dualcastAvatarId)."
                  },
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "The dialogue. Wrap each turn in who says it: `[A] … [/A]` (the host, or the person on the left in dualcast) and `[B] … [/B]` (the guest, or the person on the right); lines starting with `A:` / `B:` read the same. Both people must speak. Every turn is its own clip and a long turn is split between sentences; at most 24 clips. Inside a turn: an action in brackets in your words (`[nods]`) happens before speaking at the start, or after the words before it; `[camera] … [/camera]` marks words said to the camera; `[product] … [/product]` marks the words during which productImageKey is on screen."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated when omitted."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Podcast mode, required there: the host (A), an avatar from /v1/avatar/list. One already on a podcast set works best, since the generated guest sits in the same room. Ignored in dualcast."
                  },
                  "guest": {
                    "type": "object",
                    "description": "Podcast mode, required there: the guest (B). In dualcast only `voice` is read, as the voice of the person on the right.",
                    "properties": {
                      "source": {
                        "type": "string",
                        "enum": [
                          "generated",
                          "avatar"
                        ],
                        "default": "generated",
                        "description": "generated: a new person in the same room, seen from the other seat, from `description`. avatar: another avatar (`avatarId`), placed in the same room."
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 300,
                        "description": "Required when source is generated: who the guest is (max 300 characters), e.g. `a man in his 30s, casual, average looking`."
                      },
                      "avatarId": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Required when source is avatar: an avatar ID from /v1/avatar/list."
                      },
                      "voice": {
                        "type": "string",
                        "enum": [
                          "young-woman-25-30",
                          "woman-mid-20s",
                          "woman-mid-30s",
                          "older-woman-50",
                          "young-man-25-30",
                          "man-mid-20s",
                          "man-mid-30s",
                          "older-man-50"
                        ],
                        "description": "B's voice card. Unset: the one that fits the guest (in dualcast, the person on the right)."
                      }
                    }
                  },
                  "dualcastImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "Dualcast: an image with exactly two people, a public `https` URL or the storage key of an image in your team's library (another team's key: 400). A is on the left, B on the right. Used first when you send more than one source."
                  },
                  "dualcastAvatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Dualcast: an avatar whose image already shows both people (A left, B right). Used only when neither dualcastImageKey nor dualcastAvatars is sent."
                  },
                  "dualcastAvatars": {
                    "type": "object",
                    "description": "Dualcast: two avatar IDs put side by side on a set (one more generated image, priced); left is A, right is B. Used only when dualcastImageKey is not sent.",
                    "properties": {
                      "left": {
                        "type": "string",
                        "maxLength": 30
                      },
                      "right": {
                        "type": "string",
                        "maxLength": 30
                      }
                    },
                    "required": [
                      "left",
                      "right"
                    ]
                  },
                  "dualcastSet": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "Dualcast with dualcastAvatars only: the set they sit on, in your words (max 300 characters)."
                  },
                  "hostSet": {
                    "type": "string",
                    "maxLength": 300,
                    "description": "Podcast mode only: move the host to this set first, in your words (max 300 characters), e.g. `a cozy podcast studio with a boom microphone`. Only the background changes (one more generated image, priced)."
                  },
                  "productImageKey": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "A product photo (the id of an image in your media library, or a public `https` URL imported into your library first), shown at the top of the video on the words marked `[product] … [/product]`. Only used when the script marks them."
                  },
                  "hostVoice": {
                    "type": "string",
                    "enum": [
                      "young-woman-25-30",
                      "woman-mid-20s",
                      "woman-mid-30s",
                      "older-woman-50",
                      "young-man-25-30",
                      "man-mid-20s",
                      "man-mid-30s",
                      "older-man-50"
                    ],
                    "description": "A's voice card. Unset: the one that fits the host (podcast) or the person on the left (dualcast)."
                  },
                  "accent": {
                    "type": "string",
                    "enum": [
                      "us-neutral-general-american",
                      "us-southern",
                      "us-new-york",
                      "uk-london",
                      "uk-northern-manchester",
                      "australian-neutral",
                      "irish-dublin",
                      "spanish-neutral-latin-american",
                      "spanish-spain-neutral-peninsular",
                      "spanish-mexico",
                      "spanish-colombia",
                      "spanish-argentina-rioplatense",
                      "spanish-caribbean"
                    ],
                    "description": "One accent card for both people. It applies only when it speaks the video's `language` (the first seven are English, the rest Spanish); unset or mismatched, the neutral accent of that language is used."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16"
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the dialogue, detected from the script when omitted. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "tiktok",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "mode": "podcast",
                "script": "[A] So what's the one habit that changed your business? [/A]\n[B] Honestly, saying no to most meetings. [/B]",
                "avatarId": "1",
                "guest": {
                  "source": "generated",
                  "description": "a man in his 40s with a grey beard and a denim shirt"
                },
                "caption": {
                  "preset": "tiktok",
                  "alignment": "bottom",
                  "disabled": false
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Podcast successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/script-to-video": {
      "post": {
        "summary": "Create Script to Video",
        "description": "Turns your script into a narrated video: the script is split into scenes and each one gets a visual from `mediaType`. Returns a `projectId` right away; the video is generated and rendered in the background. BYOK: needs OpenRouter and ElevenLabs (no ElevenLabs for a speaking cast); `aiModel: \"gemini_omni_flash\"` also needs Gemini.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createScriptToVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "script",
                  "voiceId",
                  "mediaType"
                ],
                "properties": {
                  "script": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10000,
                    "description": "The text the voice reads (1–10,000 characters). With `motion-graphics`, also the copy the animation is built from."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`). Still required with `characterMode: \"speaking\"`, where the characters speak with the video model's own voice and this voice is not used."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the script when omitted."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos",
                      "motion-graphics",
                      "media",
                      "gameplay"
                    ],
                    "description": "Where the visuals come from:\n- `ai-images`: one AI image per scene (`presetSettings`: `preset`, `aiModel`, `characterIds`, `useCharacterReferenceImage`).\n- `ai-videos`: one AI video clip per scene (`presetSettings`: `preset`, `quality`, `aiModel`, `isContinuous`, `characterIds`, `characterMode`, `voiceProfile`).\n- `motion-graphics`: an animated motion graphic that typesets its own copy (`presetSettings`: `quality`, `motionStyleId`, `motionGuidelines`; `media` optional as footage). No captions or stickers.\n- `media`: your own images and videos from the media library (`media` required). No `presetSettings`.\n- `gameplay`: a gameplay clip in the background (`gameplaySettings`). No `presetSettings`."
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "Visual settings for `ai-images`, `ai-videos` and `motion-graphics`; not used by `media` and `gameplay`. Each field says which media types read it.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "realistic",
                          "cinematic",
                          "anime",
                          "real-anime",
                          "retro-anime",
                          "cyberpunk-anime",
                          "ghibli-studio",
                          "pixar",
                          "cartoon",
                          "comic-book",
                          "claymation",
                          "fantasy",
                          "80s-fantasy-movie",
                          "creative",
                          "art-style",
                          "sketch-black-and-white",
                          "sketch-color",
                          "japanese-ink",
                          "ink-style",
                          "haunted-linework",
                          "neon-futuristic",
                          "pixel-art",
                          "collage",
                          "lego",
                          "technical-blueprints",
                          "stickman",
                          "nursery-rhyme",
                          "south-park",
                          "skeleton-3d",
                          "fruit-people",
                          "talking-fruit",
                          "talking-objects",
                          "talking-organs",
                          "minecraft",
                          "gta-v",
                          "free-fire",
                          "fortnite",
                          "roblox",
                          "pubg",
                          "bitlife",
                          "space-marines-40k",
                          "bombardiro-crocodilo",
                          "tralalero-tralala",
                          "demon-slayer",
                          "dragon-ball",
                          "one-piece",
                          "pokemon",
                          "naruto",
                          "attack-on-titan",
                          "final-fantasy",
                          "mecha-break",
                          "alien-stage",
                          "marvel",
                          "dc",
                          "star-wars",
                          "star-trek",
                          "harry-potter",
                          "lord-of-the-rings",
                          "game-of-thrones",
                          "doctor-who",
                          "sherlock-holmes",
                          "stranger-things",
                          "squid-game",
                          "wednesday",
                          "zelda",
                          "genshin-impact",
                          "dungeons-and-dragons",
                          "rick-and-morty",
                          "amazing-digital-circus"
                        ],
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: the visual style, or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. `motion-graphics`: picks the image model of its pictures. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "default": true,
                        "description": "`ai-videos` only: chain the clips frame to frame (each clip starts on the last frame of the one before)."
                      },
                      "characterMode": {
                        "type": "string",
                        "enum": [
                          "narrator",
                          "speaking"
                        ],
                        "default": "narrator",
                        "description": "`ai-videos` only. `narrator`: a voiceover over the visuals. `speaking`: the characters say the lines themselves with the video model's own audio (Veo 3 Fast, unless `aiModel` is another model that makes sound). `speaking` needs `mediaType: \"ai-videos\"` and the `talking-fruit`, `talking-objects` or `talking-organs` preset; any other `speaking` request answers 400. A speaking cast has no narrator, captions or stickers, so `audio`, `caption` and `addStickers` do not apply, and BYOK teams need no ElevenLabs key."
                      },
                      "voiceProfile": {
                        "type": "string",
                        "description": "Only with `characterMode: \"speaking\"`: a short description of how the characters sound."
                      },
                      "characterIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "`ai-images` / `ai-videos`: IDs of characters saved in your team's Characters library, to keep the same people across scenes."
                      },
                      "useCharacterReferenceImage": {
                        "type": "boolean",
                        "default": false,
                        "description": "`ai-images` with `characterIds` only: generate from the saved characters' reference images."
                      },
                      "motionStyleId": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "kinetic-typography",
                          "minimal-2d",
                          "modern-saas",
                          "warm-gradient",
                          "dark-premium",
                          "apple-keynote",
                          "bold-launch",
                          "chrome-y2k",
                          "brutalist-poster",
                          "clay-3d",
                          "doodle-sketch",
                          "vox-editorial",
                          "blueprint",
                          "playful-education",
                          "retro-print"
                        ],
                        "default": "auto",
                        "description": "`motion-graphics` only: the animation style. `auto` lets the director choose. Any other value answers 400."
                      },
                      "motionGuidelines": {
                        "type": "string",
                        "maxLength": 2000,
                        "description": "`motion-graphics` only: free-text direction for the animation (max 2,000 characters)."
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "`mediaType: \"gameplay\"` only: the background clip.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "IDs of images or videos in your team's media library (max 50). Required for `mediaType: \"media\"` (send at least one); optional footage for `motion-graphics`; ignored for the other media types. An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code of the narration, e.g. `en`, `es`. Detected from the script when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Ocean facts",
                "script": "Did you know the ocean produces over half of the world's oxygen?",
                "voiceId": "1",
                "mediaType": "ai-images",
                "presetSettings": {
                  "preset": "realistic"
                },
                "aspectRatio": "ratio_9_16",
                "language": "en",
                "caption": {
                  "preset": "wrap1",
                  "alignment": "bottom",
                  "disabled": false
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Script to Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/prompt-to-video": {
      "post": {
        "summary": "Create Prompt to Video",
        "description": "Writes a script from your prompt for the target duration and turns it into a narrated video, with a visual per scene from `mediaType`. Returns a `projectId` right away; the video is generated and rendered in the background. BYOK: needs OpenRouter and ElevenLabs (no ElevenLabs for a speaking cast); `aiModel: \"gemini_omni_flash\"` also needs Gemini.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createPromptToVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt",
                  "voiceId"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "What the video is about, who it is for and the tone (1–4,000 characters). The script is written from it."
                  },
                  "targetDuration": {
                    "type": "number",
                    "minimum": 10,
                    "maximum": 120,
                    "default": 60,
                    "description": "Length of the script to write, in seconds (a JSON number, 10–120). The project is priced from it."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`). Still required with `characterMode: \"speaking\"`, where the characters speak with the video model's own voice and this voice is not used."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the prompt when omitted."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos",
                      "motion-graphics",
                      "media",
                      "gameplay"
                    ],
                    "description": "Where the visuals come from:\n- `ai-images`: one AI image per scene (`presetSettings`: `preset`, `aiModel`, `characterIds`, `useCharacterReferenceImage`).\n- `ai-videos`: one AI video clip per scene (`presetSettings`: `preset`, `quality`, `aiModel`, `isContinuous`, `characterIds`, `characterMode`, `voiceProfile`).\n- `motion-graphics`: an animated motion graphic that typesets its own copy (`presetSettings`: `quality`, `motionStyleId`, `motionGuidelines`; `media` optional as footage). No captions or stickers.\n- `media`: your own images and videos from the media library (`media` required). No `presetSettings`.\n- `gameplay`: a gameplay clip in the background (`gameplaySettings`). No `presetSettings`.",
                    "default": "ai-images"
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "Visual settings for `ai-images`, `ai-videos` and `motion-graphics`; not used by `media` and `gameplay`. Each field says which media types read it.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "realistic",
                          "cinematic",
                          "anime",
                          "real-anime",
                          "retro-anime",
                          "cyberpunk-anime",
                          "ghibli-studio",
                          "pixar",
                          "cartoon",
                          "comic-book",
                          "claymation",
                          "fantasy",
                          "80s-fantasy-movie",
                          "creative",
                          "art-style",
                          "sketch-black-and-white",
                          "sketch-color",
                          "japanese-ink",
                          "ink-style",
                          "haunted-linework",
                          "neon-futuristic",
                          "pixel-art",
                          "collage",
                          "lego",
                          "technical-blueprints",
                          "stickman",
                          "nursery-rhyme",
                          "south-park",
                          "skeleton-3d",
                          "fruit-people",
                          "talking-fruit",
                          "talking-objects",
                          "talking-organs",
                          "minecraft",
                          "gta-v",
                          "free-fire",
                          "fortnite",
                          "roblox",
                          "pubg",
                          "bitlife",
                          "space-marines-40k",
                          "bombardiro-crocodilo",
                          "tralalero-tralala",
                          "demon-slayer",
                          "dragon-ball",
                          "one-piece",
                          "pokemon",
                          "naruto",
                          "attack-on-titan",
                          "final-fantasy",
                          "mecha-break",
                          "alien-stage",
                          "marvel",
                          "dc",
                          "star-wars",
                          "star-trek",
                          "harry-potter",
                          "lord-of-the-rings",
                          "game-of-thrones",
                          "doctor-who",
                          "sherlock-holmes",
                          "stranger-things",
                          "squid-game",
                          "wednesday",
                          "zelda",
                          "genshin-impact",
                          "dungeons-and-dragons",
                          "rick-and-morty",
                          "amazing-digital-circus"
                        ],
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: the visual style, or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. `motion-graphics`: picks the image model of its pictures. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "default": true,
                        "description": "`ai-videos` only: chain the clips frame to frame (each clip starts on the last frame of the one before)."
                      },
                      "characterMode": {
                        "type": "string",
                        "enum": [
                          "narrator",
                          "speaking"
                        ],
                        "default": "narrator",
                        "description": "`ai-videos` only. `narrator`: a voiceover over the visuals. `speaking`: the characters say the lines themselves with the video model's own audio (Veo 3 Fast, unless `aiModel` is another model that makes sound). `speaking` needs `mediaType: \"ai-videos\"` and the `talking-fruit`, `talking-objects` or `talking-organs` preset; any other `speaking` request answers 400. A speaking cast has no narrator, captions or stickers, so `audio`, `caption` and `addStickers` do not apply, and BYOK teams need no ElevenLabs key."
                      },
                      "voiceProfile": {
                        "type": "string",
                        "description": "Only with `characterMode: \"speaking\"`: a short description of how the characters sound."
                      },
                      "characterIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "`ai-images` / `ai-videos`: IDs of characters saved in your team's Characters library, to keep the same people across scenes."
                      },
                      "useCharacterReferenceImage": {
                        "type": "boolean",
                        "default": false,
                        "description": "`ai-images` with `characterIds` only: generate from the saved characters' reference images."
                      },
                      "motionStyleId": {
                        "type": "string",
                        "enum": [
                          "auto",
                          "kinetic-typography",
                          "minimal-2d",
                          "modern-saas",
                          "warm-gradient",
                          "dark-premium",
                          "apple-keynote",
                          "bold-launch",
                          "chrome-y2k",
                          "brutalist-poster",
                          "clay-3d",
                          "doodle-sketch",
                          "vox-editorial",
                          "blueprint",
                          "playful-education",
                          "retro-print"
                        ],
                        "default": "auto",
                        "description": "`motion-graphics` only: the animation style. `auto` lets the director choose. Any other value answers 400."
                      },
                      "motionGuidelines": {
                        "type": "string",
                        "maxLength": 2000,
                        "description": "`motion-graphics` only: free-text direction for the animation (max 2,000 characters)."
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "`mediaType: \"gameplay\"` only: the background clip.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "IDs of images or videos in your team's media library (max 50). Required for `mediaType: \"media\"` (send at least one); optional footage for `motion-graphics`; ignored for the other media types. An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code, e.g. `en`, `es`: the script is written and narrated in it. Detected from the prompt when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Coffee history",
                "prompt": "A 45-second history of coffee, from Ethiopia to modern cafes",
                "targetDuration": 45,
                "voiceId": "1",
                "mediaType": "ai-videos",
                "presetSettings": {
                  "quality": "pro",
                  "aiModel": "seedance_2_0"
                },
                "aspectRatio": "ratio_9_16",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Prompt to Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/quiz-video": {
      "post": {
        "summary": "Create Quiz Video",
        "description": "A narrated multiple-choice quiz over gameplay or generated visuals. BYOK: needs OpenRouter and ElevenLabs; the gemini_omni_flash model needs Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createQuizVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "questions",
                  "voiceId"
                ],
                "properties": {
                  "questions": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "description": "Between 2 and 10 finished questions, in the order they are played. Nothing is generated from a topic: each question is read by the voice exactly as written, so write them in the language you want them read in.",
                    "items": {
                      "type": "object",
                      "required": [
                        "question",
                        "options"
                      ],
                      "properties": {
                        "question": {
                          "type": "string",
                          "minLength": 1,
                          "description": "The question. The voice reads it and it is shown on screen."
                        },
                        "options": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 4,
                          "items": {
                            "type": "string",
                            "minLength": 1
                          },
                          "description": "2 to 4 answers; none can be empty."
                        },
                        "correctIndex": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 3,
                          "description": "Zero-based index of the correct answer in `options`; it must point inside `options`. `correct_index` is accepted too. When omitted, the first option is taken as correct.",
                          "default": 0
                        }
                      }
                    }
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "Narrator voice: a library voice ID from /v1/voice/list or one of your team's custom voices. An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Defaults to `title`."
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Quiz title, shown at the top for the whole video (max 120 characters). Also the project name when `name` is not set."
                  },
                  "answerSeconds": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 15,
                    "default": 5,
                    "description": "Seconds the options stay on screen before the reveal (1-15)."
                  },
                  "revealSeconds": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 6,
                    "default": 2,
                    "description": "Seconds the revealed answer stays on screen (0.5-6)."
                  },
                  "showOutro": {
                    "type": "boolean",
                    "default": true,
                    "description": "End with an outro card."
                  },
                  "outroText": {
                    "type": "string",
                    "maxLength": 160,
                    "description": "Text of the outro card (max 160 characters). Only with showOutro: true.",
                    "default": "Great job! Share your score in the comments!"
                  },
                  "optionsStyle": {
                    "type": "object",
                    "description": "Look of the quiz text and answer rows.",
                    "properties": {
                      "fontFamily": {
                        "type": "string",
                        "default": "font-opensans",
                        "description": "Font class for the title, question, answers and outro, e.g. `font-opensans`"
                      },
                      "optionBackgroundColor": {
                        "type": "string",
                        "default": "rgba(9, 10, 12, 0.92)",
                        "description": "Answer row background (CSS color)"
                      },
                      "optionTextColor": {
                        "type": "string",
                        "default": "#FFFFFF",
                        "description": "Answer and question text color (CSS color)"
                      },
                      "correctBackgroundColor": {
                        "type": "string",
                        "default": "#22C55E",
                        "description": "Background of the correct answer once revealed; also the color of the word being read in the question"
                      },
                      "showLetters": {
                        "type": "boolean",
                        "default": false,
                        "description": "Show A/B/C/D before each answer"
                      }
                    }
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "gameplay",
                      "ai-images",
                      "ai-videos",
                      "media"
                    ],
                    "default": "gameplay",
                    "description": "Background visuals: a gameplay clip (default), AI images, AI video clips or your own library media. `motion-graphics` is not offered for this format and answers 400."
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "mediaType `ai-images` / `ai-videos` only: the generated background. `preset` and `aiModel` apply to both; `quality` and `isContinuous` to `ai-videos` only.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: visual style preset ID, e.g. `realistic`, `cinematic`, `anime`, `pixar`, `cartoon`, `comic-book` (same list as Script to Video), or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "ai-videos only: quality tier, used when no aiModel is given."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "Model that generates the background. Use an image model (`nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`) with ai-images and a video model with ai-videos (400 otherwise). BYOK: gemini_omni_flash needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "description": "ai-videos only: chain the clips frame to frame. Default true.",
                        "default": true
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "mediaType `gameplay` only: the background clip. Games and their clips: `minecraft` (minecraft-1 … minecraft-9), `subway-s` (subway-s-1 … subway-s-11), `temple-run` (temple-run-1 … temple-run-8), `gta` (gta-1 … gta-12), `fortnite` (fortnite-1 … fortnite-5), `roblox` (roblox-1), `free-fire` (free-fire-1). A clip that does not exist plays the game's first clip. Use `custom` as selectedGame to play one of your own library videos: selectedVideo is then its media ID, and an ID that is not a video in your library answers 400.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "default": "subway-s",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "description": "The game, or `custom` for a video from your media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "subway-s-1",
                        "description": "The clip ID (e.g. `minecraft-2`), or your library video's media ID with selectedGame `custom`."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "description": "mediaType `media` only, and required there: IDs of images or videos in your team's media library (max 50). An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`.",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16"
                  },
                  "caption": {
                    "type": "object",
                    "description": "The question text on screen. The quiz draws it in its own style, so only `disabled` applies.",
                    "properties": {
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the question text (the voice still reads it)"
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Omitted fields keep their defaults.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed"
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive"
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the output sticks to the original voice"
                      }
                    }
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public https image URL of the logo (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track ID from /v1/music/list or your team's own uploaded music. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "title": "Guess the capital",
                "questions": [
                  {
                    "question": "What is the capital of Australia?",
                    "options": [
                      "Sydney",
                      "Canberra",
                      "Melbourne"
                    ],
                    "correctIndex": 1
                  },
                  {
                    "question": "What is the capital of Canada?",
                    "options": [
                      "Toronto",
                      "Vancouver",
                      "Ottawa"
                    ],
                    "correctIndex": 2
                  }
                ],
                "voiceId": "1",
                "mediaType": "gameplay",
                "gameplaySettings": {
                  "selectedGame": "subway-s",
                  "selectedVideo": "subway-s-3"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Quiz Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/reddit-story": {
      "post": {
        "summary": "Create Reddit Story",
        "description": "Describe a thread; it is written, narrated and played over the background you choose with a post card on top. BYOK: needs OpenRouter and ElevenLabs; the gemini_omni_flash model needs Gemini.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createRedditStory",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt",
                  "voiceId"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "What the post is about (1-4,000 characters), e.g. \"AITA for refusing to give my sister my wedding date?\". The model writes the post and its comments from it."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "Narrator voice: a library voice ID from /v1/voice/list or one of your team's custom voices. An unknown ID answers 400."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated when omitted."
                  },
                  "targetDuration": {
                    "type": "number",
                    "minimum": 10,
                    "maximum": 600,
                    "default": 60,
                    "description": "Length of the story, in seconds (10-600)."
                  },
                  "language": {
                    "type": "string",
                    "description": "2-letter ISO 639-1 code (e.g. `en`, `es`): the story is written and narrated in it. Detected from the prompt when omitted."
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "reddit",
                      "facebook",
                      "instagram"
                    ],
                    "default": "reddit",
                    "description": "Which platform the post is written for and which card the video opens on (`upvotes` reads as reactions on Facebook and likes on Instagram)."
                  },
                  "showCard": {
                    "type": "boolean",
                    "default": true,
                    "description": "Show the post card. `cardTheme`, `showAuthor`, `cardDurationSeconds` and `card` only apply while it is true."
                  },
                  "cardTheme": {
                    "type": "string",
                    "enum": [
                      "dark",
                      "light"
                    ],
                    "default": "dark",
                    "description": "Only with showCard: true. Card colors."
                  },
                  "showAuthor": {
                    "type": "boolean",
                    "default": true,
                    "description": "Only with showCard: true. Show the author on the card."
                  },
                  "narrationScope": {
                    "type": "string",
                    "enum": [
                      "post_and_comments",
                      "comments_only"
                    ],
                    "default": "post_and_comments",
                    "description": "`post_and_comments` reads the post and then the comments; `comments_only` reads only the comments."
                  },
                  "card": {
                    "type": "object",
                    "description": "Only with showCard: true. Your own values for the card: each field you send replaces the one the model writes; the rest stay generated.",
                    "properties": {
                      "subreddit": {
                        "type": "string",
                        "description": "Community name (Reddit card)"
                      },
                      "author": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Author or username"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "description": "Post title"
                      },
                      "upvotes": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Upvotes (reactions on Facebook, likes on Instagram)"
                      },
                      "commentCount": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Number of comments"
                      },
                      "timeAgo": {
                        "type": "string",
                        "maxLength": 40,
                        "description": "Age of the post, e.g. `2h`"
                      },
                      "shares": {
                        "type": "integer",
                        "minimum": 0,
                        "description": "Shares (Facebook card)"
                      },
                      "subtitle": {
                        "type": "string",
                        "maxLength": 80,
                        "description": "Line under the handle (Instagram card)"
                      },
                      "verified": {
                        "type": "boolean",
                        "description": "Verified badge"
                      }
                    }
                  },
                  "cardDurationSeconds": {
                    "type": "number",
                    "minimum": 1,
                    "maximum": 600,
                    "description": "Only with showCard: true. How long the card stays on screen, in seconds (1-600). When omitted, the card stays for the whole video."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "gameplay",
                      "ai-images",
                      "ai-videos",
                      "media"
                    ],
                    "default": "gameplay",
                    "description": "Background visuals: a gameplay clip (default), AI images, AI video clips or your own library media. `motion-graphics` is not offered for this format and answers 400."
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "mediaType `ai-images` / `ai-videos` only: the generated background. `preset` and `aiModel` apply to both; `quality` and `isContinuous` to `ai-videos` only.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: visual style preset ID, e.g. `realistic`, `cinematic`, `anime`, `pixar`, `cartoon`, `comic-book` (same list as Script to Video), or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "ai-videos only: quality tier, used when no aiModel is given."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "Model that generates the background. Use an image model (`nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`) with ai-images and a video model with ai-videos. BYOK: gemini_omni_flash needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "description": "ai-videos only: chain the clips frame to frame. Default true.",
                        "default": true
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "mediaType `gameplay` only: the background clip. Games and their clips: `minecraft` (minecraft-1 … minecraft-9), `subway-s` (subway-s-1 … subway-s-11), `temple-run` (temple-run-1 … temple-run-8), `gta` (gta-1 … gta-12), `fortnite` (fortnite-1 … fortnite-5), `roblox` (roblox-1), `free-fire` (free-fire-1). A clip that does not exist plays the game's first clip. Use `custom` as selectedGame to play one of your own library videos: selectedVideo is then its media ID, and an ID that is not a video in your library answers 400.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "default": "subway-s",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "description": "The game, or `custom` for a video from your media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "subway-s-1",
                        "description": "The clip ID (e.g. `minecraft-2`), or your library video's media ID with selectedGame `custom`."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "description": "mediaType `media` only, and required there: IDs of images or videos in your team's media library (max 50). An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`). A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`.",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    }
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16"
                  },
                  "caption": {
                    "type": "object",
                    "description": "Captions of the narration.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Omitted fields keep their defaults.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed"
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive"
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the output sticks to the original voice"
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public https image URL of the logo (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track ID from /v1/music/list or your team's own uploaded music. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "prompt": "AITA for refusing to lend my car to my brother after he crashed the last one?",
                "voiceId": "1",
                "targetDuration": 60,
                "cardTheme": "dark",
                "mediaType": "gameplay",
                "gameplaySettings": {
                  "selectedGame": "minecraft",
                  "selectedVideo": "minecraft-2"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Reddit Story successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/remove-background": {
      "post": {
        "summary": "Remove Video Background",
        "description": "Removes the background behind the person in one of your library videos and renders the result. Videos up to 10 minutes; longer than 60 s are processed in parts and joined. Captions are opt-in. The rendered MP4 has no alpha channel: the cut-out is kept in the project for the editor. BYOK: needs the OpenRouter and Bria keys.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "removeBackground",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media"
                ],
                "properties": {
                  "media": {
                    "type": "string",
                    "description": "ID of a video in your team's library (add one with POST /v1/media/upload or POST /v1/media/import), at most 10 minutes long (longer answers 400). An unknown ID or another team's media answers `400 media: Video not found`; an image answers `400 media: Media must be a video file`. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated when omitted."
                  },
                  "videoSettings": {
                    "type": "object",
                    "description": "Output settings",
                    "properties": {
                      "aspectRatio": {
                        "type": "string",
                        "enum": [
                          "ratio_9_16",
                          "ratio_16_9",
                          "ratio_1_1"
                        ],
                        "description": "Output format. Default: the source video's (9:16 when unknown)."
                      },
                      "caption": {
                        "type": "object",
                        "description": "Burned-in captions, off without this object: sending a caption object turns them on (its `disabled` defaults to false). preset, alignment and videoSettings.language apply only then.",
                        "properties": {
                          "preset": {
                            "type": "string",
                            "enum": [
                              "default",
                              "beast",
                              "umi",
                              "tiktok",
                              "wrap1",
                              "wrap2",
                              "ariel",
                              "hooked",
                              "classic",
                              "active",
                              "bubble",
                              "glass",
                              "comic",
                              "glow",
                              "pastel",
                              "neon",
                              "retroTV",
                              "red",
                              "marker",
                              "modern",
                              "blue",
                              "vivid"
                            ],
                            "default": "classic",
                            "description": "Caption style. Any other value answers 400."
                          },
                          "alignment": {
                            "type": "string",
                            "enum": [
                              "top",
                              "middle",
                              "bottom"
                            ],
                            "default": "bottom",
                            "description": "Caption position"
                          },
                          "disabled": {
                            "type": "boolean",
                            "default": false,
                            "description": "true keeps captions off even with a caption object"
                          }
                        }
                      },
                      "language": {
                        "type": "string",
                        "description": "With captions on only: the language spoken in the video. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                      },
                      "content": {
                        "type": "object",
                        "description": "Branding.",
                        "properties": {
                          "brandingLogo": {
                            "type": "object",
                            "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                            "properties": {
                              "enabled": {
                                "type": "boolean",
                                "default": false
                              },
                              "url": {
                                "type": "string",
                                "description": "Logo image URL (PNG with transparency works best)"
                              },
                              "position": {
                                "type": "string",
                                "enum": [
                                  "top-left",
                                  "top-right",
                                  "bottom-left",
                                  "bottom-right"
                                ],
                                "default": "bottom-right"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 20,
                                "maximum": 200,
                                "default": 100,
                                "description": "Logo size (20-200)"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "media": "clxmedia0001",
                "name": "Clean cut-out",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Remove Background project successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/scenes": {
      "post": {
        "summary": "Create Scenes Video",
        "description": "A video assembled scene by scene: talking avatars, picture in picture, your own clips and AI clips between two frames. The project is created `processing`; when it reaches `completed` its render starts on its own. BYOK: needs OpenRouter; narrated video and start_end_frame scenes (with a script) need ElevenLabs; avatar and picture_in_picture scenes need Gemini; picture_in_picture also needs Bria.\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createScenes",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "scenes"
                ],
                "properties": {
                  "scenes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "required": [
                        "type"
                      ],
                      "description": "avatar: avatarId + script (the avatar speaks with its own voice, no voiceId). picture_in_picture: avatarId + mediaId + script. video: mediaId; with a script it is narrated and voiceId is required. start_end_frame: startFrameMediaId + framePrompt + frameDuration + frameModel (endFrameMediaId optional); with a script, voiceId is required and the voice sets the scene's length. `voiceoverId`, `voiceoverUrl` and `frameNegativePrompt` are not supported and answer `400 scenes.<i>.<field>: not supported`.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "avatar",
                            "video",
                            "picture_in_picture",
                            "start_end_frame"
                          ],
                          "description": "What the scene is. See the scene description for the fields each type needs."
                        },
                        "script": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "What is said in the scene (max 5,000 characters). Required for avatar and picture_in_picture (the avatar says it). Optional for video and start_end_frame: with a script the scene is narrated by `voiceId`, and a start_end_frame clip then lasts as long as the narration."
                        },
                        "avatarId": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "Avatar ID from /v1/avatar/list. Required for avatar and picture_in_picture. It is not checked when the project is created: an unknown ID makes that scene fail while the project processes."
                        },
                        "voiceId": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "Voice ID from /v1/voice/list. Only for video and start_end_frame scenes: required when the scene has a script, and send it only together with a script (a video scene with a voiceId and no script answers 400). Avatar and picture_in_picture scenes speak with the avatar's own voice and do not use it."
                        },
                        "mediaId": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "ID of an image or video in your team's library. Required for video (the clip itself: a video plays at its own length, an image for 5 seconds) and picture_in_picture (the file the avatar is shown over)."
                        },
                        "startFrameMediaId": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "start_end_frame only, required: the library image the clip starts from."
                        },
                        "endFrameMediaId": {
                          "type": "string",
                          "maxLength": 30,
                          "description": "start_end_frame only, optional: the library image the clip ends on."
                        },
                        "frameModel": {
                          "type": "string",
                          "enum": [
                            "veo_3_1",
                            "seedance_2_0",
                            "kling_3_0"
                          ],
                          "description": "start_end_frame only, required: the video model. `veo_3_1` generates with Veo 3.1 Fast. The retired values `kling_2_5` and `seedance_1_5` answer 400."
                        },
                        "framePrompt": {
                          "type": "string",
                          "maxLength": 2000,
                          "description": "start_end_frame only, required: what happens in the clip (max 2,000 characters)."
                        },
                        "frameDuration": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 300,
                          "description": "start_end_frame only, required: length of the clip in seconds (1-300). With a narration, the narration's length is used instead (for the clip and its price)."
                        },
                        "voiceSettings": {
                          "type": "object",
                          "description": "Narrated video / start_end_frame scenes only: the narrator's voice settings. All three fields are required when you send it; without it the top-level `audio` settings are used, or the defaults shown.",
                          "properties": {
                            "speed": {
                              "type": "number",
                              "minimum": 0.7,
                              "maximum": 1.2,
                              "default": 1.0
                            },
                            "stability": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1,
                              "default": 0.5
                            },
                            "similarityBoost": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1,
                              "default": 0.75
                            }
                          },
                          "required": [
                            "speed",
                            "stability",
                            "similarityBoost"
                          ]
                        }
                      }
                    },
                    "description": "The scenes, 1-50, played in the order they are listed. Every media and frame ID must be a file of your team's library (`400 scenes.<i>.<field>: Media \"<id>\" not found.` otherwise). A media that is not `COMPLETED` yet answers `400 scenes.<i>.<field>: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the scripts when omitted."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16"
                  },
                  "language": {
                    "type": "string",
                    "description": "Language of the scripts as a 2-letter ISO 639-1 code (`en`, `es`, ...), used to transcribe the speech for the captions. Detected from the scripts when omitted."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "modern",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true hides the captions"
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Voice settings for every narrated video / start_end_frame scene that does not send its own `voiceSettings`. All three fields are required when you send it.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Narration speed (0.7-1.2)"
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Voice stability (0-1)"
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "Similarity to the original voice (0-1)"
                      }
                    },
                    "required": [
                      "speed",
                      "stability",
                      "similarityBoost"
                    ]
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list or your own music. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Product tutorial",
                "scenes": [
                  {
                    "type": "avatar",
                    "avatarId": "1",
                    "script": "Welcome! Let me show you how it works."
                  },
                  {
                    "type": "video",
                    "mediaId": "clxmedia0001"
                  },
                  {
                    "type": "start_end_frame",
                    "startFrameMediaId": "clxmedia0002",
                    "endFrameMediaId": "clxmedia0003",
                    "frameModel": "veo_3_1",
                    "framePrompt": "Smooth camera zoom out revealing the full scene",
                    "frameDuration": 5
                  },
                  {
                    "type": "picture_in_picture",
                    "avatarId": "1",
                    "mediaId": "clxmedia0004",
                    "script": "And this is where the magic happens."
                  }
                ],
                "aspectRatio": "ratio_9_16",
                "caption": {
                  "preset": "modern",
                  "alignment": "bottom",
                  "disabled": false
                },
                "language": "en",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created with `status: processing`. Poll GET /v1/project/{projectId} or wait for the webhook: when the project is `completed` its render starts on its own.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Scenes project successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/add-captions": {
      "post": {
        "summary": "Add Captions to Video",
        "description": "Transcribes one of your library videos and renders it again with captions burned in (on by default). The output keeps the source video's aspect ratio. BYOK: needs the OpenRouter key (transcription).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "addCaptions",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media"
                ],
                "properties": {
                  "media": {
                    "type": "string",
                    "description": "ID of a video in your team's library (add one with POST /v1/media/upload or POST /v1/media/import). The output keeps its aspect ratio. An unknown ID or another team's media answers `400 Media not found`; an image answers `400 Media is not a video`. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated when omitted."
                  },
                  "language": {
                    "type": "string",
                    "default": "en",
                    "description": "Language spoken in the video, used to transcribe it. 2-letter ISO 639-1 code, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "classic",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position"
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "true renders the video without captions (it is still transcribed and charged)"
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list, or one of your team's own uploaded tracks. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "media": "clxmedia0001",
                "language": "en",
                "caption": {
                  "preset": "classic",
                  "alignment": "bottom"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Caption Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/extend-video": {
      "post": {
        "summary": "Extend Video",
        "description": "Continues one of your library videos from its last frame with an AI video model, following your prompt. Longer extensions are made of several clips, each starting from the last frame of the previous one, and are joined to the source video. The output keeps the source's aspect ratio. BYOK: needs the OpenRouter key.\n\n`prompt`, `targetDuration`, `model`, `resolution` and `generateAudio` go at the top level of the body; validation errors name them under `extendVideoSettings` (e.g. `extendVideoSettings.prompt: Required`).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "extendVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "media",
                  "prompt"
                ],
                "properties": {
                  "media": {
                    "type": "string",
                    "description": "ID of a video in your team's library (add one with POST /v1/media/upload or POST /v1/media/import). The output keeps its aspect ratio. An unknown ID or another team's media answers `400 Media not found`; an image answers `400 Media is not a video`. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000,
                    "description": "What happens next in the video"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the prompt when omitted."
                  },
                  "targetDuration": {
                    "type": "number",
                    "minimum": 4,
                    "maximum": 60,
                    "default": 4,
                    "description": "Seconds to add. Rounded to the nearest multiple of 4, then split into clips of the lengths the model makes (Veo: 4, 6 or 8 s; Kling and Seedance: 5 or 10 s; Wan: 5, 10 or 15 s; Grok: 4, 6, 8, 10 or 15 s). A remainder shorter than the model's shortest clip takes that clip, so the extension (and the charge) can be a few seconds longer than asked."
                  },
                  "resolution": {
                    "type": "string",
                    "enum": [
                      "720p",
                      "1080p"
                    ],
                    "default": "1080p",
                    "description": "Output resolution. A model that does not make the one asked for runs at its own default (720p for Seedance 2.0 Fast and Mini). The price follows the resolution it runs at."
                  },
                  "generateAudio": {
                    "type": "boolean",
                    "default": false,
                    "description": "Generate a soundtrack for the new footage. Ignored by models without audio (`wan_2_7_i2v`)."
                  },
                  "model": {
                    "type": "string",
                    "enum": [
                      "veo_3_fast",
                      "veo_3",
                      "grok_imagine_video",
                      "grok_imagine_video_lite",
                      "kling_3_0",
                      "kling_3_0_pro",
                      "seedance_2_0",
                      "seedance_2_5",
                      "wan_2_7_i2v",
                      "seedance_2_0_fast",
                      "veo_3_1_lite",
                      "seedance_2_0_mini"
                    ],
                    "default": "veo_3_fast",
                    "description": "The video model that continues the clip. Default: Veo 3.1 Fast. `veo_3` = Veo 3.1 Standard, `veo_3_1_lite` = Veo 3.1 Lite, `kling_3_0` = Kling 3.0 Standard, `kling_3_0_pro` = Kling 3.0 Pro, `seedance_2_0` / `seedance_2_0_fast` / `seedance_2_0_mini` = Seedance 2.0 (Fast and Mini run at 720p at most), `grok_imagine_video` = Grok Imagine, `wan_2_7_i2v` = Wan (no audio). Any other value answers `400 extendVideoSettings.model: \"<value>\" cannot extend a video`."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "media": "clxmedia0001",
                "prompt": "The camera keeps following the runner as the sun sets",
                "targetDuration": 8,
                "resolution": "1080p",
                "generateAudio": false,
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Extend Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/tiktok-slideshow": {
      "post": {
        "summary": "Create TikTok Slideshow",
        "description": "A slideshow of your library images or videos with text boxes, optionally narrated by an avatar (`avatarId` + `script`) keyed in the bottom-right corner. Without an avatar the project completes in seconds; with one, when its clips are done. Either way it is rendered automatically and the `webhook` receives the MP4: there is no need to call Render. BYOK: needs OpenRouter; with an avatar also Gemini and Bria (no ElevenLabs key: no voice is synthesized).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createTikTokSlideshow",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "slides"
                ],
                "properties": {
                  "slides": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "required": [
                        "media"
                      ],
                      "properties": {
                        "media": {
                          "type": "string",
                          "description": "ID of an image or video in your team's library. An unknown ID, or media of another team, answers `400 Media not found: <id>`."
                        },
                        "texts": {
                          "type": "array",
                          "maxItems": 10,
                          "items": {
                            "type": "object",
                            "required": [
                              "text"
                            ],
                            "description": "A text box, in pixels of the output canvas (9:16 = 1080×1920, 16:9 = 1280×720, 1:1 = 1080×1080). The box must fit: x + width ≤ canvas width and y + height ≤ canvas height, or the request answers `400 slides.<i>.texts.<j>: The text box must fit the 1080x1920 canvas (...)`. Always send x, y, width and height: a box without them gets the editor's default placement, which is not meant to be relied on. Only the box, its words and fontSize are used: the font, colors and the rest of the look come from the slideshow template.",
                            "properties": {
                              "text": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500,
                                "description": "The words in the box"
                              },
                              "x": {
                                "type": "number",
                                "minimum": 0,
                                "description": "Left edge of the box, in canvas pixels"
                              },
                              "y": {
                                "type": "number",
                                "minimum": 0,
                                "description": "Top edge of the box, in canvas pixels"
                              },
                              "width": {
                                "type": "number",
                                "minimum": 40,
                                "description": "Box width in canvas pixels (under 40 answers 400)"
                              },
                              "height": {
                                "type": "number",
                                "minimum": 40,
                                "description": "Box height in canvas pixels (under 40 answers 400)"
                              },
                              "fontSize": {
                                "type": "number",
                                "minimum": 32,
                                "maximum": 800,
                                "default": 64,
                                "description": "Font size in canvas pixels (below 32 or above 800 answers 400)"
                              }
                            }
                          }
                        },
                        "duration": {
                          "type": "number",
                          "minimum": 0.1,
                          "maximum": 60,
                          "default": 3,
                          "description": "Seconds the slide stays on screen. With an avatar the narration sets the video's length and the durations become relative weights between slides."
                        }
                      }
                    },
                    "description": "The slides, in playback order"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the slide texts when omitted."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Output format. Also sets the canvas the text boxes are measured against."
                  },
                  "script": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "What the avatar says (max 10,000 characters). Requires avatarId."
                  },
                  "avatarId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "An avatar from /v1/avatar/list that narrates the script with its own voice, keyed out of its background in the bottom-right corner over the slides. Requires script. An unknown ID answers 400."
                  },
                  "language": {
                    "type": "string",
                    "description": "With an avatar only: the language it speaks, as a 2-letter ISO 639-1 code (`en`, `es`, ...). Detected from the slide texts when omitted."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Logo image URL (PNG with transparency works best)"
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)"
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list, or one of your team's own uploaded tracks. An unknown ID answers 400."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "5 morning habits",
                "aspectRatio": "ratio_9_16",
                "slides": [
                  {
                    "media": "clxmedia0001",
                    "duration": 3,
                    "texts": [
                      {
                        "text": "5 habits that changed my mornings",
                        "x": 90,
                        "y": 760,
                        "width": 900,
                        "height": 300,
                        "fontSize": 80
                      }
                    ]
                  },
                  {
                    "media": "clxmedia0002",
                    "duration": 3,
                    "texts": [
                      {
                        "text": "1. No phone for the first hour",
                        "x": 90,
                        "y": 860,
                        "width": 900,
                        "height": 200,
                        "fontSize": 64
                      }
                    ]
                  }
                ],
                "musicId": "1",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProjectCreateResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "description": "Same as data.projectId"
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "TikTok Slideshow successfully created",
                  "projectId": "clx9p2k4m0001abcd1234efgh"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/scrolling-video": {
      "post": {
        "summary": "Create Scrolling Video",
        "description": "Records a website scrolling, without avatar or voiceover, with optional background music (`musicId`).\n\nCreate endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createScrollingVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "scrollingVideoSettings"
                ],
                "properties": {
                  "scrollingVideoSettings": {
                    "type": "object",
                    "required": [
                      "websiteUrl"
                    ],
                    "description": "What to record and how it scrolls.",
                    "properties": {
                      "websiteUrl": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 500,
                        "description": "The page to record: a full URL (max 500 characters)."
                      },
                      "scrollInterval": {
                        "type": "number",
                        "minimum": 1,
                        "maximum": 10,
                        "default": 3,
                        "description": "Seconds paused between scrolls (1-10). Not used with scrollMode `fixed`."
                      },
                      "scrollDuration": {
                        "type": "number",
                        "minimum": 500,
                        "maximum": 5000,
                        "default": 1500,
                        "description": "Milliseconds each scroll takes (500-5000). Not used with scrollMode `fixed`."
                      },
                      "scrollMode": {
                        "type": "string",
                        "enum": [
                          "restart",
                          "loop",
                          "once",
                          "fixed"
                        ],
                        "default": "restart",
                        "description": "`restart`: scroll down and jump back to the top at the bottom. `loop`: scroll down, then up, then down again. `once`: scroll down and stay at the bottom. `fixed`: no scrolling, the first screen is held for the whole video."
                      },
                      "targetDuration": {
                        "type": "number",
                        "minimum": 5,
                        "maximum": 120,
                        "default": 30,
                        "description": "Length of the video, in seconds (5-120). It also sets the price."
                      }
                    }
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the URL when omitted."
                  },
                  "videoSettings": {
                    "type": "object",
                    "description": "Output settings. A flat top-level `aspectRatio` is still accepted; this one wins. No voice or captions are added; background music comes from `musicId`.",
                    "properties": {
                      "aspectRatio": {
                        "type": "string",
                        "enum": [
                          "ratio_9_16",
                          "ratio_16_9",
                          "ratio_1_1"
                        ],
                        "default": "ratio_9_16",
                        "description": "Size of the recording"
                      },
                      "content": {
                        "type": "object",
                        "description": "Branding.",
                        "properties": {
                          "brandingLogo": {
                            "type": "object",
                            "description": "Your logo over the video. Drawn only with `enabled: true` and a `url`.",
                            "properties": {
                              "enabled": {
                                "type": "boolean",
                                "default": false
                              },
                              "url": {
                                "type": "string",
                                "description": "Public https image URL of the logo (PNG with transparency works best)"
                              },
                              "position": {
                                "type": "string",
                                "enum": [
                                  "top-left",
                                  "top-right",
                                  "bottom-left",
                                  "bottom-right"
                                ],
                                "default": "bottom-right"
                              },
                              "size": {
                                "type": "number",
                                "minimum": 20,
                                "maximum": 200,
                                "default": 100,
                                "description": "Logo size (20-200)"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music ID from /v1/music/list, played under the whole recording. An unknown ID answers 400. Omit it for a silent video."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "name": "Landing page tour",
                "scrollingVideoSettings": {
                  "websiteUrl": "https://yoursite.com",
                  "scrollMode": "once",
                  "targetDuration": 20
                },
                "videoSettings": {
                  "aspectRatio": "ratio_9_16"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Scrolling Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/{projectId}": {
      "get": {
        "summary": "Get Project",
        "description": "Where a project stands. Every create endpoint answers a `projectId`; poll this until `video.status` is `COMPLETED`, or the project or its video is `failed`/`FAILED`. `video` is the latest render, or `null` until the render starts. A project appears in GET /v1/video/list only once its render starts.",
        "operationId": "getProject",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `projectId` a create endpoint answered.",
            "example": "cm4x9k2p10001ab12cd34ef56"
          }
        ],
        "responses": {
          "200": {
            "description": "The project",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Project"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Project fetched successfully",
                  "data": {
                    "id": "cm4x9k2p10001ab12cd34ef56",
                    "name": "Serum ad",
                    "type": "ugc_ads",
                    "status": "completed",
                    "source": "api",
                    "progress": 100,
                    "message": "Video completed",
                    "usedCredits": 40,
                    "metadata": {
                      "campaignId": "campaign_42"
                    },
                    "createdAt": "2026-10-01T10:00:00.000Z",
                    "updatedAt": "2026-10-01T10:06:00.000Z",
                    "video": {
                      "id": "cm4x9n7q20003ab12xy98zt10",
                      "name": "Serum ad",
                      "projectId": "cm4x9k2p10001ab12cd34ef56",
                      "projectType": "ugc_ads",
                      "status": "COMPLETED",
                      "progress": 100,
                      "message": "Video ready",
                      "url": "https://files.hooked.so/team/videos/cm4x9n7q20003ab12xy98zt10.mp4?X-Amz-Signature=...",
                      "thumbnail": "https://files.hooked.so/team/thumbnails/cm4x9n7q20003ab12xy98zt10.jpg?X-Amz-Signature=...",
                      "durationInFrames": 750,
                      "durationInSeconds": 30,
                      "size": 15728640,
                      "createdAt": "2026-10-01T10:05:00.000Z",
                      "updatedAt": "2026-10-01T10:06:00.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not found. Another team's resource answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Delete Project",
        "description": "Deletes a project for good. **This cannot be undone.** Its videos go with it: their rows, files and thumbnails, and any post already recorded for them; the storage they used is freed. Images and videos of your media library that the project used stay in the library. Refused with 409 while the project is generating (`processing`), while one of its videos is rendering, or while one of its videos has a pending scheduled post (cancel those first with DELETE /v1/schedule/{scheduleId}). Credits the project used are not refunded.",
        "operationId": "deleteProject",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `projectId` a create endpoint answered.",
            "example": "cm4x9k2p10001ab12cd34ef56"
          }
        ],
        "responses": {
          "200": {
            "description": "Project deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "projectId",
                        "deleted"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "description": "The project that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        },
                        "deletedVideoIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "The videos deleted with it (they now answer 404)."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Project deleted",
                  "data": {
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "deleted": true,
                    "deletedVideoIds": [
                      "cm4x9n7q20003ab12xy98zt10"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such project, including one already deleted. Another team's project, or an id that is not one, answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "409": {
            "description": "The project cannot be deleted yet; nothing was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict409"
                },
                "examples": {
                  "processing": {
                    "value": {
                      "success": false,
                      "message": "Project is still processing"
                    }
                  },
                  "rendering": {
                    "value": {
                      "success": false,
                      "message": "A video of this project is still rendering"
                    }
                  },
                  "scheduled": {
                    "value": {
                      "success": false,
                      "message": "A video of this project has a pending scheduled post. Cancel it first with DELETE /v1/schedule/{scheduleId}",
                      "data": {
                        "scheduleIds": [
                          "clxsched0001"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/render": {
      "post": {
        "summary": "Render Project",
        "description": "Renders one of your projects again from its editor timeline, at the aspect ratio set in the editor. Projects render on their own when generation finishes; use this after editing a project or after a failed render. Free: renders never cost credits. Each call creates a new video: poll GET /v1/video/{videoId} or pass a webhook.",
        "operationId": "renderProject",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "projectId"
                ],
                "properties": {
                  "projectId": {
                    "type": "string",
                    "description": "A project of your team (the `projectId` a create endpoint answered). It must have finished generating.",
                    "example": "cm4x9k2p10001ab12cd34ef56"
                  },
                  "webhook": {
                    "type": "string",
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when this render completes or fails. The project's original webhook is not reused: pass it again to be called for this render. Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  }
                }
              },
              "example": {
                "projectId": "cm4x9k2p10001ab12cd34ef56",
                "webhook": "https://example.com/hooked/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Render started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "videoId": {
                          "type": "string",
                          "description": "The new video. Follow it with GET /v1/video/{videoId}; the webhook carries the same ID."
                        },
                        "projectId": {
                          "type": "string",
                          "description": "The project you rendered."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "STARTED"
                          ],
                          "description": "Always `STARTED`: the render runs in the background."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "videoId": "cm4xa1b2c0007ab12mn34op56",
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "status": "STARTED"
                  },
                  "message": "Render started successfully"
                }
              }
            }
          },
          "400": {
            "description": "`Missing projectId`, `Invalid JSON body`, `webhook: Must be a valid HTTPS URL`, `There is nothing on the timeline to render yet` (the project has not finished generating), or `Subscription not found` (the team has no billing record)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "There is nothing on the timeline to render yet"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The team does not have the product, or the timeline uses files of another team",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EntitlementRequired403"
                    },
                    {
                      "$ref": "#/components/schemas/ValidationError400"
                    }
                  ]
                },
                "example": {
                  "success": false,
                  "message": "The project uses files that do not belong to this team"
                }
              }
            }
          },
          "404": {
            "description": "Not found. Another team's resource answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "The render could not start",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "API Render Error in renderMedia"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/video/{videoId}": {
      "get": {
        "summary": "Get Video Details",
        "description": "One rendered video of your team: its status, progress and, once `COMPLETED`, a signed download link. If you only have a `projectId`, use GET /v1/project/{projectId}, which returns the same object under `video`.",
        "operationId": "getVideoDetails",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The video ID: `data.video.id` from GET /v1/project/{projectId}, an item of GET /v1/video/list, `data.videoId` from POST /v1/render, or `data.videoId` in a webhook payload.",
            "example": "cm4x9n7q20003ab12xy98zt10"
          }
        ],
        "responses": {
          "200": {
            "description": "Video",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Video"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Video details fetched successfully",
                  "data": {
                    "id": "cm4x9n7q20003ab12xy98zt10",
                    "name": "Serum ad",
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "projectType": "ugc_ads",
                    "status": "COMPLETED",
                    "progress": 100,
                    "message": "Video ready",
                    "url": "https://files.hooked.so/team/videos/cm4x9n7q20003ab12xy98zt10.mp4?X-Amz-Signature=...",
                    "thumbnail": "https://files.hooked.so/team/thumbnails/cm4x9n7q20003ab12xy98zt10.jpg?X-Amz-Signature=...",
                    "durationInFrames": 750,
                    "durationInSeconds": 30,
                    "size": 15728640,
                    "createdAt": "2026-10-01T10:05:00.000Z",
                    "updatedAt": "2026-10-01T10:06:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not found. Another team's resource answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Video not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Delete Video",
        "description": "Deletes a rendered video for good. **This cannot be undone.** The video row, its file and thumbnail and any post already recorded for it are removed, and the storage it used is freed. Its project stays: render it again with POST /v1/render. Refused with 409 while the video is rendering (`STARTED`) or while it has a pending scheduled post (cancel it first with DELETE /v1/schedule/{scheduleId}).",
        "operationId": "deleteVideo",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "videoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The video ID: `data.video.id` from GET /v1/project/{projectId}, an item of GET /v1/video/list, `data.videoId` from POST /v1/render, or `data.videoId` in a webhook payload.",
            "example": "cm4x9n7q20003ab12xy98zt10"
          }
        ],
        "responses": {
          "200": {
            "description": "Video deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "videoId",
                        "deleted"
                      ],
                      "properties": {
                        "videoId": {
                          "type": "string",
                          "description": "The video that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Video deleted",
                  "data": {
                    "videoId": "cm4x9n7q20003ab12xy98zt10",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such video, including one already deleted. Another team's video, or an id that is not one, answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Video not found"
                }
              }
            }
          },
          "409": {
            "description": "The video cannot be deleted yet; nothing was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict409"
                },
                "examples": {
                  "rendering": {
                    "value": {
                      "success": false,
                      "message": "Video is still rendering"
                    }
                  },
                  "scheduled": {
                    "value": {
                      "success": false,
                      "message": "Video has a pending scheduled post. Cancel it first with DELETE /v1/schedule/{scheduleId}",
                      "data": {
                        "scheduleIds": [
                          "clxsched0001"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/video/list": {
      "get": {
        "summary": "List Videos",
        "description": "Your team's rendered videos, newest first, with the total count for paging. A project is listed only once its render starts; use GET /v1/project/{projectId} before that. Template renders are left out.",
        "operationId": "listVideos",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only videos of this project type, or `all`. Any other value answers 400. API formats: `script_to_video`, `prompt_to_video`, `ugc_ads`, `ugc_video` (Talking Avatar), `hook_demo`, `scenes`, `tiktok_slideshow`, `caption_video` (Add Captions), `extend_video`, `remove_background`, `podcast_interview`, `quiz_video`, `reddit_story`, `scrolling_video`. Dashboard-only formats: `cinematic`, `article_to_video`, `pdf_to_video`, `pdf_to_brainrot`, `music_to_video`, `clone_video`.",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "ugc_video",
                "ugc_ads",
                "hook_demo",
                "script_to_video",
                "prompt_to_video",
                "tiktok_slideshow",
                "podcast_interview",
                "scenes",
                "cinematic",
                "caption_video",
                "remove_background",
                "extend_video",
                "scrolling_video",
                "music_to_video",
                "article_to_video",
                "pdf_to_video",
                "pdf_to_brainrot",
                "reddit_story",
                "quiz_video",
                "clone_video"
              ],
              "default": "all"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only videos in this state: `STARTED` (rendering), `COMPLETED` or `FAILED`. Case-insensitive; `processing` is read as `STARTED`. Any other value answers 400.",
            "schema": {
              "type": "string",
              "enum": [
                "STARTED",
                "COMPLETED",
                "FAILED"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Videos to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Videos",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "videos": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Video"
                          },
                          "description": "The videos on this page."
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many videos match the filters, across all pages."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size used."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset used."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Videos fetched successfully",
                  "data": {
                    "videos": [
                      {
                        "id": "cm4x9n7q20003ab12xy98zt10",
                        "name": "Serum ad",
                        "projectId": "cm4x9k2p10001ab12cd34ef56",
                        "projectType": "ugc_ads",
                        "status": "COMPLETED",
                        "progress": 100,
                        "message": "Video ready",
                        "url": "https://files.hooked.so/team/videos/cm4x9n7q20003ab12xy98zt10.mp4?X-Amz-Signature=...",
                        "thumbnail": "https://files.hooked.so/team/thumbnails/cm4x9n7q20003ab12xy98zt10.jpg?X-Amz-Signature=...",
                        "durationInFrames": 750,
                        "durationInSeconds": 30,
                        "size": 15728640,
                        "createdAt": "2026-10-01T10:05:00.000Z",
                        "updatedAt": "2026-10-01T10:06:00.000Z"
                      }
                    ],
                    "total": 37,
                    "limit": 20,
                    "offset": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown `type` or `status`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "status: Must be one of STARTED, COMPLETED, FAILED"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to fetch videos"
                }
              }
            }
          }
        }
      }
    },
    "/v1/social/account/list": {
      "get": {
        "summary": "List Accounts",
        "description": "The TikTok and YouTube accounts your team has analyzed, newest first. Free.",
        "operationId": "listSocialAccounts",
        "tags": [
          "Account Analysis"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Filter by platform (case-insensitive). Any other value is ignored and all platforms are returned.",
            "schema": {
              "type": "string",
              "enum": [
                "tiktok",
                "youtube"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1-100). Invalid values fall back to the default.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip. Invalid values fall back to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Accounts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "accounts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SocialAccount"
                          },
                          "description": "One page of accounts"
                        },
                        "total": {
                          "type": "integer",
                          "description": "Accounts that match the filter (all pages). You are done when `offset + limit >= total`."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "Page size used"
                        },
                        "offset": {
                          "type": "integer",
                          "description": "Offset used"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/social/account/analyze": {
      "post": {
        "summary": "Analyze Account",
        "description": "Scrapes a public TikTok or YouTube account (profile and recent videos) and saves its analysis to your team. Waits for the scrape to finish. Costs 8 credits, charged to BYOK teams too (platform cost) and refunded if the scrape fails, including when the account does not exist. Analyzing an account again updates the saved one (same `id`) and charges again. Not idempotent.",
        "operationId": "analyzeSocialAccount",
        "tags": [
          "Account Analysis"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "username",
                  "platform"
                ],
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "The account handle. A leading `@` is removed and the value is lowercased."
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "tiktok",
                      "youtube"
                    ],
                    "description": "The platform the handle belongs to"
                  }
                }
              },
              "example": {
                "username": "@hookedapp",
                "platform": "tiktok"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Account analyzed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "`Account analyzed successfully`"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "account": {
                          "$ref": "#/components/schemas/SocialAccount"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`username` or `platform` invalid (`Invalid input`, per-field `details`). A body that is not JSON answers `{ \"success\": false, \"message\": \"Invalid JSON body\" }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "code": "bad_request",
                  "message": "Invalid input",
                  "errorCode": "INVALID_INPUT",
                  "details": {
                    "platform": [
                      "platform must be 'tiktok' or 'youtube'"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "The scrape failed, including an account that does not exist (`error` says why). The credits are refunded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to analyze account",
                  "error": "Failed to fetch TikTok data for @fitnessguru: Error: No TikTok data found for @fitnessguru"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/social/account/{accountId}": {
      "get": {
        "summary": "Account Details",
        "description": "The full saved analysis of one account: profile, stats, analytics, all saved hashtags and keywords, music, audience, best posting times and its 20 best videos by viral score. Reads saved data; free.",
        "operationId": "getSocialAccount",
        "tags": [
          "Account Analysis"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id, from /v1/social/account/list or /v1/social/account/analyze"
          }
        ],
        "responses": {
          "200": {
            "description": "Account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/SocialAccount"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "analytics": {
                              "type": "object",
                              "properties": {
                                "engagementRate": {
                                  "type": "number"
                                },
                                "viralityScore": {
                                  "type": "number"
                                },
                                "avgViews": {
                                  "type": "number"
                                },
                                "shareRate": {
                                  "type": "number"
                                },
                                "saveRate": {
                                  "type": "number"
                                }
                              }
                            },
                            "topHashtags": {
                              "type": "array",
                              "description": "All saved hashtags",
                              "items": {
                                "$ref": "#/components/schemas/SocialAccountHashtag"
                              }
                            },
                            "keywords": {
                              "type": "array",
                              "description": "All saved keywords",
                              "items": {
                                "$ref": "#/components/schemas/SocialAccountKeyword"
                              }
                            },
                            "topMusic": {
                              "type": "array",
                              "description": "Sounds used",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string"
                                  },
                                  "artist": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "count": {
                                    "type": "integer"
                                  },
                                  "videoCount": {
                                    "type": "integer"
                                  },
                                  "totalViews": {
                                    "type": "number"
                                  },
                                  "avgViews": {
                                    "type": "number"
                                  },
                                  "duration": {
                                    "type": "integer",
                                    "nullable": true,
                                    "description": "Seconds"
                                  },
                                  "genre": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "isOriginal": {
                                    "type": "boolean"
                                  },
                                  "lastUsed": {
                                    "type": "string",
                                    "format": "date-time",
                                    "nullable": true
                                  }
                                }
                              }
                            },
                            "audience": {
                              "type": "object",
                              "nullable": true,
                              "description": "Audience breakdown when available, otherwise `null`. Percentages are strings such as `\"31.79%\"`.",
                              "properties": {
                                "followerCount": {
                                  "type": "number"
                                },
                                "audienceLocations": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "country": {
                                        "type": "string"
                                      },
                                      "countryCode": {
                                        "type": "string"
                                      },
                                      "percentage": {
                                        "type": "string",
                                        "example": "31.79%"
                                      },
                                      "count": {
                                        "type": "number"
                                      }
                                    }
                                  }
                                },
                                "genders": {
                                  "type": "array",
                                  "description": "Optional",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "gender": {
                                        "type": "string"
                                      },
                                      "percentage": {
                                        "type": "string",
                                        "example": "31.79%"
                                      },
                                      "count": {
                                        "type": "number"
                                      }
                                    }
                                  }
                                },
                                "ages": {
                                  "type": "array",
                                  "description": "Optional",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "ageRange": {
                                        "type": "string"
                                      },
                                      "percentage": {
                                        "type": "string",
                                        "example": "31.79%"
                                      },
                                      "count": {
                                        "type": "number"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "postingTimes": {
                              "type": "array",
                              "description": "Best posting slots",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "dayOfWeek": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 6,
                                    "description": "0 = Sunday ... 6 = Saturday"
                                  },
                                  "hour": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 23
                                  },
                                  "avgViews": {
                                    "type": "number"
                                  },
                                  "avgEngagement": {
                                    "type": "number"
                                  },
                                  "videoCount": {
                                    "type": "integer"
                                  },
                                  "rank": {
                                    "type": "integer"
                                  },
                                  "score": {
                                    "type": "number"
                                  }
                                }
                              }
                            },
                            "topVideos": {
                              "type": "array",
                              "description": "Up to 20 videos, highest `viralScore` first",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "Video id in Hooked"
                                  },
                                  "externalId": {
                                    "type": "string",
                                    "description": "The platform's video id"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "thumbnailUrl": {
                                    "type": "string"
                                  },
                                  "views": {
                                    "type": "number"
                                  },
                                  "likes": {
                                    "type": "number"
                                  },
                                  "viralScore": {
                                    "type": "number"
                                  },
                                  "publishedAt": {
                                    "type": "string",
                                    "format": "date-time"
                                  }
                                }
                              }
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No account with that id. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Delete Account",
        "description": "Permanently deletes an analyzed account from your team, with its saved videos and analytics. Nothing happens on the platform and the credits spent on the analysis are not refunded. Analyzing the account again gives it a new `id`.",
        "operationId": "deleteSocialAccount",
        "tags": [
          "Account Analysis"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id, from /v1/social/account/list or /v1/social/account/analyze"
          }
        ],
        "responses": {
          "200": {
            "description": "Account deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The deleted account id"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Account deleted successfully",
                  "data": {
                    "id": "clxacc0001",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No account with that id, including one already deleted. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/social/account/{accountId}/refresh": {
      "post": {
        "summary": "Refresh Account",
        "description": "Scrapes an account your team already analyzed again and updates its saved data. No request body; waits for the scrape to finish. Costs 8 credits, charged to BYOK teams too (platform cost) and refunded when the refresh fails.",
        "operationId": "refreshSocialAccount",
        "tags": [
          "Account Analysis"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The account id, from /v1/social/account/list or /v1/social/account/analyze"
          }
        ],
        "responses": {
          "200": {
            "description": "Account refreshed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "`Account refreshed successfully`"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "account": {
                          "type": "object",
                          "description": "The refreshed profile. For hashtags, keywords and top videos read the account details.",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Account id in Hooked"
                            },
                            "username": {
                              "type": "string",
                              "description": "Handle, lowercased, without `@`"
                            },
                            "platform": {
                              "type": "string",
                              "enum": [
                                "tiktok",
                                "youtube"
                              ]
                            },
                            "displayName": {
                              "type": "string",
                              "description": "Display name"
                            },
                            "bio": {
                              "type": "string",
                              "nullable": true
                            },
                            "avatarUrl": {
                              "type": "string",
                              "nullable": true,
                              "description": "Profile picture URL"
                            },
                            "isVerified": {
                              "type": "boolean",
                              "description": "Verified on the platform"
                            },
                            "stats": {
                              "type": "object",
                              "properties": {
                                "followers": {
                                  "type": "number"
                                },
                                "following": {
                                  "type": "number"
                                },
                                "videos": {
                                  "type": "number"
                                },
                                "likes": {
                                  "type": "number"
                                }
                              }
                            },
                            "analytics": {
                              "type": "object",
                              "properties": {
                                "engagementRate": {
                                  "type": "number"
                                },
                                "viralityScore": {
                                  "type": "number"
                                },
                                "avgViews": {
                                  "type": "number"
                                }
                              }
                            },
                            "lastAnalyzed": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "This refresh"
                            },
                            "profileUrl": {
                              "type": "string",
                              "description": "Link to the profile"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No account with that id. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "The scrape failed (`error` says why). The credits are refunded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to refresh account",
                  "error": "..."
                }
              }
            }
          }
        }
      }
    },
    "/v1/integration/list": {
      "get": {
        "summary": "List Integrations",
        "description": "The social accounts your team has connected for publishing. Accounts are connected in the Hooked dashboard (Studio → Channels); the API cannot connect them.",
        "operationId": "listIntegrations",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Integrations",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "integrations": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Integration"
                          },
                          "description": "One page of integrations"
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many integrations the team has (all pages). You are done when `offset + limit >= total`."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "Page size used"
                        },
                        "offset": {
                          "type": "integer",
                          "description": "Offset used"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1-100). Invalid values fall back to the default.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip. Invalid values fall back to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ]
      }
    },
    "/v1/integration/{integrationId}": {
      "get": {
        "summary": "Get Integration Details",
        "description": "One connected social account with a basic health check of its stored token. The check does not call the platform, so `healthy` does not guarantee the platform will accept a post.",
        "operationId": "getIntegrationDetails",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The integration id, from /v1/integration/list"
          }
        ],
        "responses": {
          "200": {
            "description": "Integration",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Integration"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "health": {
                              "type": "object",
                              "properties": {
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "healthy",
                                    "expired",
                                    "error"
                                  ],
                                  "description": "`expired` when the token has an expiry date in the past, `error` when a TikTok connection has no access token, `healthy` otherwise. On `expired` or `error`, reconnect the account in the dashboard."
                                },
                                "tokenValid": {
                                  "type": "boolean",
                                  "description": "`false` when `status` is `expired` or `error`"
                                },
                                "lastChecked": {
                                  "type": "string",
                                  "format": "date-time",
                                  "description": "When this check ran (the time of your request)"
                                }
                              },
                              "description": "Read from the stored token only"
                            },
                            "createdAt": {
                              "type": "string",
                              "format": "date-time",
                              "description": "When the account was connected"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No integration with that id. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Disconnect Integration",
        "description": "Removes a connected social account. Every post recorded in Hooked for that integration is deleted with it, pending scheduled posts included. Videos already published stay on the platform.",
        "operationId": "disconnectIntegration",
        "tags": [
          "Channels"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The integration id, from /v1/integration/list"
          }
        ],
        "responses": {
          "200": {
            "description": "Integration disconnected",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The integration that was removed"
                        },
                        "type": {
                          "type": "string",
                          "description": "Its platform"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Integration disconnected successfully",
                  "data": {
                    "id": "clxint0001",
                    "type": "tiktok",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No integration with that id, including one already disconnected. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/schedule/list": {
      "get": {
        "summary": "List Scheduled Posts",
        "description": "Your team's scheduled posts, most recently created first, with the video and account each one publishes to. Posts published directly from the dashboard are not included.",
        "operationId": "listScheduledPosts",
        "tags": [
          "Publish"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Keep only posts with this status. Matched exactly; any other value returns an empty list.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "published",
                "failed"
              ]
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Keep only posts to this platform. Any other value answers 400.",
            "schema": {
              "type": "string",
              "enum": [
                "tiktok",
                "youtube",
                "instagram",
                "facebook"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (1-100). Invalid values fall back to the default.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Rows to skip. Invalid values fall back to 0.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Scheduled posts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "scheduledPosts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ScheduledPost"
                          },
                          "description": "One page of posts"
                        },
                        "total": {
                          "type": "integer",
                          "description": "Posts that match the filters (all pages). You are done when `offset + limit >= total`."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "Page size used"
                        },
                        "offset": {
                          "type": "integer",
                          "description": "Offset used"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "`platform` is not one of the four values",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "code": "bad_request",
                  "message": "platform: Must be one of tiktok, youtube, instagram, facebook",
                  "errorCode": "INVALID_INPUT",
                  "details": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/schedule/create": {
      "post": {
        "summary": "Schedule Video",
        "description": "Schedules a completed video of your team to be published on a connected account at a given time. Costs no credits. Publishing works for YouTube, TikTok and Instagram. Not idempotent.",
        "operationId": "createSchedule",
        "tags": [
          "Publish"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "videoId",
                  "integrationId",
                  "scheduledDateTime"
                ],
                "properties": {
                  "videoId": {
                    "type": "string",
                    "description": "The video to publish. It must belong to your team and its render must be completed."
                  },
                  "integrationId": {
                    "type": "string",
                    "description": "The connected account to publish to, from /v1/integration/list"
                  },
                  "scheduledDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "When to publish: ISO 8601 in UTC with a `Z` suffix (for example `2026-10-05T15:00:00Z`). Offsets like `+02:00` are rejected. Must be in the future."
                  },
                  "platformData": {
                    "type": "object",
                    "description": "Post details. Unknown keys are dropped. Each platform uses only some of them: YouTube uses `title`, `description`, `tags` and `privacyStatus`; TikTok uses `title` and `privacyStatus` (`public` posts for everyone, `private` and `unlisted` for only you, as TikTok has no unlisted; duet, stitch and comments off); Instagram uses `caption`.",
                    "properties": {
                      "title": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "YouTube video title and TikTok caption. Defaults to the video's name."
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 5000,
                        "description": "YouTube only: the video description."
                      },
                      "privacyStatus": {
                        "type": "string",
                        "enum": [
                          "public",
                          "private",
                          "unlisted"
                        ],
                        "default": "public",
                        "description": "YouTube: the video's privacy. TikTok: `public` posts for everyone; `private` and `unlisted` post for only you (TikTok has no unlisted). Not used by Instagram."
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 30,
                        "description": "YouTube only: the video tags."
                      },
                      "caption": {
                        "type": "string",
                        "maxLength": 2200,
                        "description": "Instagram only: the post caption. Empty when left out."
                      }
                    }
                  }
                }
              },
              "example": {
                "videoId": "clx9vid0001abcd1234efgh",
                "integrationId": "clxint0001",
                "scheduledDateTime": "2026-10-05T15:00:00Z",
                "platformData": {
                  "title": "5 tips for better sleep",
                  "description": "Simple habits that help.",
                  "privacyStatus": "public"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Video scheduled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "`Video scheduled successfully`, or `Video scheduled successfully with warning` when the publishing queue was briefly unavailable (the post is saved and publishing is retried automatically)"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "scheduleId": {
                          "type": "string",
                          "description": "The scheduled post id, for the other schedule endpoints"
                        },
                        "status": {
                          "type": "string",
                          "example": "pending",
                          "description": "`pending`"
                        },
                        "scheduledDateTime": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When it will be published"
                        },
                        "platform": {
                          "type": "string",
                          "description": "The integration's platform"
                        },
                        "videoId": {
                          "type": "string",
                          "description": "The video being published"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Video scheduled successfully",
                  "data": {
                    "scheduleId": "clxpost0001",
                    "status": "pending",
                    "scheduledDateTime": "2026-10-05T15:00:00.000Z",
                    "platform": "tiktok",
                    "videoId": "clx9vid0001abcd1234efgh"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Body fails validation (`Invalid input`, per-field `details`), the video is not completed, the time is not in the future, or the integration is on a platform that cannot be published to (`Publishing to facebook is not supported. Supported platforms: youtube, tiktok, instagram`). A body that is not JSON answers `{ \"success\": false, \"message\": \"Invalid JSON body\" }`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "code": "bad_request",
                  "message": "Invalid input",
                  "errorCode": "INVALID_INPUT",
                  "details": {
                    "scheduledDateTime": [
                      "scheduledDateTime must be a valid ISO 8601 date"
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No video or integration with that id. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/schedule/{scheduleId}": {
      "get": {
        "summary": "Get Schedule Details",
        "description": "One scheduled post with its status, the account it publishes to and the video. Free and safe to retry.",
        "operationId": "getScheduleDetails",
        "tags": [
          "Publish"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `scheduleId` returned by /v1/schedule/create"
          }
        ],
        "responses": {
          "200": {
            "description": "Scheduled post",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ScheduledPost"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No scheduled post with that id, including a cancelled one. A post published directly (not scheduled) is not a schedule and answers the same way. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "patch": {
        "summary": "Update Schedule",
        "description": "Changes the publish time and/or the post details of a post that is not published yet; send at least one of the two fields. A new `scheduledDateTime` reschedules the publish (the post goes out at the new time, not the old one). A `failed` post given a new time is tried again; its `status` stays `failed` until it publishes.",
        "operationId": "updateSchedule",
        "tags": [
          "Publish"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `scheduleId` returned by /v1/schedule/create"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduledDateTime": {
                    "type": "string",
                    "format": "date-time",
                    "description": "New publish time: ISO 8601 in UTC with a `Z` suffix (for example `2026-10-06T09:00:00Z`). Must be in the future."
                  },
                  "platformData": {
                    "type": "object",
                    "description": "Post details. Unknown keys are dropped. Each platform uses only some of them: YouTube uses `title`, `description`, `tags` and `privacyStatus`; TikTok uses `title` and `privacyStatus` (`public` posts for everyone, `private` and `unlisted` for only you, as TikTok has no unlisted; duet, stitch and comments off); Instagram uses `caption`. Merged into the stored values: send only the fields you want to change.",
                    "properties": {
                      "title": {
                        "type": "string",
                        "maxLength": 100,
                        "description": "YouTube video title and TikTok caption. Defaults to the video's name."
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 5000,
                        "description": "YouTube only: the video description."
                      },
                      "privacyStatus": {
                        "type": "string",
                        "enum": [
                          "public",
                          "private",
                          "unlisted"
                        ],
                        "default": "public",
                        "description": "YouTube: the video's privacy. TikTok: `public` posts for everyone; `private` and `unlisted` post for only you (TikTok has no unlisted). Not used by Instagram."
                      },
                      "tags": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 30,
                        "description": "YouTube only: the video tags."
                      },
                      "caption": {
                        "type": "string",
                        "maxLength": 2200,
                        "description": "Instagram only: the post caption. Empty when left out."
                      }
                    }
                  }
                }
              },
              "example": {
                "scheduledDateTime": "2026-10-06T18:00:00Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Schedule updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The post id"
                        },
                        "status": {
                          "type": "string",
                          "description": "Unchanged by this call (`pending` or `failed`)"
                        },
                        "scheduledDateTime": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The publish time now in effect"
                        },
                        "platformData": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The merged post details"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid fields (`Invalid input` with per-field `details`), `Invalid JSON body`, `Scheduled time must be in the future`, `Cannot update a published post`, or `No fields to update`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "code": "bad_request",
                  "message": "Cannot update a published post",
                  "errorCode": "INVALID_INPUT",
                  "details": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No scheduled post with that id, including a cancelled one. A post published directly (not scheduled) is not a schedule and answers the same way. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Cancel Schedule",
        "description": "Cancels a post that is not published yet (`pending` or `failed`): its publish job is removed and the post is deleted. The video itself is not touched. After this call the id answers 404.",
        "operationId": "deleteSchedule",
        "tags": [
          "Publish"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "scheduleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `scheduleId` returned by /v1/schedule/create"
          }
        ],
        "responses": {
          "200": {
            "description": "Schedule cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "deleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Schedule cancelled successfully",
                  "data": {
                    "id": "clxpost0001",
                    "deleted": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "The post was already published (`Cannot delete a published post`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                },
                "example": {
                  "code": "bad_request",
                  "message": "Cannot delete a published post",
                  "errorCode": "INVALID_INPUT",
                  "details": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No scheduled post with that id, including a cancelled one. A post published directly (not scheduled) is not a schedule and answers the same way. An id that belongs to another team answers the same way.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/image/remove-background": {
      "post": {
        "summary": "Remove Image Background",
        "description": "Starts removing the background of an image; the PNG with transparency lands on the media a moment later. Answers 202 with the media to follow through GET /v1/image/{mediaId}. Answers 200 at once, free, when the image already has its cut-out, and 202 again, free, when a removal is already running (both work with no credits left when you pass `media`). Managed teams: 4 credits per new removal, charged when the job starts and refunded if it fails. BYOK teams: no credits, the team's own Bria key is required.",
        "operationId": "removeImageBackground",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "media": {
                    "type": "string",
                    "description": "ID of an image in your media library. Required unless `imageUrl` is given. When both are sent, `media` is used. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public URL of a JPEG, PNG or WEBP image (up to 25 MB). It is imported into your library first, so the result is attached to a media you own. Required unless `media` is given."
                  }
                }
              },
              "example": {
                "imageUrl": "https://example.com/portrait.jpg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The image already had its cut-out",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The library image the cut-out belongs to"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "COMPLETED"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "description": "Signed URL of the original image"
                        },
                        "backgroundRemovedUrl": {
                          "type": "string",
                          "description": "Signed URL of the PNG with transparency"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Always 0: nothing new was started"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Background already removed",
                  "data": {
                    "mediaId": "media_abc123",
                    "status": "COMPLETED",
                    "url": "https://.../portrait.jpg",
                    "backgroundRemovedUrl": "https://.../media_abc123-1726560000000.png",
                    "usedCredits": 0
                  }
                }
              }
            }
          },
          "202": {
            "description": "Removal started (or already running)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The library image the cut-out will belong to (the imported one when `imageUrl` was used)"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "description": "Signed URL of the original image"
                        },
                        "jobId": {
                          "type": "string",
                          "description": "The removal job"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits charged for the job this call started (4), or 0 when a removal was already running or the team is on its own provider keys (BYOK)"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Background removal started",
                  "data": {
                    "mediaId": "media_abc123",
                    "status": "PROCESSING",
                    "url": "https://.../portrait.jpg",
                    "jobId": "aab23fd5fe10445c8fc1d2821b1482bd",
                    "usedCredits": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, neither `media` nor `imageUrl`, `media` not an image of your library, or `imageUrl` that could not be imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "media or imageUrl is required"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "Bria did not take the request; nothing is charged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "Bria could not process the image"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/image/expand": {
      "post": {
        "summary": "Expand Image",
        "description": "Starts growing an image to another aspect ratio: the original is centred on the larger canvas at its own size and AI paints the new area, optionally guided by `prompt`. The result is a new image in your library, answered here as a pending row (202) to follow through GET /v1/image/{mediaId}; the original is not modified. Managed teams: 7 credits, charged when the job starts and refunded if it fails. BYOK teams: no credits, the team's own Bria key is required.",
        "operationId": "expandImage",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "aspectRatio"
                ],
                "properties": {
                  "media": {
                    "type": "string",
                    "description": "ID of an image in your media library. Required unless `imageUrl` is given. When both are sent, `media` is used. A media that is not `COMPLETED` yet (an import or upload in progress) answers `400 media: Media \"<id>\" is not ready (status PROCESSING)`."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public URL of a JPEG, PNG or WEBP image (up to 25 MB). It is imported into your library first, so the result is attached to a media you own. Required unless `media` is given."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_1_1",
                      "ratio_16_9"
                    ],
                    "description": "Target aspect ratio. An image that already has it is rejected with 400."
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "What the new area should show (up to 500 characters). Without it the scene is continued from the image itself."
                  }
                }
              },
              "example": {
                "media": "media_abc123",
                "aspectRatio": "ratio_16_9",
                "prompt": "the same beach, more sand and sky"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Expansion started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The new library image being made. Its `url` appears in GET /v1/image/{mediaId} when `status` is `COMPLETED`."
                        },
                        "sourceMediaId": {
                          "type": "string",
                          "description": "The image it is grown from (the imported one when `imageUrl` was used)"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING"
                          ],
                          "description": "Always `PROCESSING` here"
                        },
                        "aspectRatio": {
                          "type": "string",
                          "description": "The ratio being produced"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits charged for this expansion (7); 0 for teams on their own provider keys (BYOK), who are not charged"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Image expansion started",
                  "data": {
                    "mediaId": "media_def456",
                    "sourceMediaId": "media_abc123",
                    "status": "PROCESSING",
                    "aspectRatio": "ratio_16_9",
                    "usedCredits": 7
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, validation error (`media or imageUrl is required`, `aspectRatio: ...`, `prompt: ...`), `media` not an image of your library, `imageUrl` that could not be imported, or an image that cannot be expanded (`The image already has that ratio`, `The image could not be read`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "aspectRatio: Required"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "502": {
            "description": "Bria did not take the request; the credits are refunded",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "Bria could not process the image"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/image/{mediaId}": {
      "get": {
        "summary": "Get Image",
        "description": "An image of your library and the state of the edits started on it: the image itself (`status` is `PROCESSING` while an expansion paints it) and its background removal (`backgroundRemoval.status`). Poll it until the state you wait for is `COMPLETED` or `FAILED`. Free and safe to retry.",
        "operationId": "getImageDetails",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The library image, as returned by the endpoint that started the edit."
          }
        ],
        "responses": {
          "200": {
            "description": "Image found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The image id"
                        },
                        "name": {
                          "type": "string",
                          "description": "The image name in your library"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING",
                            "COMPLETED",
                            "FAILED"
                          ],
                          "description": "The image itself: `PROCESSING` while an expansion is being painted, then `COMPLETED` or `FAILED`"
                        },
                        "url": {
                          "type": "string",
                          "nullable": true,
                          "description": "Signed URL of the image; `null` while it is still being made"
                        },
                        "aspectRatio": {
                          "type": "string",
                          "nullable": true,
                          "description": "`ratio_9_16`, `ratio_1_1`, `ratio_16_9`, ... when known (always set on an expanded image), otherwise `null`"
                        },
                        "backgroundRemoval": {
                          "type": "object",
                          "properties": {
                            "status": {
                              "type": "string",
                              "enum": [
                                "NONE",
                                "PROCESSING",
                                "COMPLETED",
                                "FAILED"
                              ],
                              "description": "`NONE` when none was ever started"
                            },
                            "url": {
                              "type": "string",
                              "nullable": true,
                              "description": "Signed URL of the PNG with transparency when `status` is `COMPLETED`, otherwise `null`"
                            }
                          },
                          "description": "State of the background removal of this image"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits recorded on this image (0 for a BYOK team)"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Image details fetched successfully",
                  "data": {
                    "id": "media_abc123",
                    "name": "portrait.jpg",
                    "status": "COMPLETED",
                    "url": "https://.../portrait.jpg",
                    "aspectRatio": null,
                    "backgroundRemoval": {
                      "status": "COMPLETED",
                      "url": "https://.../media_abc123-1726560000000.png"
                    },
                    "usedCredits": 4,
                    "createdAt": "2026-09-17T10:00:00.000Z",
                    "updatedAt": "2026-09-17T10:00:12.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "No such image in your library. Another team's image, or a media that is not an image, answers the same",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Image not found"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "summary": "API Status",
        "description": "Public, no API key. `operational` with 200, or `degraded` with 503 when the database does not answer.",
        "operationId": "getStatus",
        "tags": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Operational",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiStatus"
                },
                "example": {
                  "status": "operational",
                  "version": "v1",
                  "timestamp": "2026-10-01T10:00:00.000Z",
                  "responseTime": 4,
                  "services": {
                    "database": "ok",
                    "api": "ok"
                  },
                  "dbResponseTime": 3
                }
              }
            }
          },
          "503": {
            "description": "Degraded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiStatus"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "summary": "Health Check",
        "description": "Public, no API key. Whether the API is up: 200 with `status: ok`, or 503 with `status: error` when the database does not answer. The body carries no host details.",
        "operationId": "getHealth",
        "tags": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Healthy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          },
          "503": {
            "description": "Unhealthy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/list": {
      "get": {
        "summary": "List Media",
        "description": "The images and videos of your team's media library, newest first, with the total count for paging.",
        "operationId": "listMedia",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only `image` or only `video`. Both when left out. Any other value answers 400.",
            "schema": {
              "type": "string",
              "enum": [
                "image",
                "video"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Only media whose name contains this text (case-insensitive).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Media to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Media",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "media": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/LibraryMedia"
                          },
                          "description": "The media on this page."
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many media match the filters, across all pages."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size used."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset used."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Media fetched successfully",
                  "data": {
                    "media": [
                      {
                        "id": "cm4x9s8u60009ab12kl56mn90",
                        "name": "Demo clip",
                        "type": "video",
                        "status": "COMPLETED",
                        "error": null,
                        "url": "https://files.hooked.so/team/public/demo--fid--9c1d.mp4",
                        "thumbnail": "https://files.hooked.so/team/public/demo--fid--9c1d.jpg",
                        "durationSeconds": 12.4,
                        "size": 8388608,
                        "aspectRatio": "ratio_9_16",
                        "isAIGenerated": false,
                        "createdAt": "2026-10-01T09:30:00.000Z"
                      },
                      {
                        "id": "cm4x9r2t50007ab12gh34ij78",
                        "name": "Product shot",
                        "type": "image",
                        "status": "COMPLETED",
                        "error": null,
                        "url": "https://files.hooked.so/team/public/product-shot--fid--3f2a.png",
                        "thumbnail": null,
                        "durationSeconds": null,
                        "size": 482113,
                        "aspectRatio": null,
                        "isAIGenerated": false,
                        "createdAt": "2026-10-01T10:00:00.000Z"
                      }
                    ],
                    "total": 42,
                    "limit": 20,
                    "offset": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown `type`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "type: Must be image or video"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to fetch media"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/{mediaId}": {
      "get": {
        "summary": "Get Media",
        "description": "One image or video of your library. Poll it after an import or a generation (Generate Image / Generate Video) until `status` is `COMPLETED` or `FAILED`. Free and safe to retry.",
        "operationId": "getMedia",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The media id, from List Media, an import or an upload."
          }
        ],
        "responses": {
          "200": {
            "description": "Media found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LibraryMedia"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Media fetched successfully",
                  "data": {
                    "id": "cm4x9s8u60009ab12kl56mn90",
                    "name": "Demo clip",
                    "type": "video",
                    "status": "COMPLETED",
                    "error": null,
                    "url": "https://files.hooked.so/team/public/demo--fid--9c1d.mp4",
                    "thumbnail": "https://files.hooked.so/team/public/demo--fid--9c1d.jpg",
                    "durationSeconds": 12.4,
                    "size": 8388608,
                    "aspectRatio": "ratio_9_16",
                    "isAIGenerated": false,
                    "createdAt": "2026-10-01T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such media in your library (another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Media not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          }
        }
      },
      "delete": {
        "summary": "Delete Media",
        "description": "Deletes an image or video of your media library for good. **This cannot be undone.** The row and its file are removed and the storage it used is freed. An import or upload that has not finished can be deleted (it stops counting; a file already sent is removed). Refused with 409 while a project uses the media (the message names the project), or while a generation started in the dashboard is still making it. A `FAILED` media can always be deleted; credits charged for a failed generation are given back.",
        "operationId": "deleteMedia",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The media id, from List Media, an import or an upload."
          }
        ],
        "responses": {
          "200": {
            "description": "Media deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "mediaId",
                        "deleted"
                      ],
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The media that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Media deleted",
                  "data": {
                    "mediaId": "cm4x9s8u60009ab12kl56mn90",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such media in your library, including one already deleted (another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Media not found"
                }
              }
            }
          },
          "409": {
            "description": "The media cannot be deleted yet; nothing was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict409"
                },
                "examples": {
                  "in use": {
                    "value": {
                      "success": false,
                      "message": "Cannot delete: this media is currently used in the project \"Serum ad\""
                    }
                  },
                  "processing": {
                    "value": {
                      "success": false,
                      "message": "Media is still processing"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/media/import": {
      "post": {
        "summary": "Import Media from URL",
        "description": "Adds an image or video at a public https URL to your library. Answers 202 at once with the media id; the file is downloaded after the response. Poll Get Media until `status` is `COMPLETED` (use the id in any create endpoint) or `FAILED` (its `error` says why), or pass a `webhook` to be told (`media.completed` / `media.failed`). JPEG, PNG, WEBP, GIF, MP4, MOV or WEBM, up to 100 MB, counted against your plan's storage. Free.",
        "operationId": "importMedia",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public https URL of the file. Private, local and plain http addresses are refused."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name in your library. Defaults to the file name in the URL."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Public https URL told once when the media is `COMPLETED` or `FAILED` (events `media.completed` / `media.failed`, signed like every Hooked webhook). See [Webhooks](/guides/webhooks#media-webhooks)."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload."
                  }
                }
              },
              "example": {
                "url": "https://cdn.example.com/products/serum.png",
                "name": "Serum bottle"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Import started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The new media. Follow it with GET /v1/media/{mediaId}."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING"
                          ],
                          "description": "Always `PROCESSING` here"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Import started",
                  "data": {
                    "mediaId": "cm4x9r2t50007ab12gh34ij78",
                    "status": "PROCESSING"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body or URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "url: Must be a public https URL"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to start the import"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/media/upload": {
      "post": {
        "summary": "Upload Media",
        "description": "Step one of uploading a file from your machine: creates a `PENDING` media and returns a presigned URL. PUT the file's bytes to `uploadUrl` within 10 minutes, then call Complete Upload. JPEG, PNG, WEBP, GIF, MP4, MOV or WEBM, up to 100 MB. Free.",
        "operationId": "uploadMedia",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fileName",
                  "fileType",
                  "fileSize"
                ],
                "properties": {
                  "fileName": {
                    "type": "string",
                    "description": "The file's name with its extension: jpg, jpeg, png, webp, gif, mp4, mov or webm."
                  },
                  "fileType": {
                    "type": "string",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "image/gif",
                      "video/mp4",
                      "video/quicktime",
                      "video/webm"
                    ],
                    "description": "The file's MIME type. Its extension must match (a `video/mp4` named `.png` is refused)."
                  },
                  "fileSize": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 104857600,
                    "description": "Size in bytes, at most 100 MB. Checked against your storage now and again, with the real size, on complete."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name in your library. Defaults to `fileName`."
                  }
                }
              },
              "example": {
                "fileName": "demo.mp4",
                "fileType": "video/mp4",
                "fileSize": 8388608,
                "name": "Demo clip"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload URL created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The new `PENDING` media"
                        },
                        "uploadUrl": {
                          "type": "string",
                          "description": "Presigned URL to PUT the file's bytes to"
                        },
                        "method": {
                          "type": "string",
                          "enum": [
                            "PUT"
                          ]
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Headers to send with the PUT"
                        },
                        "expiresAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When `uploadUrl` stops working (10 minutes)"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Upload URL created",
                  "data": {
                    "mediaId": "cm4x9s8u60009ab12kl56mn90",
                    "uploadUrl": "https://files.hooked.so/team/public/demo--fid--9c1d.mp4?X-Amz-Signature=...",
                    "method": "PUT",
                    "headers": {
                      "Content-Type": "video/mp4"
                    },
                    "expiresAt": "2026-10-01T09:40:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, type, extension or size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "fileName: The extension must be one of mp4, mov, webm"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Not enough storage left on your plan, or the team does not have the Hooked app product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "Insufficient storage. The pro plan has a limit of 50GB and you have already used 50GB"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to create the upload URL"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/media/{mediaId}/complete": {
      "post": {
        "summary": "Complete Upload",
        "description": "Step two of an upload, after the PUT: checks that the file arrived (and its real size), counts it against your storage, and makes the media `COMPLETED`. For a video it also reads the length and starts the thumbnail. No body. Calling it again on a completed media answers the same media.",
        "operationId": "completeMediaUpload",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `mediaId` from Upload Media."
          }
        ],
        "responses": {
          "200": {
            "description": "Upload completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/LibraryMedia"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Upload completed",
                  "data": {
                    "id": "cm4x9s8u60009ab12kl56mn90",
                    "name": "Demo clip",
                    "type": "video",
                    "status": "COMPLETED",
                    "error": null,
                    "url": "https://files.hooked.so/team/public/demo--fid--9c1d.mp4",
                    "thumbnail": "https://files.hooked.so/team/public/demo--fid--9c1d.jpg",
                    "durationSeconds": 12.4,
                    "size": 8388608,
                    "aspectRatio": "ratio_9_16",
                    "isAIGenerated": false,
                    "createdAt": "2026-10-01T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The file is not in storage yet (PUT it, then call again), or it is over 100 MB (it is deleted and the media is `FAILED`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "The file was not uploaded"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "The real size does not fit your plan's storage (the file is deleted and the media is `FAILED`), or the team does not have the Hooked app product",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "Insufficient storage. The pro plan has a limit of 50GB and you have already used 50GB"
                }
              }
            }
          },
          "404": {
            "description": "No such media in your library",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Media not found"
                }
              }
            }
          },
          "409": {
            "description": "The media is `FAILED` (start a new upload), is not an upload, or is being completed by another call",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "The upload failed; start a new one"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to complete the upload"
                }
              }
            }
          }
        }
      }
    },
    "/v1/project/create/clone-video": {
      "post": {
        "summary": "Create Clone Video",
        "description": "Makes a new video in the style of an existing TikTok, Instagram or YouTube video: its structure, pacing and look are analysed and remade with your voice, a new script and AI visuals. Returns a `projectId` right away; the video is generated and rendered in the background. BYOK: needs OpenRouter and ElevenLabs; `aiModel: \"gemini_omni_flash\"` also needs Gemini.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createCloneVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceVideoUrl",
                  "voiceId"
                ],
                "properties": {
                  "sourceVideoUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "The video to clone: a TikTok, Instagram or YouTube link. Any other host answers 400 (`sourceVideoUrl: Only TikTok, Instagram, and YouTube URLs are supported`)."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`)."
                  },
                  "targetDurationSeconds": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 600,
                    "default": 30,
                    "description": "Length of the new video in seconds. It also sets the price."
                  },
                  "mustInclude": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Something the new video has to mention or show, e.g. your product or a call to action (max 500 characters)."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos"
                    ],
                    "default": "ai-images",
                    "description": "`ai-images`: one AI image per scene. `ai-videos`: one AI video clip per scene, chained frame to frame. Any other value answers 400."
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "The model of the visuals. The style is taken from the source video, so there is no `preset`.",
                    "properties": {
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "pro",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      }
                    }
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the source when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code of the narration, e.g. `en`, `es`."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  }
                }
              },
              "example": {
                "sourceVideoUrl": "https://www.tiktok.com/@hooked.so/video/7412345678901234567",
                "voiceId": "1",
                "targetDurationSeconds": 30,
                "mustInclude": "End with: try Hooked free",
                "mediaType": "ai-images",
                "aspectRatio": "ratio_9_16",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Clone Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          },
          {
            "name": "dryRun",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "`true`: only answer the price of this exact request, as `{ success: true, data: { dryRun: true, estimatedCredits } }` with status 200. The request is validated like a real one (a 400 or 402 says the same), but nothing is created, queued or charged. `estimatedCredits` is exactly what the call without `dryRun` charges a managed team; a byok team is charged nothing. Do not send an `Idempotency-Key` with it."
          }
        ]
      }
    },
    "/v1/project/create/article-to-video": {
      "post": {
        "summary": "Create Article to Video",
        "description": "Turns a web article into a narrated video: the page is read, summarised (or kept as is) into scenes, voiced and illustrated. Answers in a few seconds with a `projectId` and status `processing`: the article is read and split into scenes after the response, then the video is generated and rendered. What can be refused up front (an invalid body or URL, missing keys, too few credits) answers 400/402 with nothing created; if the article cannot be read or summarised later, the project becomes `failed` with the reason in `message`, the credits are refunded and the failure webhook is sent. BYOK: needs OpenRouter, ElevenLabs and Firecrawl (no ElevenLabs for a speaking cast); `aiModel: \"gemini_omni_flash\"` also needs Gemini.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createArticleToVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "sourceUrl",
                  "voiceId"
                ],
                "properties": {
                  "sourceUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "The article: a public https page. Private or local addresses answer 400. The page is read with Firecrawl."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`)."
                  },
                  "summaryType": {
                    "type": "string",
                    "enum": [
                      "summarize",
                      "summarize_long",
                      "key_as_is"
                    ],
                    "default": "summarize",
                    "description": "How the text becomes the narration:\n- `summarize`: a short summary of the key points, about `targetDuration` seconds long.\n- `summarize_long`: a detailed narration with supporting details, about `targetDuration` seconds long.\n- `key_as_is`: the text as close to the original as possible, adapted for speech. The video is as long as the text needs; `targetDuration` is ignored."
                  },
                  "targetDuration": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 600,
                    "default": 30,
                    "description": "Approximate length of the video in seconds (10-600). Not used with `key_as_is`. It also sets the price of the project."
                  },
                  "customPrompt": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "`summarize` only: extra instructions for the summary, e.g. the angle or the audience (max 2,000 characters). Sent with another `summaryType`, it answers 400."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos",
                      "media",
                      "gameplay"
                    ],
                    "description": "Where the visuals come from:\n- `ai-images` (default): one AI image per scene (`presetSettings`: `preset`, `aiModel`, `characterIds`, `useCharacterReferenceImage`).\n- `ai-videos`: one AI video clip per scene (`presetSettings`: `preset`, `quality`, `aiModel`, `isContinuous`, `characterIds`, `characterMode`, `voiceProfile`).\n- `media`: your own images and videos from the media library (`media` required).\n- `gameplay`: a gameplay clip in the background (`gameplaySettings`).\n\n`motion-graphics` is not available for this format (400).",
                    "default": "ai-images"
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "Visual settings for `ai-images` and `ai-videos`; not used by `media` and `gameplay`. Each field says which media types read it.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "realistic",
                          "cinematic",
                          "anime",
                          "real-anime",
                          "retro-anime",
                          "cyberpunk-anime",
                          "ghibli-studio",
                          "pixar",
                          "cartoon",
                          "comic-book",
                          "claymation",
                          "fantasy",
                          "80s-fantasy-movie",
                          "creative",
                          "art-style",
                          "sketch-black-and-white",
                          "sketch-color",
                          "japanese-ink",
                          "ink-style",
                          "haunted-linework",
                          "neon-futuristic",
                          "pixel-art",
                          "collage",
                          "lego",
                          "technical-blueprints",
                          "stickman",
                          "nursery-rhyme",
                          "south-park",
                          "skeleton-3d",
                          "fruit-people",
                          "talking-fruit",
                          "talking-objects",
                          "talking-organs",
                          "minecraft",
                          "gta-v",
                          "free-fire",
                          "fortnite",
                          "roblox",
                          "pubg",
                          "bitlife",
                          "space-marines-40k",
                          "bombardiro-crocodilo",
                          "tralalero-tralala",
                          "demon-slayer",
                          "dragon-ball",
                          "one-piece",
                          "pokemon",
                          "naruto",
                          "attack-on-titan",
                          "final-fantasy",
                          "mecha-break",
                          "alien-stage",
                          "marvel",
                          "dc",
                          "star-wars",
                          "star-trek",
                          "harry-potter",
                          "lord-of-the-rings",
                          "game-of-thrones",
                          "doctor-who",
                          "sherlock-holmes",
                          "stranger-things",
                          "squid-game",
                          "wednesday",
                          "zelda",
                          "genshin-impact",
                          "dungeons-and-dragons",
                          "rick-and-morty",
                          "amazing-digital-circus"
                        ],
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: the visual style, or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "default": true,
                        "description": "`ai-videos` only: chain the clips frame to frame (each clip starts on the last frame of the one before)."
                      },
                      "characterMode": {
                        "type": "string",
                        "enum": [
                          "narrator",
                          "speaking"
                        ],
                        "default": "narrator",
                        "description": "`ai-videos` only. `narrator`: a voiceover over the visuals. `speaking`: the characters say the lines themselves with the video model's own audio (Veo 3 Fast, unless `aiModel` is another model that makes sound). `speaking` needs `mediaType: \"ai-videos\"` and the `talking-fruit`, `talking-objects` or `talking-organs` preset; any other `speaking` request answers 400. A speaking cast has no narrator, captions or stickers, so `audio`, `caption` and `addStickers` do not apply, and BYOK teams need no ElevenLabs key."
                      },
                      "voiceProfile": {
                        "type": "string",
                        "description": "Only with `characterMode: \"speaking\"`: a short description of how the characters sound."
                      },
                      "characterIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "`ai-images` / `ai-videos`: IDs of characters saved in your team's Characters library, to keep the same people across scenes."
                      },
                      "useCharacterReferenceImage": {
                        "type": "boolean",
                        "default": false,
                        "description": "`ai-images` with `characterIds` only: generate from the saved characters' reference images."
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "`mediaType: \"gameplay\"` only: the background clip.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "IDs of images or videos in your team's media library (max 50). Required for `mediaType: \"media\"`; ignored for the other media types. An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`), and so does a media that is not `COMPLETED` yet."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the source when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code of the narration. The narration is written in the article's own language, detected when omitted; this does not translate it."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "sourceUrl": "https://example.com/blog/remote-work-tips",
                "voiceId": "1",
                "summaryType": "summarize",
                "targetDuration": 45,
                "mediaType": "ai-images",
                "presetSettings": {
                  "preset": "realistic"
                },
                "aspectRatio": "ratio_9_16",
                "caption": {
                  "preset": "wrap1"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Article to Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/pdf-to-video": {
      "post": {
        "summary": "Create PDF to Video",
        "description": "Turns a PDF into a narrated video: the text is extracted, summarised (or kept as is) into scenes, voiced and illustrated. Send the PDF as a link (`pdfUrl`) or inline (`pdfBase64`). The PDF needs a text layer: a scanned or image-only PDF, or one with a password, answers 400 before anything is charged. Answers in a few seconds with a `projectId` and status `processing`: the PDF is downloaded and its text checked in the request, and the scenes are written after the response, then the video is generated and rendered. If the scenes cannot be written, the project becomes `failed` with the reason in `message`, the credits are refunded and the failure webhook is sent. BYOK: needs OpenRouter and ElevenLabs (no ElevenLabs for a speaking cast); `aiModel: \"gemini_omni_flash\"` also needs Gemini. No Firecrawl key: the PDF is read by Hooked.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createPdfToVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "voiceId"
                ],
                "properties": {
                  "pdfUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "A public https link to the PDF (up to 20 MB). Hooked downloads it: private or local addresses, redirects to them, files over 20 MB and anything that is not a PDF answer 400. Send this or `pdfBase64`, not both."
                  },
                  "pdfBase64": {
                    "type": "string",
                    "description": "The PDF file itself, base64-encoded (up to 10 MB once decoded; a `data:application/pdf;base64,` prefix is accepted). For bigger files use `pdfUrl`. Send this or `pdfUrl`, not both."
                  },
                  "pdfFileName": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "The file name, used to name the project. Taken from `pdfUrl` when omitted."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`)."
                  },
                  "summaryType": {
                    "type": "string",
                    "enum": [
                      "summarize",
                      "summarize_long",
                      "key_as_is"
                    ],
                    "default": "summarize",
                    "description": "How the text becomes the narration:\n- `summarize`: a short summary of the key points, about `targetDuration` seconds long.\n- `summarize_long`: a detailed narration with supporting details, about `targetDuration` seconds long.\n- `key_as_is`: the text as close to the original as possible, adapted for speech. The video is as long as the text needs; `targetDuration` is ignored."
                  },
                  "targetDuration": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 600,
                    "default": 30,
                    "description": "Approximate length of the video in seconds (10-600). Not used with `key_as_is`. It also sets the price of the project."
                  },
                  "customPrompt": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "`summarize` only: extra instructions for the summary, e.g. the angle or the audience (max 2,000 characters). Sent with another `summaryType`, it answers 400."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos",
                      "media",
                      "gameplay"
                    ],
                    "description": "Where the visuals come from:\n- `ai-images` (default): one AI image per scene (`presetSettings`: `preset`, `aiModel`, `characterIds`, `useCharacterReferenceImage`).\n- `ai-videos`: one AI video clip per scene (`presetSettings`: `preset`, `quality`, `aiModel`, `isContinuous`, `characterIds`, `characterMode`, `voiceProfile`).\n- `media`: your own images and videos from the media library (`media` required).\n- `gameplay`: a gameplay clip in the background (`gameplaySettings`).\n\n`motion-graphics` is not available for this format (400).",
                    "default": "ai-images"
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "Visual settings for `ai-images` and `ai-videos`; not used by `media` and `gameplay`. Each field says which media types read it.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "realistic",
                          "cinematic",
                          "anime",
                          "real-anime",
                          "retro-anime",
                          "cyberpunk-anime",
                          "ghibli-studio",
                          "pixar",
                          "cartoon",
                          "comic-book",
                          "claymation",
                          "fantasy",
                          "80s-fantasy-movie",
                          "creative",
                          "art-style",
                          "sketch-black-and-white",
                          "sketch-color",
                          "japanese-ink",
                          "ink-style",
                          "haunted-linework",
                          "neon-futuristic",
                          "pixel-art",
                          "collage",
                          "lego",
                          "technical-blueprints",
                          "stickman",
                          "nursery-rhyme",
                          "south-park",
                          "skeleton-3d",
                          "fruit-people",
                          "talking-fruit",
                          "talking-objects",
                          "talking-organs",
                          "minecraft",
                          "gta-v",
                          "free-fire",
                          "fortnite",
                          "roblox",
                          "pubg",
                          "bitlife",
                          "space-marines-40k",
                          "bombardiro-crocodilo",
                          "tralalero-tralala",
                          "demon-slayer",
                          "dragon-ball",
                          "one-piece",
                          "pokemon",
                          "naruto",
                          "attack-on-titan",
                          "final-fantasy",
                          "mecha-break",
                          "alien-stage",
                          "marvel",
                          "dc",
                          "star-wars",
                          "star-trek",
                          "harry-potter",
                          "lord-of-the-rings",
                          "game-of-thrones",
                          "doctor-who",
                          "sherlock-holmes",
                          "stranger-things",
                          "squid-game",
                          "wednesday",
                          "zelda",
                          "genshin-impact",
                          "dungeons-and-dragons",
                          "rick-and-morty",
                          "amazing-digital-circus"
                        ],
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: the visual style, or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "default": true,
                        "description": "`ai-videos` only: chain the clips frame to frame (each clip starts on the last frame of the one before)."
                      },
                      "characterMode": {
                        "type": "string",
                        "enum": [
                          "narrator",
                          "speaking"
                        ],
                        "default": "narrator",
                        "description": "`ai-videos` only. `narrator`: a voiceover over the visuals. `speaking`: the characters say the lines themselves with the video model's own audio (Veo 3 Fast, unless `aiModel` is another model that makes sound). `speaking` needs `mediaType: \"ai-videos\"` and the `talking-fruit`, `talking-objects` or `talking-organs` preset; any other `speaking` request answers 400. A speaking cast has no narrator, captions or stickers, so `audio`, `caption` and `addStickers` do not apply, and BYOK teams need no ElevenLabs key."
                      },
                      "voiceProfile": {
                        "type": "string",
                        "description": "Only with `characterMode: \"speaking\"`: a short description of how the characters sound."
                      },
                      "characterIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "`ai-images` / `ai-videos`: IDs of characters saved in your team's Characters library, to keep the same people across scenes."
                      },
                      "useCharacterReferenceImage": {
                        "type": "boolean",
                        "default": false,
                        "description": "`ai-images` with `characterIds` only: generate from the saved characters' reference images."
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "`mediaType: \"gameplay\"` only: the background clip.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "IDs of images or videos in your team's media library (max 50). Required for `mediaType: \"media\"`; ignored for the other media types. An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`), and so does a media that is not `COMPLETED` yet."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the source when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code of the narration. The narration is written in the document's own language, detected when omitted; this does not translate it."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "pdfUrl": "https://example.com/reports/annual-report-2025.pdf",
                "voiceId": "1",
                "summaryType": "summarize",
                "targetDuration": 60,
                "mediaType": "ai-images",
                "presetSettings": {
                  "preset": "cinematic"
                },
                "aspectRatio": "ratio_9_16",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "PDF to Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/pdf-to-brainrot": {
      "post": {
        "summary": "Create PDF to Brainrot",
        "description": "Turns a PDF into a narrated video over a gameplay clip (Minecraft, Subway Surfers style…): the text is extracted, summarised (or kept as is), voiced and captioned. Send the PDF as a link (`pdfUrl`) or inline (`pdfBase64`). The PDF needs a text layer: a scanned or image-only PDF, or one with a password, answers 400 before anything is charged. Answers in a few seconds with a `projectId` and status `processing`: the PDF is downloaded and its text checked in the request, and the scenes are written after the response, then the video is generated and rendered. If the scenes cannot be written, the project becomes `failed` with the reason in `message`, the credits are refunded and the failure webhook is sent. BYOK: needs OpenRouter and ElevenLabs. No Firecrawl key: the PDF is read by Hooked.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createPdfToBrainrot",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "voiceId"
                ],
                "properties": {
                  "pdfUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "A public https link to the PDF (up to 20 MB). Hooked downloads it: private or local addresses, redirects to them, files over 20 MB and anything that is not a PDF answer 400. Send this or `pdfBase64`, not both."
                  },
                  "pdfBase64": {
                    "type": "string",
                    "description": "The PDF file itself, base64-encoded (up to 10 MB once decoded; a `data:application/pdf;base64,` prefix is accepted). For bigger files use `pdfUrl`. Send this or `pdfUrl`, not both."
                  },
                  "pdfFileName": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "The file name, used to name the project. Taken from `pdfUrl` when omitted."
                  },
                  "voiceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "The narrator: a library voice from /v1/voice/list or one of your team's custom voices. An ID that is neither answers 400 (`voiceId: Voice \"<id>\" not found.`)."
                  },
                  "summaryType": {
                    "type": "string",
                    "enum": [
                      "summarize",
                      "summarize_long",
                      "key_as_is"
                    ],
                    "default": "summarize",
                    "description": "How the text becomes the narration:\n- `summarize`: a short summary of the key points, about `targetDuration` seconds long.\n- `summarize_long`: a detailed narration with supporting details, about `targetDuration` seconds long.\n- `key_as_is`: the text as close to the original as possible, adapted for speech. The video is as long as the text needs; `targetDuration` is ignored."
                  },
                  "targetDuration": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 600,
                    "default": 30,
                    "description": "Approximate length of the video in seconds (10-600). Not used with `key_as_is`. It also sets the price of the project."
                  },
                  "customPrompt": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "`summarize` only: extra instructions for the summary, e.g. the angle or the audience (max 2,000 characters). Sent with another `summaryType`, it answers 400."
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "The gameplay clip in the background (default Minecraft).",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the source when omitted."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music: a track from /v1/music/list or your team's own uploaded music. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "description": "Two-letter ISO 639-1 code of the narration. The narration is written in the document's own language, detected when omitted; this does not translate it."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the narration. Not used with `motion-graphics` (it typesets its own copy) or a speaking cast.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "audio": {
                    "type": "object",
                    "description": "Narrator voice settings (ElevenLabs). Any field you leave out keeps its default. Not used by a speaking cast.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Higher is steadier, lower is more expressive."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the voice sticks to the original."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the captions. Not used with `motion-graphics` or a speaking cast."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "pdfUrl": "https://example.com/notes/biology-chapter-3.pdf",
                "voiceId": "1",
                "summaryType": "summarize",
                "targetDuration": 60,
                "gameplaySettings": {
                  "selectedGame": "subway-s",
                  "selectedVideo": "subway-s-3"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "PDF to Brainrot successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/create/cinematic": {
      "post": {
        "summary": "Create Cinematic Studio",
        "description": "Turns a story brief into a short film with characters who speak: Hooked writes the storyboard, casts a portrait per character, draws a start frame per scene, films each scene with the chosen video model, adds subtitles and music and renders the video. The same pipeline as Automatic mode in the dashboard's Cinematic Studio.\n\nThe request answers in a few seconds with a `projectId` and status `processing`; the storyboard, the portraits, the scenes, the final cut and the render follow in the background. A step that fails there marks the project `failed` with the reason in `message` and sends the failure webhook once.\n\nCredits: the whole run (portraits, scene images and clips for `durationSeconds`) is checked before anything is created; a short balance answers 402 with nothing created. It is checked again once the storyboard is written: a balance that no longer covers it fails the project before anything is charged. Then each stage is charged as it starts, and a stage that fails is refunded; the project's `usedCredits` is every stage charged so far minus those refunds (a portrait that was drawn is a delivered asset and is not refunded, even if the video fails later). BYOK: needs OpenRouter; `model: \"gemini_omni_flash\"` also needs Gemini.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`). Create endpoints are not idempotent: do not retry a POST on a timeout or 5xx without first checking your projects, or you may create (and pay for) the video twice.",
        "operationId": "createCinematicVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "storyBrief",
                  "durationSeconds",
                  "model"
                ],
                "properties": {
                  "storyBrief": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000,
                    "description": "What the film is about (1–4,000 characters): the story, who is in it, the mood. Mention a library character with `@Name`. A brief that recreates a real, identifiable or famous person (or a minor) answers 400."
                  },
                  "durationSeconds": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 120,
                    "description": "Target length in seconds (10–120). The storyboard picks the real scene count; credits are checked up front for one 6-second scene per 6 seconds."
                  },
                  "model": {
                    "type": "string",
                    "enum": [
                      "veo_3_fast",
                      "veo_3",
                      "gemini_omni_flash",
                      "grok_imagine_video",
                      "grok_imagine_video_lite",
                      "kling_3_0",
                      "kling_3_0_pro",
                      "seedance_2_0",
                      "seedance_2_5",
                      "seedance_2_0_fast",
                      "veo_3_1_lite",
                      "seedance_2_0_mini"
                    ],
                    "description": "Video model that films every scene, with its own audio (the cast speaks). Seedance models can't film the photorealistic styles (`realistic`, `cinematic`): that pair answers 400. `gemini_omni_flash` runs on Gemini."
                  },
                  "storyTone": {
                    "type": "string",
                    "enum": [
                      "drama",
                      "comedy",
                      "action",
                      "romance",
                      "thriller",
                      "documentary",
                      "music_video",
                      "fantasy",
                      "anime"
                    ],
                    "default": "drama",
                    "description": "Genre and pacing of the story. Default: `drama`."
                  },
                  "presetId": {
                    "type": "string",
                    "default": "realistic",
                    "description": "Visual style of every scene and of the cast portraits: one of the style ids (`realistic`, `cinematic`, `anime`, `pixar`, `ghibli-studio`…, the same list as `presetSettings.preset` in Script to Video), or `custom-<id>` for one of your team's custom styles. Default: `realistic`. An unknown id answers 400 (`presetId: Invalid preset \"…\". Allowed values are: …`).",
                    "enum": [
                      "realistic",
                      "cinematic",
                      "anime",
                      "real-anime",
                      "retro-anime",
                      "cyberpunk-anime",
                      "ghibli-studio",
                      "pixar",
                      "cartoon",
                      "comic-book",
                      "claymation",
                      "fantasy",
                      "80s-fantasy-movie",
                      "creative",
                      "art-style",
                      "sketch-black-and-white",
                      "sketch-color",
                      "japanese-ink",
                      "ink-style",
                      "haunted-linework",
                      "neon-futuristic",
                      "pixel-art",
                      "collage",
                      "lego",
                      "technical-blueprints",
                      "stickman",
                      "nursery-rhyme",
                      "south-park",
                      "skeleton-3d",
                      "fruit-people",
                      "talking-fruit",
                      "talking-objects",
                      "talking-organs",
                      "minecraft",
                      "gta-v",
                      "free-fire",
                      "fortnite",
                      "roblox",
                      "pubg",
                      "bitlife",
                      "space-marines-40k",
                      "bombardiro-crocodilo",
                      "tralalero-tralala",
                      "demon-slayer",
                      "dragon-ball",
                      "one-piece",
                      "pokemon",
                      "naruto",
                      "attack-on-titan",
                      "final-fantasy",
                      "mecha-break",
                      "alien-stage",
                      "marvel",
                      "dc",
                      "star-wars",
                      "star-trek",
                      "harry-potter",
                      "lord-of-the-rings",
                      "game-of-thrones",
                      "doctor-who",
                      "sherlock-holmes",
                      "stranger-things",
                      "squid-game",
                      "wednesday",
                      "zelda",
                      "genshin-impact",
                      "dungeons-and-dragons",
                      "rick-and-morty",
                      "amazing-digital-circus"
                    ]
                  },
                  "imageModel": {
                    "type": "string",
                    "enum": [
                      "gpt_image_2",
                      "nano_banana_2_1",
                      "gpt_image_2_5_flare",
                      "gpt_image_2_5_sunburst",
                      "nano_banana_pro",
                      "nano_banana_2",
                      "nano_banana",
                      "grok_imagine_image",
                      "seedream_5_0",
                      "seedream_4_5"
                    ],
                    "default": "gpt_image_2",
                    "description": "Image model that draws each scene's start frame. Default: `gpt_image_2`."
                  },
                  "characterIds": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "string"
                    },
                    "description": "Up to 6 characters saved in your team's dashboard (Studio → Characters) to cast: their look, voice and photos are kept; mention them in the brief as `@Name`. Without it the storyboard invents the cast. An id that is not your team's answers 400 (`characterIds: Character \"…\" not found.`)."
                  },
                  "preserveExactStoryText": {
                    "type": "boolean",
                    "default": false,
                    "description": "Keep the brief's own dialogue and narration word for word instead of rewriting it."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_16_9",
                      "ratio_9_16",
                      "ratio_1_1"
                    ],
                    "default": "ratio_16_9",
                    "description": "Default: horizontal. `ratio_1_1` only with Kling and Seedance; a ratio the model does not film answers 400."
                  },
                  "language": {
                    "type": "string",
                    "enum": [
                      "en",
                      "es"
                    ],
                    "default": "en",
                    "description": "Language the story and its dialogue are written in."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Background music under the whole film: a track from /v1/music/list or your team's own uploaded music. No music when omitted. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`)."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). The storyboard's title when omitted."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  }
                }
              },
              "example": {
                "storyBrief": "A lighthouse keeper finds a message in a bottle during a storm and decides to answer it.",
                "durationSeconds": 30,
                "model": "grok_imagine_video",
                "storyTone": "drama",
                "presetId": "cinematic",
                "aspectRatio": "ratio_16_9",
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Cinematic successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Cinematic is not available on this platform (a tenant without the feature).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "code": "feature_not_available",
                  "error": "feature_not_available",
                  "message": "Cinematic videos are not available on this platform."
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/project/list": {
      "get": {
        "summary": "List Projects",
        "description": "Your team's projects, newest first, with the total count for paging: the ones made through the API and the ones made in the dashboard. Each item is the object GET /v1/project/{projectId} returns, with its latest render under `video`. Unlike List Videos, a project is listed from the moment it is created, including one that failed before rendering. Templates are left out.",
        "operationId": "listProjects",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Only projects in this state. Case-insensitive; any other value answers 400.",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "processing",
                "completed",
                "failed"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Only projects of this format, named by its create endpoint: `add-captions`, `article-to-video`, `cinematic`, `clone-video`, `extend-video`, `hook-demo`, `music-to-video`, `pdf-to-brainrot`, `pdf-to-video`, `podcast-interview`, `prompt-to-video`, `quiz-video`, `reddit-story`, `remove-background`, `scenes`, `script-to-video`, `scrolling-video`, `talking-avatar`, `tiktok-slideshow`, `ugc-ads`, `ugc-studio`. `ugc-ads` and `ugc-studio` are the same type (`ugc_ads`), so either lists both. The stored type a project answers with (`script_to_video`, `caption_video`, …) works too. `all` or left out: every type. Any other value answers 400.",
            "schema": {
              "type": "string",
              "default": "all"
            },
            "example": "script-to-video"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Only projects made through the API (`api`), in the dashboard (`web`) or by an AI app through the MCP server (`mcp`). All when left out; any other value answers 400.",
            "schema": {
              "type": "string",
              "enum": [
                "api",
                "web",
                "mcp"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Only projects whose name contains this text (case-insensitive).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Projects to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Projects",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "projects": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Project"
                          },
                          "description": "The projects on this page."
                        },
                        "total": {
                          "type": "integer",
                          "description": "How many projects match the filters, across all pages."
                        },
                        "limit": {
                          "type": "integer",
                          "description": "The page size used."
                        },
                        "offset": {
                          "type": "integer",
                          "description": "The offset used."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Projects fetched successfully",
                  "data": {
                    "projects": [
                      {
                        "id": "cm4x9q1r30005ab12gh34ij78",
                        "name": "Morning routine tips",
                        "type": "script_to_video",
                        "status": "processing",
                        "source": "api",
                        "progress": 35,
                        "message": "Generating media...",
                        "usedCredits": 42,
                        "metadata": {},
                        "createdAt": "2026-10-01T11:02:00.000Z",
                        "updatedAt": "2026-10-01T11:03:10.000Z",
                        "video": null
                      },
                      {
                        "id": "cm4x9k2p10001ab12cd34ef56",
                        "name": "Serum ad",
                        "type": "ugc_ads",
                        "status": "completed",
                        "source": "api",
                        "progress": 100,
                        "message": "Video completed",
                        "usedCredits": 40,
                        "metadata": {
                          "campaignId": "campaign_42"
                        },
                        "createdAt": "2026-10-01T10:00:00.000Z",
                        "updatedAt": "2026-10-01T10:06:00.000Z",
                        "video": {
                          "id": "cm4x9n7q20003ab12xy98zt10",
                          "name": "Serum ad",
                          "projectId": "cm4x9k2p10001ab12cd34ef56",
                          "projectType": "ugc_ads",
                          "status": "COMPLETED",
                          "progress": 100,
                          "message": "Video ready",
                          "url": "https://files.hooked.so/team/videos/cm4x9n7q20003ab12xy98zt10.mp4?X-Amz-Signature=...",
                          "thumbnail": "https://files.hooked.so/team/thumbnails/cm4x9n7q20003ab12xy98zt10.jpg?X-Amz-Signature=...",
                          "durationInFrames": 750,
                          "durationInSeconds": 30,
                          "size": 15728640,
                          "createdAt": "2026-10-01T10:05:00.000Z",
                          "updatedAt": "2026-10-01T10:06:00.000Z"
                        }
                      }
                    ],
                    "total": 12,
                    "limit": 2,
                    "offset": 0
                  }
                }
              }
            }
          },
          "400": {
            "description": "Unknown `status`, `type` or `source`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "status: Must be one of draft, processing, completed, failed"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/catalog/{name}": {
      "get": {
        "summary": "Get Catalog",
        "operationId": "getCatalog",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "The values a create endpoint takes from a fixed list, read from the same registries the endpoint validates against: every `id` listed is accepted, and a value missing from the list is refused with a 400. Team-scoped where your team can add its own (custom visual styles, reactions). Free and safe to call as often as you like.\n\n| `name` | Field it feeds | Endpoints |\n|---|---|---|\n| `caption-presets` | `caption.preset` | every endpoint that burns captions |\n| `text-styles` | `textSettings.preset` | Hook Demo |\n| `visual-styles` | `presetSettings.preset`, `presetId` | narrated formats with `ai-images` / `ai-videos`, Cinematic. Includes your team's own styles as `custom-<id>` |\n| `motion-styles` | `presetSettings.motionStyleId` | `motion-graphics` media type |\n| `games` | `gameplaySettings.selectedGame` (+ `selectedVideo` from `clips`) | `gameplay` media type |\n| `reactions` | `avatarId` | Hook Demo. Includes your team's own reactions |\n| `video-models` | `presetSettings.aiModel` | `ai-videos` media type |\n| `image-models` | `presetSettings.aiModel` | `ai-images` media type |\n| `cinematic` | `model`, `imageModel`, `storyTone`, `presetId`, `durationSeconds`, `characterIds`, `language`, `aspectRatio` | Cinematic (one item per field) |\n| `camera-moves` | `videoStyle.cameras` | Talking Avatar, UGC Studio (`ugcStudioFormats` says where each is allowed) |\n| `gestures` | `videoStyle.gestures` (send the `id`, the library's own words) | Talking Avatar, UGC Studio |\n| `voice-presets` | `videoStyle.voice`, `hostVoice` | Talking Avatar, UGC Studio, Podcast Interview |\n| `accents` | `videoStyle.accent`, `accent` | Talking Avatar, UGC Studio, Podcast Interview |\n| `formats` | the whole body setup of a dashboard format: `engine` is the create endpoint (`POST /v1/project/create/{engine}`), `settings` the fields to send (`mediaType`, `presetSettings`, `gameplaySettings`, `voiceId`, `aspectRatio`, `platform`); add the content (script, prompt…) yourself | the narrated, UGC, slideshow and story endpoints. Each item also has `family`, `keywords` and `exampleVideoUrl` |\n",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Which catalog.",
            "schema": {
              "type": "string",
              "enum": [
                "caption-presets",
                "text-styles",
                "visual-styles",
                "motion-styles",
                "games",
                "reactions",
                "video-models",
                "image-models",
                "cinematic",
                "camera-moves",
                "gestures",
                "voice-presets",
                "accents",
                "formats"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "items"
                      ],
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CatalogItem"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "items": [
                      {
                        "id": "default",
                        "name": "Default"
                      },
                      {
                        "id": "beast",
                        "name": "Beast"
                      },
                      {
                        "id": "tiktok",
                        "name": "TikTok"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Unknown catalog name (the message lists the valid ones), or `cinematic` where Cinematic is not available",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Catalog \"fonts\" not found. Valid names are: caption-presets, text-styles, visual-styles, motion-styles, games, reactions, video-models, image-models, cinematic, camera-moves, gestures, voice-presets, accents"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/character/list": {
      "get": {
        "summary": "List Characters",
        "operationId": "listCharacters",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Your team's Cinematic characters (Studio → Characters in the dashboard), newest first. Their ids go in `characterIds` of Create Cinematic Video.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size, 1 to 100. Larger values are capped at 100; missing or invalid values fall back to 50.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Characters to skip. Missing or invalid values fall back to 0. You are done when `offset + limit >= total`.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of characters",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "characters",
                        "total",
                        "limit",
                        "offset"
                      ],
                      "properties": {
                        "characters": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Character"
                          }
                        },
                        "total": {
                          "type": "integer",
                          "description": "Every character of the team"
                        },
                        "limit": {
                          "type": "integer"
                        },
                        "offset": {
                          "type": "integer"
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Characters fetched successfully",
                  "data": {
                    "characters": [
                      {
                        "id": "cm4xa1b2c0001cd34ef56gh78",
                        "name": "Mia",
                        "description": "Late 20s, red curly hair, denim jacket",
                        "voiceProfile": "Warm, slightly husky, speaks fast",
                        "presetId": "cinematic",
                        "imageUrl": "https://files.hooked.so/team/public/mia--fid--1a2b.png",
                        "imageStatus": "COMPLETED",
                        "createdAt": "2026-09-30T18:00:00.000Z"
                      }
                    ],
                    "total": 1,
                    "limit": 50,
                    "offset": 0
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/character/{characterId}": {
      "get": {
        "summary": "Get Character",
        "operationId": "getCharacter",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "One Cinematic character of your team.",
        "parameters": [
          {
            "name": "characterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The character id, from List Characters."
          }
        ],
        "responses": {
          "200": {
            "description": "Character found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Character"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character fetched successfully",
                  "data": {
                    "id": "cm4xa1b2c0001cd34ef56gh78",
                    "name": "Mia",
                    "description": "Late 20s, red curly hair, denim jacket",
                    "voiceProfile": "Warm, slightly husky, speaks fast",
                    "presetId": "cinematic",
                    "imageUrl": "https://files.hooked.so/team/public/mia--fid--1a2b.png",
                    "imageStatus": "COMPLETED",
                    "createdAt": "2026-09-30T18:00:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such character in your team (another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Character not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          }
        }
      },
      "patch": {
        "summary": "Update Character",
        "operationId": "updateCharacter",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Changes what the dashboard's character editor changes: name, visual description, voice description, style and photo. Fields you leave out keep their value. A new photo comes from `mediaId`, `imageUrl` or `generatePortrait` as in Create Character; `mediaId: null` removes it. Answers 202 when the new photo is still being imported or generated.",
        "parameters": [
          {
            "name": "characterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The character id, from List Characters."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "New name."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 2000,
                    "description": "New visual description; `null` clears it."
                  },
                  "voiceProfile": {
                    "type": "string",
                    "nullable": true,
                    "maxLength": 500,
                    "description": "New voice description; `null` clears it."
                  },
                  "presetId": {
                    "type": "string",
                    "description": "New visual style (`visual-styles` catalog id or your `custom-<id>`)."
                  },
                  "mediaId": {
                    "type": "string",
                    "nullable": true,
                    "description": "A `COMPLETED` image of your library as the new photo; `null` removes the photo."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "A public https JPEG, PNG, WEBP or GIF. It is imported into your library after the response (free, counted against your storage); `imageStatus` is `PROCESSING` until then."
                  },
                  "generatePortrait": {
                    "type": "boolean",
                    "description": "`true` generates a portrait from `description` in the character's style, after the response. Charged one image at `imageModel` (4 credits with the default); given back if it fails."
                  },
                  "imageModel": {
                    "type": "string",
                    "description": "Image model for `generatePortrait` (an `image-models` catalog id). Default `gpt_image_2`."
                  }
                }
              },
              "example": {
                "name": "Mia Torres"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Character updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CharacterWritten"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character updated",
                  "data": {
                    "id": "cm4xa1b2c0001cd34ef56gh78",
                    "name": "Mia Torres",
                    "description": "Late 20s, red curly hair, denim jacket",
                    "voiceProfile": "Warm, slightly husky, speaks fast",
                    "presetId": "cinematic",
                    "imageUrl": "https://files.hooked.so/team/public/mia--fid--1a2b.png",
                    "imageStatus": "COMPLETED",
                    "createdAt": "2026-09-30T18:00:00.000Z",
                    "creditsCharged": 0
                  }
                }
              }
            }
          },
          "202": {
            "description": "Character updated; its new photo is being imported or generated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CharacterWritten"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character updated; its photo is processing",
                  "data": {
                    "id": "cm4xa1b2c0001cd34ef56gh78",
                    "name": "Mia",
                    "description": "Late 20s, red curly hair, denim jacket",
                    "voiceProfile": "Warm, slightly husky, speaks fast",
                    "presetId": "cinematic",
                    "imageUrl": null,
                    "imageStatus": "PROCESSING",
                    "createdAt": "2026-09-30T18:00:00.000Z",
                    "creditsCharged": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, photo or style; nothing was saved or charged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "mediaId: Pass only one of mediaId, imageUrl or generatePortrait"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such character in your team (another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Character not found"
                }
              }
            }
          },
          "409": {
            "description": "A new photo was sent while the current one is still processing, or a request with the same `Idempotency-Key` is still running. Nothing was changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": false,
                  "message": "The character's photo is still processing; try again when imageStatus is not PROCESSING"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to update the character"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete Character",
        "operationId": "deleteCharacter",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Deletes a character for good, like Studio → Characters. **This cannot be undone.** It is never refused: Cinematic projects that cast it keep their own copy of the cast. `projectsUsing` is how many Cinematic projects cast it (the number the dashboard warns with). Its photos stay in your media library.",
        "parameters": [
          {
            "name": "characterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The character id, from List Characters."
          }
        ],
        "responses": {
          "200": {
            "description": "Character deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "characterId",
                        "deleted",
                        "projectsUsing"
                      ],
                      "properties": {
                        "characterId": {
                          "type": "string",
                          "description": "The character that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        },
                        "projectsUsing": {
                          "type": "integer",
                          "description": "Cinematic projects that had cast it. They keep working."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character deleted",
                  "data": {
                    "characterId": "cm4xa1b2c0001cd34ef56gh78",
                    "deleted": true,
                    "projectsUsing": 2
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such character in your team (another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Character not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Internal server error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "summary": "Get Account",
        "operationId": "getAccount",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "The team behind your API key: plan, billing mode, credit balance, storage and, for a byok team, which provider keys are set and working. Never returns a key value. Free and safe to call before a batch to check the balance.",
        "responses": {
          "200": {
            "description": "The account",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Account fetched successfully",
                  "data": {
                    "team": {
                      "id": "cm4w0team0001ab12cd34ef56",
                      "name": "Acme Growth"
                    },
                    "billingMode": "managed",
                    "plan": {
                      "name": "pro",
                      "status": "active",
                      "renewsAt": "2026-11-01T00:00:00.000Z"
                    },
                    "credits": {
                      "balance": 1840,
                      "chargedForGeneration": true
                    },
                    "storage": {
                      "usedBytes": 3221225472,
                      "limitBytes": 53687091200
                    },
                    "keys": null
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/project/create/music-to-video": {
      "post": {
        "summary": "Create Music to Video",
        "description": "Turns a song into a music video: the lyrics are transcribed and the visuals (AI images or clips, your own media or gameplay) follow them, cut to the beat, with the lyrics as captions. Send the song as a direct link to the audio file (`audioUrl`, up to 10 MB: MP3, M4A, AAC, WAV or OGG) or as `musicId` (a track from /v1/music/list or one of your team's own audio files), not both. The song is downloaded and checked in the request: a private or local address, a file over the limit or anything that is not audio answers 400 before anything is created. It is stored in your media library as a new audio file (it counts toward your storage). Answers with a `projectId` and status `processing`; the transcription, the media and the render run after that. The song needs vocals: a track without lyrics fails (the credits come back and the failure webhook is sent). BYOK: needs OpenRouter; `aiModel: \"gemini_omni_flash\"` also needs Gemini. No ElevenLabs: nothing is narrated.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`).",
        "operationId": "createMusicToVideo",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "audioUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "A public https link to the song file itself (MP3, M4A, AAC, WAV or OGG, up to 10 MB), e.g. a file in your own storage or a Suno CDN link (`https://cdn1.suno.ai/<id>.mp3`). Hooked downloads it and reads its type from the file: a private or local address (or a redirect to one), a file over 10 MB, a page (Spotify, YouTube, a Suno song page) or anything that is not audio answers 400. Send this or `musicId`, not both."
                  },
                  "musicId": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "Instead of `audioUrl`: a track from /v1/music/list or one of your team's own audio files (up to 25 MB). The file is copied for this video. An ID that is neither answers 400 (`musicId: Music \"<id>\" not found.`). Most library tracks are instrumental: the video follows the lyrics, so use a song with vocals."
                  },
                  "mediaType": {
                    "type": "string",
                    "enum": [
                      "ai-images",
                      "ai-videos",
                      "media",
                      "gameplay"
                    ],
                    "description": "Where the visuals come from:\n- `ai-images` (default): one AI image per lyric section (`presetSettings`: `preset`, `aiModel`, `characterIds`).\n- `ai-videos`: one AI video clip per section (`presetSettings`: `preset`, `quality`, `aiModel`, `isContinuous`, `characterIds`).\n- `media`: your own images and videos from the media library (`media` required).\n- `gameplay`: a gameplay clip in the background (`gameplaySettings`).\n\n`motion-graphics` is not available for this format (400).",
                    "default": "ai-images"
                  },
                  "presetSettings": {
                    "type": "object",
                    "description": "Visual settings for `ai-images` and `ai-videos`; not used by `media` and `gameplay`. Each field says which media types read it.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "realistic",
                          "cinematic",
                          "anime",
                          "real-anime",
                          "retro-anime",
                          "cyberpunk-anime",
                          "ghibli-studio",
                          "pixar",
                          "cartoon",
                          "comic-book",
                          "claymation",
                          "fantasy",
                          "80s-fantasy-movie",
                          "creative",
                          "art-style",
                          "sketch-black-and-white",
                          "sketch-color",
                          "japanese-ink",
                          "ink-style",
                          "haunted-linework",
                          "neon-futuristic",
                          "pixel-art",
                          "collage",
                          "lego",
                          "technical-blueprints",
                          "stickman",
                          "nursery-rhyme",
                          "south-park",
                          "skeleton-3d",
                          "fruit-people",
                          "talking-fruit",
                          "talking-objects",
                          "talking-organs",
                          "minecraft",
                          "gta-v",
                          "free-fire",
                          "fortnite",
                          "roblox",
                          "pubg",
                          "bitlife",
                          "space-marines-40k",
                          "bombardiro-crocodilo",
                          "tralalero-tralala",
                          "demon-slayer",
                          "dragon-ball",
                          "one-piece",
                          "pokemon",
                          "naruto",
                          "attack-on-titan",
                          "final-fantasy",
                          "mecha-break",
                          "alien-stage",
                          "marvel",
                          "dc",
                          "star-wars",
                          "star-trek",
                          "harry-potter",
                          "lord-of-the-rings",
                          "game-of-thrones",
                          "doctor-who",
                          "sherlock-holmes",
                          "stranger-things",
                          "squid-game",
                          "wednesday",
                          "zelda",
                          "genshin-impact",
                          "dungeons-and-dragons",
                          "rick-and-morty",
                          "amazing-digital-circus"
                        ],
                        "default": "realistic",
                        "description": "`ai-images` / `ai-videos`: the visual style, or `custom-<id>` for one of your team's custom styles. Any other value answers 400."
                      },
                      "quality": {
                        "type": "string",
                        "enum": [
                          "base",
                          "pro",
                          "ultra"
                        ],
                        "default": "base",
                        "description": "`ai-videos`: picks the video model when `aiModel` is not set. Not used by `ai-images` (use `aiModel`)."
                      },
                      "aiModel": {
                        "type": "string",
                        "enum": [
                          "nano_banana",
                          "nano_banana_2",
                          "nano_banana_pro",
                          "seedream_4_5",
                          "seedream_5_0",
                          "gpt_image_2",
                          "nano_banana_2_1",
                          "gpt_image_2_5_flare",
                          "gpt_image_2_5_sunburst",
                          "grok_imagine_image",
                          "seedance_1_5_pro",
                          "seedance_2_0",
                          "seedance_2_0_mini",
                          "seedance_2_0_fast",
                          "seedance_2_5",
                          "grok_imagine_video_lite",
                          "kling_3_0",
                          "kling_3_0_pro",
                          "veo_3_fast",
                          "veo_3",
                          "veo_3_1_lite",
                          "wan_2_7_i2v",
                          "grok_imagine_video",
                          "gemini_omni_flash"
                        ],
                        "description": "`ai-images` / `ai-videos`: the model that generates the media, instead of the default. It must match `mediaType`, otherwise the request answers 400 (`presetSettings.aiModel: \"<model>\" does not generate <mediaType>`).\n- `ai-images`: `nano_banana`, `nano_banana_2`, `nano_banana_pro`, `seedream_4_5`, `seedream_5_0`, `gpt_image_2`, `grok_imagine_image`.\n- `ai-videos`: `seedance_1_5_pro`, `seedance_2_0`, `seedance_2_0_mini`, `seedance_2_0_fast`, `kling_3_0`, `kling_3_0_pro`, `seedance_2_5`, `grok_imagine_video_lite`, `veo_3_fast`, `veo_3`, `veo_3_1_lite`, `wan_2_7_i2v`, `grok_imagine_video`, `gemini_omni_flash`.\n\nBYOK: `gemini_omni_flash` needs the Gemini key."
                      },
                      "isContinuous": {
                        "type": "boolean",
                        "default": false,
                        "description": "`ai-videos` only: chain the clips frame to frame (each clip starts on the last frame of the one before). Off by default, as in the dashboard."
                      },
                      "characterIds": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "`ai-images` / `ai-videos`: IDs of characters saved in your team's Characters library, to keep the same people across scenes."
                      }
                    }
                  },
                  "gameplaySettings": {
                    "type": "object",
                    "description": "`mediaType: \"gameplay\"` only: the background clip.",
                    "properties": {
                      "selectedGame": {
                        "type": "string",
                        "enum": [
                          "minecraft",
                          "subway-s",
                          "temple-run",
                          "gta",
                          "fortnite",
                          "roblox",
                          "free-fire",
                          "custom"
                        ],
                        "default": "minecraft",
                        "description": "The game, or `custom` to play a video from your own media library. Any other value answers 400."
                      },
                      "selectedVideo": {
                        "type": "string",
                        "default": "minecraft-1",
                        "description": "The clip, as `<game>-<n>`: `minecraft-1`…`minecraft-9`, `subway-s-1`…`subway-s-11`, `temple-run-1`…`temple-run-8`, `gta-1`…`gta-12`, `fortnite-1`…`fortnite-5`, `roblox-1`, `free-fire-1`. A clip that does not exist plays the game's first clip. With `selectedGame: \"custom\"`, the ID of a video in your media library (400 when it is not one)."
                      }
                    }
                  },
                  "media": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "string",
                      "description": "Media ID from your library"
                    },
                    "description": "IDs of images or videos in your team's media library (max 50). Required for `mediaType: \"media\"`; ignored for the other media types. An ID that is not in your library answers 400 (`media: Media \"<id>\" not found`), and so does a media that is not `COMPLETED` yet."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Project name (max 100 characters). Generated from the song when omitted."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "default": "ratio_9_16",
                    "description": "Vertical, horizontal or square."
                  },
                  "language": {
                    "type": "string",
                    "pattern": "^[a-zA-Z]{2}$",
                    "description": "Two-letter ISO 639-1 code of the song's lyrics. It guides the transcription; detected from the song when omitted."
                  },
                  "caption": {
                    "type": "object",
                    "description": "Burned-in captions of the lyrics.",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "enum": [
                          "default",
                          "beast",
                          "umi",
                          "tiktok",
                          "wrap1",
                          "wrap2",
                          "ariel",
                          "hooked",
                          "classic",
                          "active",
                          "bubble",
                          "glass",
                          "comic",
                          "glow",
                          "pastel",
                          "neon",
                          "retroTV",
                          "red",
                          "marker",
                          "modern",
                          "blue",
                          "vivid"
                        ],
                        "default": "wrap1",
                        "description": "Caption style. Any other value answers 400."
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "default": "bottom",
                        "description": "Caption position."
                      },
                      "disabled": {
                        "type": "boolean",
                        "default": false,
                        "description": "`true` renders the video without captions."
                      }
                    }
                  },
                  "addStickers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Add emoji/GIF stickers anchored to the lyrics."
                  },
                  "content": {
                    "type": "object",
                    "description": "Branding.",
                    "properties": {
                      "brandingLogo": {
                        "type": "object",
                        "description": "Your logo over the whole video. Drawn only with `enabled: true` and a `url`.",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "default": false
                          },
                          "url": {
                            "type": "string",
                            "description": "Public URL of the logo image (PNG with transparency works best)."
                          },
                          "position": {
                            "type": "string",
                            "enum": [
                              "top-left",
                              "top-right",
                              "bottom-left",
                              "bottom-right"
                            ],
                            "default": "bottom-right"
                          },
                          "size": {
                            "type": "number",
                            "minimum": 20,
                            "maximum": 200,
                            "default": 100,
                            "description": "Logo size (20-200)."
                          }
                        }
                      }
                    }
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "format": "uri",
                    "description": "HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of \"<t>.<raw body>\") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Stored on the project and sent back in the webhook payload. The key `automationId` is reserved for dashboard automations and is removed."
                  },
                  "addSoundWave": {
                    "type": "boolean",
                    "default": true,
                    "description": "Overlay an audio-reactive sound wave synced to the song (its style can be changed in the editor)."
                  },
                  "visualGuidelines": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Extra direction for the AI visuals (`ai-images` / `ai-videos`): a setting, a palette, what to avoid. Max 2,000 characters."
                  }
                }
              },
              "example": {
                "audioUrl": "https://example.com/music/summer-nights.mp3",
                "mediaType": "ai-images",
                "presetSettings": {
                  "preset": "anime"
                },
                "addSoundWave": true,
                "aspectRatio": "ratio_9_16",
                "caption": {
                  "preset": "tiktok"
                },
                "webhook": "https://yoursite.com/webhook?token=YOUR_SECRET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectCreateResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "projectId": "clx9p2k4m0001abcd1234efgh",
                    "status": "processing"
                  },
                  "message": "Music to Video successfully created"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/v1/media/generate/image": {
      "post": {
        "summary": "Generate Image",
        "description": "The dashboard's Media Generator, one image: a prompt, a model of GET /v1/catalog/image-models, an optional visual style and up to the model's `maxReferenceImages` images of your library to keep (people, products, a look). Same models, price and result as the dashboard; the image lands in your media library. Answers 202 at once with the new `mediaId`; the generation runs after the response. Poll Get Media (GET /v1/media/{mediaId}) until `status` is `COMPLETED` (its `url` is the file) or `FAILED`. Or pass a `webhook` to be told once it settles (`media.completed` / `media.failed`) instead of polling every few seconds (an image takes seconds, a clip a few minutes). A generation that fails gives its credits back; one still running after 60 minutes is given up on, reads as `FAILED` and is refunded too.\n\nBYOK: needs your OpenRouter key.",
        "operationId": "generateImage",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "What to generate."
                  },
                  "model": {
                    "type": "string",
                    "default": "gpt_image_2",
                    "description": "An `id` of GET /v1/catalog/image-models."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_1_1",
                      "ratio_16_9"
                    ],
                    "default": "ratio_9_16"
                  },
                  "style": {
                    "type": "string",
                    "description": "An `id` of GET /v1/catalog/visual-styles (your own `custom-<id>` included): its look is added to the prompt. Without `referenceMediaIds`, a library style also sends its sample images as references."
                  },
                  "referenceMediaIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Ids of finished images of your media library for the model to keep. At most the model's `maxReferenceImages` (400 above it, or when the model takes none)."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Name in your library. Defaults to `Generated Image - <date>` / `Generated Video - <date>`."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Public https URL told once when the media is `COMPLETED` or `FAILED` (events `media.completed` / `media.failed`, signed like every Hooked webhook). See [Webhooks](/guides/webhooks#media-webhooks)."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload."
                  }
                }
              },
              "example": {
                "prompt": "A glass serum bottle on wet black stone, soft studio light, water droplets",
                "model": "gpt_image_2",
                "aspectRatio": "ratio_1_1",
                "name": "Serum hero shot"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Generation started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The new library media. Follow it with GET /v1/media/{mediaId}."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING"
                          ],
                          "description": "Always `PROCESSING` here"
                        },
                        "model": {
                          "type": "string",
                          "description": "The model generating it"
                        },
                        "aspectRatio": {
                          "type": "string",
                          "description": "The ratio being generated"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits charged (refunded if it fails); 0 for teams on their own provider keys (BYOK), who are not charged"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "image"
                          ]
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Image generation started",
                  "data": {
                    "status": "PROCESSING",
                    "mediaId": "cm4x9r2t50007ab12gh34ij78",
                    "type": "image",
                    "model": "gpt_image_2",
                    "aspectRatio": "ratio_1_1",
                    "usedCredits": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, a field that fails validation (`prompt: Required`, `model: Invalid model ...`, `style: ...`, `aspectRatio: ...`), more references than the model takes, or a `referenceMediaIds` id that is not a finished image of your library",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "model: Invalid model \"dall_e\". Allowed values are: gpt_image_2, nano_banana_pro, nano_banana_2, nano_banana, grok_imagine_image, seedream_5_0, seedream_4_5"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Unexpected error; anything charged is given back",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to start the image generation"
                }
              }
            }
          }
        }
      }
    },
    "/v1/media/generate/video": {
      "post": {
        "summary": "Generate Video",
        "description": "The dashboard's Media Generator, one clip: text-to-video, or image-to-video from a start image (`imageMediaId` of your library, or a public https `imageUrl` that is imported into it first). The model (GET /v1/catalog/video-models) decides what else it takes: `durations`, `resolutions`, `aspectRatios`, `startFrame`, `endFrame` (`endImageMediaId`), `maxReferenceImages` (`referenceMediaIds`) and `makesSound` (`audio`); a field the model cannot use answers 400 before anything is charged. Priced per second like the dashboard. Answers 202 at once with the new `mediaId`; the generation runs after the response. Poll Get Media (GET /v1/media/{mediaId}) until `status` is `COMPLETED` (its `url` is the file) or `FAILED`. Or pass a `webhook` to be told once it settles (`media.completed` / `media.failed`) instead of polling every few seconds (an image takes seconds, a clip a few minutes). A generation that fails gives its credits back; one still running after 60 minutes is given up on, reads as `FAILED` and is refunded too.\n\nBYOK: needs your OpenRouter key; `gemini_omni_flash` also needs your Gemini key.",
        "operationId": "generateVideo",
        "tags": [
          "Media"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "prompt"
                ],
                "properties": {
                  "prompt": {
                    "type": "string",
                    "maxLength": 5000,
                    "description": "What to generate."
                  },
                  "model": {
                    "type": "string",
                    "default": "seedance_2_0",
                    "description": "An `id` of GET /v1/catalog/video-models."
                  },
                  "imageMediaId": {
                    "type": "string",
                    "description": "A finished image of your library to animate from (models with `startFrame`)."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Or a public https URL of the start image (JPEG, PNG or WEBP, up to 25 MB): it is imported into your library first. Not with `imageMediaId`."
                  },
                  "endImageMediaId": {
                    "type": "string",
                    "description": "A library image for the clip to end on (models with `endFrame`). Needs a start image."
                  },
                  "referenceMediaIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Library images of a character or style to keep, at most the model's `maxReferenceImages`."
                  },
                  "durationSeconds": {
                    "type": "number",
                    "description": "Clip length. Snapped up to the next of the model's `durations` (at most its longest); defaults to the model's `defaultDuration`."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_1_1",
                      "ratio_16_9"
                    ],
                    "description": "One of the model's `aspectRatios`. Defaults to the start image's ratio when the model films it, else `ratio_9_16`."
                  },
                  "resolution": {
                    "type": "string",
                    "description": "One of the model's `resolutions`; defaults to its `defaultResolution`. Some models are priced by resolution."
                  },
                  "audio": {
                    "type": "boolean",
                    "description": "Ask for sound with the clip (models with `makesSound`). Left out, the model's own default."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255,
                    "description": "Name in your library. Defaults to `Generated Image - <date>` / `Generated Video - <date>`."
                  },
                  "webhook": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "Public https URL told once when the media is `COMPLETED` or `FAILED` (events `media.completed` / `media.failed`, signed like every Hooked webhook). See [Webhooks](/guides/webhooks#media-webhooks)."
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Any JSON object of your own (max 5 KB). Sent back in the webhook payload."
                  }
                }
              },
              "example": {
                "prompt": "Slow push-in on the serum bottle as water droplets roll down the glass",
                "model": "seedance_2_0",
                "imageMediaId": "cm4x9r2t50007ab12gh34ij78",
                "durationSeconds": 5,
                "aspectRatio": "ratio_9_16"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Generation started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The new library media. Follow it with GET /v1/media/{mediaId}."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "PROCESSING"
                          ],
                          "description": "Always `PROCESSING` here"
                        },
                        "model": {
                          "type": "string",
                          "description": "The model generating it"
                        },
                        "aspectRatio": {
                          "type": "string",
                          "description": "The ratio being generated"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits charged (refunded if it fails); 0 for teams on their own provider keys (BYOK), who are not charged"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "video"
                          ]
                        },
                        "durationSeconds": {
                          "type": "number",
                          "description": "The clip length generated and charged (snapped up to the model's grid)"
                        },
                        "resolution": {
                          "type": "string",
                          "nullable": true,
                          "description": "The resolution generated, or null for a model without a choice"
                        },
                        "sourceMediaId": {
                          "type": "string",
                          "nullable": true,
                          "description": "The start image (the imported one when `imageUrl` was used), or null for text-to-video"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Video generation started",
                  "data": {
                    "status": "PROCESSING",
                    "mediaId": "cm4xa1b2c0009ab12kl56mn90",
                    "type": "video",
                    "model": "seedance_2_0",
                    "aspectRatio": "ratio_9_16",
                    "durationSeconds": 5,
                    "resolution": "1080p",
                    "sourceMediaId": "cm4x9r2t50007ab12gh34ij78",
                    "usedCredits": 155
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, a field that fails validation, a field the model cannot use (`imageMediaId: <model> does not animate an image`, `durationSeconds: ...`, `aspectRatio: ...`, `resolution: ...`, `audio: ...`), an id that is not a finished image of your library, or an `imageUrl` that is not public https or could not be imported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "imageMediaId: Image \"cm4x9r2t50007ab12gh34ij78\" not found"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Unexpected error; anything charged is given back",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to start the video generation"
                }
              }
            }
          }
        }
      }
    },
    "/v1/project/{projectId}/captions": {
      "get": {
        "summary": "Get Project Captions",
        "description": "The caption lines of a project, numbered as [Edit Project](/api-reference/project/edit) takes them in `captionSegments`, with each word and its timing. Read them before correcting a line: a new caption style re-cuts the lines, so the numbers change after a `caption.preset` edit. A project without captions answers `hasCaptions: false` and no segments.",
        "operationId": "getProjectCaptions",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `projectId` a create endpoint answered, or one from GET /v1/project/list.",
            "example": "cm4x9k2p10001ab12cd34ef56"
          }
        ],
        "responses": {
          "200": {
            "description": "The project's captions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "projectId",
                        "hasCaptions",
                        "disabled",
                        "preset",
                        "alignment",
                        "segments"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "hasCaptions": {
                          "type": "boolean",
                          "description": "Whether the project has captions at all. Captions cannot be added to a project that has none."
                        },
                        "disabled": {
                          "type": "boolean",
                          "description": "`true` when the captions are switched off (they stay in the project and render again once switched on)."
                        },
                        "preset": {
                          "type": "string",
                          "nullable": true,
                          "description": "The caption style (an id of GET /v1/catalog/caption-presets), or `null` when unknown."
                        },
                        "alignment": {
                          "type": "string",
                          "nullable": true,
                          "enum": [
                            "top",
                            "middle",
                            "bottom"
                          ],
                          "description": "Where the captions sit: `top`, `middle` or `bottom`."
                        },
                        "segments": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "index",
                              "text",
                              "startMs",
                              "endMs",
                              "words"
                            ],
                            "properties": {
                              "index": {
                                "type": "integer",
                                "description": "The number to send in `captionSegments[].index`. Counts from 0 across the whole video."
                              },
                              "text": {
                                "type": "string",
                                "description": "The line as it shows on screen (before the style's upper/lower case)."
                              },
                              "startMs": {
                                "type": "integer",
                                "description": "When the line appears, in milliseconds from the start of the video."
                              },
                              "endMs": {
                                "type": "integer",
                                "description": "When the line goes away, in milliseconds from the start of the video."
                              },
                              "words": {
                                "type": "array",
                                "description": "The line's words with their times (milliseconds from the start of the video); each word is highlighted while it plays.",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "word",
                                    "startMs",
                                    "endMs"
                                  ],
                                  "properties": {
                                    "word": {
                                      "type": "string"
                                    },
                                    "startMs": {
                                      "type": "integer"
                                    },
                                    "endMs": {
                                      "type": "integer"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Captions fetched successfully",
                  "data": {
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "hasCaptions": true,
                    "disabled": false,
                    "preset": "classic",
                    "alignment": "bottom",
                    "segments": [
                      {
                        "index": 0,
                        "text": "Three habits that",
                        "startMs": 0,
                        "endMs": 1200,
                        "words": [
                          {
                            "word": "Three",
                            "startMs": 0,
                            "endMs": 400
                          },
                          {
                            "word": "habits",
                            "startMs": 400,
                            "endMs": 800
                          },
                          {
                            "word": "that",
                            "startMs": 800,
                            "endMs": 1200
                          }
                        ]
                      },
                      {
                        "index": 1,
                        "text": "changed my mornings",
                        "startMs": 1200,
                        "endMs": 2600,
                        "words": [
                          {
                            "word": "changed",
                            "startMs": 1200,
                            "endMs": 1700
                          },
                          {
                            "word": "my",
                            "startMs": 1700,
                            "endMs": 1900
                          },
                          {
                            "word": "mornings",
                            "startMs": 1900,
                            "endMs": 2600
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not found. Another team's project, or an id that is not one, answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/project/{projectId}/scenes": {
      "get": {
        "summary": "Get Project Scenes",
        "description": "The pictures and clips of a project in play order, numbered as [Edit Project](/api-reference/project/edit) takes them in `scenes`, with when each is on screen, what the captions say meanwhile and the prompt it was generated from. Read them to change one moment of a video: make a new image or clip and swap it in, then render again.",
        "operationId": "getProjectScenes",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `projectId` a create endpoint answered, or one from GET /v1/project/list.",
            "example": "cm4x9k2p10001ab12cd34ef56"
          }
        ],
        "responses": {
          "200": {
            "description": "The project's scenes",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "projectId",
                        "aspectRatio",
                        "scenes"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "aspectRatio": {
                          "type": "string",
                          "nullable": true,
                          "description": "The project's shape (`ratio_9_16`, `ratio_1_1`, `ratio_16_9`): generate new images and clips with it."
                        },
                        "scenes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": [
                              "index",
                              "kind",
                              "startMs",
                              "endMs",
                              "text",
                              "mediaId",
                              "url",
                              "prompt",
                              "replaceable"
                            ],
                            "properties": {
                              "index": {
                                "type": "integer",
                                "description": "The number to send in `scenes[].index` of Edit Project. Counts from 0 in play order."
                              },
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "image",
                                  "video"
                                ],
                                "description": "An image or a clip. A scene is swapped for media of the same kind."
                              },
                              "startMs": {
                                "type": "integer",
                                "description": "When it appears, in milliseconds from the start of the video."
                              },
                              "endMs": {
                                "type": "integer",
                                "description": "When it leaves, in milliseconds from the start of the video."
                              },
                              "text": {
                                "type": "string",
                                "description": "What the captions say while it is on screen; empty when nothing."
                              },
                              "mediaId": {
                                "type": "string",
                                "nullable": true,
                                "description": "The library media it shows, or `null` when it was made by the generation without one."
                              },
                              "url": {
                                "type": "string",
                                "description": "The file it shows (signed, valid for a while)."
                              },
                              "prompt": {
                                "type": "string",
                                "nullable": true,
                                "description": "The prompt it was generated from, to make a new version of it; `null` when it was not generated."
                              },
                              "replaceable": {
                                "type": "boolean",
                                "description": "`false` for a clip that plays its own sound (an avatar speaking, a character's lines): swapping it would drop that sound, so it is edited in the dashboard."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Scenes fetched successfully",
                  "data": {
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "aspectRatio": "ratio_9_16",
                    "scenes": [
                      {
                        "index": 0,
                        "kind": "image",
                        "startMs": 0,
                        "endMs": 2400,
                        "text": "Three habits that changed my mornings",
                        "mediaId": "cm4x9p3r40005ab12gh56ij11",
                        "url": "https://assets.example.com/scene-0.png",
                        "prompt": "A sunrise over a quiet kitchen, warm light, steam rising from a coffee cup",
                        "replaceable": true
                      },
                      {
                        "index": 1,
                        "kind": "video",
                        "startMs": 2400,
                        "endMs": 6000,
                        "text": "Try them",
                        "mediaId": null,
                        "url": "https://assets.example.com/scene-1.mp4",
                        "prompt": null,
                        "replaceable": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not found. Another team's project, or an id that is not one, answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/project/{projectId}/edit": {
      "patch": {
        "summary": "Edit Project",
        "description": "A few targeted changes to a finished project, saved to its editor timeline exactly as the dashboard editor saves them: caption style, position and on/off, the text of caption lines, the background music (track and volume), the branding logo and the picture or clip of a scene. Free, and nothing is rendered: call POST /v1/render afterwards for a new video. Anything else (voice, script, clips with their own sound, timing, text layers...) is edited in the dashboard. Refused with 409 while the project is generating, while one of its videos renders, or when the timeline was saved elsewhere (the dashboard editor) during the request.",
        "operationId": "editProject",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The `projectId` a create endpoint answered, or one from GET /v1/project/list.",
            "example": "cm4x9k2p10001ab12cd34ef56"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "description": "Send at least one of the five groups. A field that is not listed here is refused with a 400: edit anything else in the dashboard.",
                "properties": {
                  "caption": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "The captions' style, position and on/off switch. Applies to every caption layer of the project (a template project has one per scene).",
                    "properties": {
                      "preset": {
                        "type": "string",
                        "description": "A caption style: an id of GET /v1/catalog/caption-presets (`classic`, `beast`...). Sets the style's look, box and entrance animation, and re-cuts the lines to fit, so segment numbers change: read [Get Project Captions](/api-reference/project/captions) again before correcting text. Any colour or font tweaks made in the editor are replaced by the style's.",
                        "example": "beast"
                      },
                      "alignment": {
                        "type": "string",
                        "enum": [
                          "top",
                          "middle",
                          "bottom"
                        ],
                        "description": "Move the captions to the top, middle or bottom of the frame.",
                        "example": "bottom"
                      },
                      "disabled": {
                        "type": "boolean",
                        "description": "`true` hides the captions in the render; `false` shows them again. Nothing is deleted.",
                        "example": false
                      }
                    }
                  },
                  "captionSegments": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 500,
                    "description": "New text for caption lines, by the `index` [Get Project Captions](/api-reference/project/captions) answered (each index once). The line keeps its start and end; its words share that time evenly, as when you retype a line in the editor. Applied before `caption.preset`, so the indexes are the ones you read.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "index",
                        "text"
                      ],
                      "properties": {
                        "index": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "The segment's `index`.",
                          "example": 1
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 500,
                          "description": "The corrected line. Not empty.",
                          "example": "changed my mornings forever"
                        }
                      }
                    }
                  },
                  "music": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "The background music. Not available for the song of a Music to Video project.",
                    "properties": {
                      "musicId": {
                        "type": "string",
                        "nullable": true,
                        "description": "A track of GET /v1/music/list (library or your own uploads) in place of the current one, with the same timing; `null` removes the music. When the project has no music, the track is added from start to end at volume 0.5. A track shorter than the video stops when it ends.",
                        "example": "12"
                      },
                      "volume": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "description": "Music volume, 0 (muted) to 1 (full). Not with `musicId: null`.",
                        "example": 0.3
                      }
                    }
                  },
                  "branding": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "The logo over the video (the branding logo a create request can add). Without a logo yet, `logoMediaId` adds one over the whole video.",
                    "properties": {
                      "logoMediaId": {
                        "type": "string",
                        "nullable": true,
                        "description": "An image of your media library (GET /v1/media/list, `COMPLETED`) as the logo; `null` removes the logo.",
                        "example": "cm4x9p3r40005ab12gh56ij78"
                      },
                      "position": {
                        "type": "string",
                        "enum": [
                          "top-left",
                          "top-right",
                          "bottom-left",
                          "bottom-right"
                        ],
                        "description": "The corner the logo sits in. New logos default to `bottom-right`.",
                        "example": "top-right"
                      },
                      "size": {
                        "type": "integer",
                        "minimum": 20,
                        "maximum": 200,
                        "description": "The logo's width and height in pixels. New logos default to 100.",
                        "example": 120
                      }
                    }
                  },
                  "scenes": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "description": "Another image or clip of your media library for scenes, by the `index` [Get Project Scenes](/api-reference/project/scenes) answered (each index once). The new media takes the scene's place, size and timing, as the editor's Regenerate swaps it. An image scene takes a `COMPLETED` image; a clip scene takes a `COMPLETED` clip at least as long as the scene. A scene with `replaceable: false` (a clip with its own voice or dialogue) is refused.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "index",
                        "mediaId"
                      ],
                      "properties": {
                        "index": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "The scene's `index`.",
                          "example": 2
                        },
                        "mediaId": {
                          "type": "string",
                          "description": "An image or clip of your media library, `COMPLETED`.",
                          "example": "cm4x9p3r40005ab12gh56ij99"
                        }
                      }
                    }
                  }
                }
              },
              "example": {
                "caption": {
                  "preset": "beast",
                  "alignment": "bottom"
                },
                "captionSegments": [
                  {
                    "index": 1,
                    "text": "changed my mornings forever"
                  }
                ],
                "music": {
                  "musicId": "12",
                  "volume": 0.3
                },
                "branding": {
                  "logoMediaId": "cm4x9p3r40005ab12gh56ij78",
                  "position": "top-right"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The project was edited",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "projectId",
                        "changed",
                        "caption",
                        "music",
                        "branding"
                      ],
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "changed": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "What this request changed, by field (`caption.preset`, `captionSegments`, `music.volume`, `scenes`...)."
                        },
                        "caption": {
                          "type": "object",
                          "nullable": true,
                          "description": "The captions now, or `null` when the project has none.",
                          "properties": {
                            "disabled": {
                              "type": "boolean",
                              "description": "`true` when the captions are switched off (they stay in the project and render again once switched on)."
                            },
                            "preset": {
                              "type": "string",
                              "nullable": true,
                              "description": "The caption style (an id of GET /v1/catalog/caption-presets), or `null` when unknown."
                            },
                            "alignment": {
                              "type": "string",
                              "nullable": true,
                              "enum": [
                                "top",
                                "middle",
                                "bottom"
                              ],
                              "description": "Where the captions sit: `top`, `middle` or `bottom`."
                            },
                            "segments": {
                              "type": "integer",
                              "description": "How many caption lines there are now."
                            }
                          }
                        },
                        "music": {
                          "type": "object",
                          "nullable": true,
                          "description": "The background music now, or `null` when there is none.",
                          "properties": {
                            "musicId": {
                              "type": "string",
                              "nullable": true,
                              "description": "The track's id (as in GET /v1/music/list), when known."
                            },
                            "name": {
                              "type": "string",
                              "nullable": true
                            },
                            "volume": {
                              "type": "number"
                            }
                          }
                        },
                        "branding": {
                          "type": "object",
                          "nullable": true,
                          "description": "The logo now, or `null` when there is none.",
                          "properties": {
                            "logoMediaId": {
                              "type": "string",
                              "nullable": true,
                              "description": "The library image, when it was set through this endpoint; `null` for a logo added at creation."
                            },
                            "position": {
                              "type": "string",
                              "enum": [
                                "top-left",
                                "top-right",
                                "bottom-left",
                                "bottom-right"
                              ]
                            },
                            "size": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Project edited",
                  "data": {
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "changed": [
                      "captionSegments",
                      "caption.preset",
                      "caption.alignment",
                      "music.musicId",
                      "music.volume",
                      "branding.logoMediaId",
                      "branding.position"
                    ],
                    "caption": {
                      "disabled": false,
                      "preset": "beast",
                      "alignment": "bottom",
                      "segments": 14
                    },
                    "music": {
                      "musicId": "12",
                      "name": "Arietta",
                      "volume": 0.3
                    },
                    "branding": {
                      "logoMediaId": "cm4x9p3r40005ab12gh56ij78",
                      "position": "top-right",
                      "size": 100
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid edit; nothing was saved. `message` is `<field>: <reason>`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "examples": {
                  "unknownField": {
                    "value": {
                      "success": false,
                      "message": "voiceId: Cannot be edited through the API. Only caption, captionSegments, music, branding and scenes can; edit anything else in the dashboard"
                    }
                  },
                  "preset": {
                    "value": {
                      "success": false,
                      "message": "caption.preset: Invalid caption preset \"fancy\". Allowed values are: default, classic, ..."
                    }
                  },
                  "segment": {
                    "value": {
                      "success": false,
                      "message": "captionSegments.0.index: No segment 40; the project has 14 (0 to 13)"
                    }
                  },
                  "noCaptions": {
                    "value": {
                      "success": false,
                      "message": "caption: The project has no captions"
                    }
                  },
                  "music": {
                    "value": {
                      "success": false,
                      "message": "music.musicId: Music \"999\" not found"
                    }
                  },
                  "logo": {
                    "value": {
                      "success": false,
                      "message": "branding.logoMediaId: Media \"cm4x9p3r40005ab12gh56ij78\" not found"
                    }
                  },
                  "empty": {
                    "value": {
                      "success": false,
                      "message": "There is nothing on the timeline to edit yet"
                    }
                  },
                  "scene": {
                    "value": {
                      "success": false,
                      "message": "scenes.0.mediaId: Scene 2 is an image and media \"cm4x9p3r40005ab12gh56ij99\" is a clip; swap it for an image"
                    }
                  },
                  "lockedScene": {
                    "value": {
                      "success": false,
                      "message": "scenes.0.index: Scene 0 is a clip with its own sound (a voice or dialogue) and cannot be swapped; edit it in the dashboard"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not found. Another team's project, or an id that is not one, answers the same way as a missing one.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Project not found"
                }
              }
            }
          },
          "409": {
            "description": "The project cannot be edited right now; nothing was saved",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "message"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "processing": {
                    "value": {
                      "success": false,
                      "message": "Project is still processing"
                    }
                  },
                  "rendering": {
                    "value": {
                      "success": false,
                      "message": "A video of this project is still rendering"
                    }
                  },
                  "changed": {
                    "value": {
                      "success": false,
                      "message": "The project changed while it was being edited. Read it again and retry"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/character/create": {
      "post": {
        "summary": "Create Character",
        "operationId": "createCharacter",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "description": "Saves a Cinematic character, like Studio → Characters: a name, a visual description, a voice description, a style and at most one photo source (`mediaId`, `imageUrl` or `generatePortrait`). Answers 201 with the character, or 202 when its photo is still being imported or generated: poll Get Character until `imageStatus` is `COMPLETED` or `FAILED`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "How the story calls the character (and its `@mention`)."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "What the character looks like. Required with `generatePortrait`."
                  },
                  "voiceProfile": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "How the character sounds, in words."
                  },
                  "presetId": {
                    "type": "string",
                    "description": "Visual style of a generated portrait: a `visual-styles` catalog id or your `custom-<id>`. Default `cinematic`."
                  },
                  "mediaId": {
                    "type": "string",
                    "description": "An image of your media library (from List Media or an import), `COMPLETED`. Free."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "A public https JPEG, PNG, WEBP or GIF. It is imported into your library after the response (free, counted against your storage); `imageStatus` is `PROCESSING` until then."
                  },
                  "generatePortrait": {
                    "type": "boolean",
                    "description": "`true` generates a portrait from `description` in the character's style, after the response. Charged one image at `imageModel` (4 credits with the default); given back if it fails."
                  },
                  "imageModel": {
                    "type": "string",
                    "description": "Image model for `generatePortrait` (an `image-models` catalog id). Default `gpt_image_2`."
                  }
                }
              },
              "example": {
                "name": "Mia",
                "description": "Late 20s, red curly hair, denim jacket",
                "voiceProfile": "Warm, slightly husky, speaks fast",
                "generatePortrait": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Character created, with its photo (or none)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CharacterWritten"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character created",
                  "data": {
                    "id": "cm4xa1b2c0001cd34ef56gh78",
                    "name": "Mia",
                    "description": "Late 20s, red curly hair, denim jacket",
                    "voiceProfile": "Warm, slightly husky, speaks fast",
                    "presetId": "cinematic",
                    "imageUrl": "https://files.hooked.so/team/public/mia--fid--1a2b.png",
                    "imageStatus": "COMPLETED",
                    "createdAt": "2026-09-30T18:00:00.000Z",
                    "creditsCharged": 0
                  }
                }
              }
            }
          },
          "202": {
            "description": "Character created; its photo is being imported or generated (`imageStatus: PROCESSING`)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CharacterWritten"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Character created; its photo is processing",
                  "data": {
                    "id": "cm4xa1b2c0001cd34ef56gh78",
                    "name": "Mia",
                    "description": "Late 20s, red curly hair, denim jacket",
                    "voiceProfile": "Warm, slightly husky, speaks fast",
                    "presetId": "cinematic",
                    "imageUrl": null,
                    "imageStatus": "PROCESSING",
                    "createdAt": "2026-09-30T18:00:00.000Z",
                    "creditsCharged": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, photo or style; nothing was saved or charged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "description: Required to generate a portrait"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to create the character"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice/clone": {
      "post": {
        "summary": "Clone a Voice",
        "description": "Clones a voice from a recording, like Voice cloning in the dashboard. Send a public https link to the sample (`audioUrl`): MP3, WAV, M4A, AAC, OGG, FLAC or WEBM, 5 to 90 seconds, up to 10 MB, one speaker with little background noise. Hooked downloads it in the request (a private or local address, or a redirect to one, answers 400) and reads its type from the file. Background noise is removed, the voice is saved to your team and a short sample of it, in its language, becomes its `templateUrl`. The answer is the new voice: pass its `id` as `voiceId` anywhere (it is listed in List Voices with `isCustom: true`). Takes a few seconds.\n\nFree, but counted against your plan's custom voices (cloned and designed together; Pro: 1). It needs a live plan (402 `subscription_required` without one). A BYOK team clones in its own ElevenLabs account instead (403 `byok`): voices there are listed in List Voices. `consent: true` is required: you confirm you have the rights to clone this voice.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`).",
        "operationId": "cloneVoice",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "audioUrl",
                  "consent"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100,
                    "description": "The voice's name in your library."
                  },
                  "audioUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "Public https link to the sample file itself: MP3, WAV, M4A, AAC, OGG, FLAC or WEBM, 5 to 90 seconds, up to 10 MB."
                  },
                  "consent": {
                    "type": "boolean",
                    "enum": [
                      true
                    ],
                    "description": "Must be `true`: you confirm you have the necessary rights to upload and clone this voice."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 500,
                    "description": "A note about the voice, returned in List Voices."
                  },
                  "language": {
                    "type": "string",
                    "default": "English",
                    "description": "The sample's language, a name such as `English`, `Spanish` or `Portuguese` (case-insensitive; the dashboard's list of 55 languages)."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ],
                    "description": "Case-insensitive. Stored as `Unknown` when omitted."
                  },
                  "age": {
                    "type": "string",
                    "enum": [
                      "young",
                      "middle_aged",
                      "old"
                    ],
                    "description": "Case-insensitive. Stored as `unknown` when omitted."
                  },
                  "useCase": {
                    "type": "string",
                    "enum": [
                      "narrative_story",
                      "informative_educational",
                      "conversational",
                      "advertisement",
                      "social_media",
                      "entertainment_tv",
                      "characters_animation",
                      "general"
                    ],
                    "default": "general"
                  },
                  "accent": {
                    "type": "string",
                    "default": "Standard",
                    "description": "One of the accents the dashboard offers for `language` (for English: `Standard`, `Neutral`, `American`, `British`, `Australian`, ...). Case-insensitive; another value answers 400 with the list."
                  }
                }
              },
              "example": {
                "name": "Founder voice",
                "audioUrl": "https://cdn.example.com/voices/founder-sample.mp3",
                "consent": true,
                "language": "Spanish",
                "gender": "female",
                "accent": "Castilian",
                "description": "Warm, calm narration"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Voice cloned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Voice"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Voice cloned",
                  "data": {
                    "id": "cm4xa1b2c0001ab12cd34ef56",
                    "voiceId": "Xb7hH8MSUJpSbSDYk0k2",
                    "name": "Founder voice",
                    "gender": "female",
                    "language": "Spanish",
                    "accent": "Castilian",
                    "country": "ES",
                    "age": "middle_aged",
                    "templateUrl": "team/public/voice/cm4xa1b2c0001ab12cd34ef56.mp3",
                    "thumbnail": "/images/voice-default.png",
                    "isCustom": true,
                    "source": "custom",
                    "ownerProvider": "managed",
                    "description": "Warm, calm narration"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, voice or audio file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "audioUrl: The audio is too short (3.2 s, at least 5 s)"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "description": "BYOK team, custom voice quota used up, or the team does not have the product",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CustomVoiceDenied403"
                    },
                    {
                      "$ref": "#/components/schemas/EntitlementRequired403"
                    }
                  ]
                },
                "example": {
                  "success": false,
                  "code": "limit_reached",
                  "message": "You've reached your custom voice limit (1). Upgrade your plan to create more voices.",
                  "limit": 1,
                  "currentCount": 1
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error (anything charged is given back)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to clone the voice"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice/{voiceId}": {
      "delete": {
        "summary": "Delete a Voice",
        "description": "Deletes one of your team's own voices (cloned or designed) for good. **This cannot be undone.** The voice is removed from your library and from the ElevenLabs account it lives in, and frees a custom voice of your plan. Projects already made keep their audio. Refused with 409 while a project of your team is still being generated with it. Library voices and other teams' voices answer 404. Free.",
        "operationId": "deleteVoice",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "voiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The voice's `id`, from List Voices (`type=custom`) or Clone a Voice."
          }
        ],
        "responses": {
          "200": {
            "description": "Voice deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "voiceId",
                        "deleted"
                      ],
                      "properties": {
                        "voiceId": {
                          "type": "string",
                          "description": "The voice that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Voice deleted",
                  "data": {
                    "voiceId": "cm4xa1b2c0001ab12cd34ef56",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "Not one of your team's voices (a library voice, another team's or a malformed id answers the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Voice not found"
                }
              }
            }
          },
          "409": {
            "description": "A project is still being generated with this voice. Nothing was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict409"
                },
                "example": {
                  "success": false,
                  "message": "Voice is used by project \"Launch video\" (cm4x9p0q10001ab12cd34ef56), which is still processing"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error (anything charged is given back)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Internal server error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice/speech": {
      "post": {
        "summary": "Generate Speech",
        "description": "Reads a text aloud with any voice from List Voices, like the text-to-speech voiceover in the editor: same model, settings and price. Up to 1,200 characters. The audio (MP3) is saved to your team's voiceovers and the answer carries a link to it that works for 10 minutes. Takes a few seconds.\n\nCosts 5 credits per started 1,000 characters (charged before generating, given back if it fails). BYOK teams need an ElevenLabs key and are not charged. Counts against your storage.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`).",
        "operationId": "generateSpeech",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "voiceId",
                  "text"
                ],
                "properties": {
                  "voiceId": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "A voice from List Voices: its `id` (a library voice, or one of your team's own voices). Another team's voice, an unknown id, or one of your clones that is `unavailable` in your current key mode answers 400."
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1200,
                    "description": "What the voice says. Up to 1,200 characters (trimmed)."
                  },
                  "audio": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Voice settings, as in the editor. Each one is optional; a missing one takes its default. An unknown key answers 400.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Lower is more expressive, higher is steadier."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the output sticks to the original voice."
                      }
                    }
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Name of the voiceover in the editor. A generated file name when omitted."
                  }
                }
              },
              "example": {
                "voiceId": "tzX5paJ07p5hyWFcU3uG",
                "text": "Stop scrolling. This serum changed my morning routine in one week.",
                "audio": {
                  "speed": 1.05,
                  "stability": 0.5,
                  "similarityBoost": 0.75
                },
                "name": "Serum hook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Speech generated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "voiceoverId",
                        "url",
                        "urlExpiresInSeconds",
                        "durationSeconds",
                        "characters",
                        "creditsUsed"
                      ],
                      "properties": {
                        "voiceoverId": {
                          "type": "string",
                          "description": "The voiceover saved to your team (it shows up in the editor's generated voiceovers)."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "A link to the MP3. It works for `urlExpiresInSeconds` (10 minutes): download it now."
                        },
                        "urlExpiresInSeconds": {
                          "type": "integer",
                          "description": "How long `url` works, in seconds (600)."
                        },
                        "durationSeconds": {
                          "type": "number",
                          "description": "Length of the audio, in seconds."
                        },
                        "characters": {
                          "type": "integer",
                          "description": "Characters read (what the price is counted on)."
                        },
                        "creditsUsed": {
                          "type": "number",
                          "description": "Credits charged. `0` on BYOK: your ElevenLabs key pays."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Speech generated",
                  "data": {
                    "voiceoverId": "cm4xa3d4e0002ab12cd34ef56",
                    "url": "https://files.hooked.so/team/public/media/voiceover/voiceover-1759660800000.mp3?X-Amz-Signature=...",
                    "urlExpiresInSeconds": 600,
                    "durationSeconds": 4.6,
                    "characters": 66,
                    "creditsUsed": 5
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, voice or audio file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "text: Must be at most 1200 characters"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "description": "The team does not have the product, or its storage is full",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EntitlementRequired403"
                    },
                    {
                      "type": "object",
                      "description": "Your plan's storage is full. Nothing was charged.",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "success",
                        "message"
                      ]
                    }
                  ]
                },
                "example": {
                  "success": false,
                  "message": "Insufficient storage. The pro plan has a limit of 50GB and you have already used 50GB"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error (anything charged is given back)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to generate the speech"
                }
              }
            }
          }
        }
      }
    },
    "/v1/voice/speech-to-speech": {
      "post": {
        "summary": "Speech to Speech",
        "description": "Re-voices a recording with any voice from List Voices, like Speech to speech in the editor: the words, pacing and intonation stay, the voice changes. Send a public https link to the recording (`audioUrl`): MP3, WAV, M4A, AAC, OGG, FLAC or WEBM, up to 5 minutes and 10 MB, downloaded in the request (a private or local address answers 400). The result (MP3) is saved to your team's voiceovers and the answer carries a link to it that works for 10 minutes.\n\nCosts 5 credits per started minute of the recording (charged before generating, given back if it fails). BYOK teams need an ElevenLabs key and are not charged. Counts against your storage.\n\nA body that is not valid JSON answers 400 (`Invalid JSON body`).",
        "operationId": "speechToSpeech",
        "tags": [],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "voiceId",
                  "audioUrl"
                ],
                "properties": {
                  "voiceId": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "A voice from List Voices: its `id` (a library voice, or one of your team's own voices). Another team's voice, an unknown id, or one of your clones that is `unavailable` in your current key mode answers 400."
                  },
                  "audioUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000,
                    "description": "Public https link to the recording file itself: MP3, WAV, M4A, AAC, OGG, FLAC or WEBM, up to 5 minutes and 10 MB."
                  },
                  "audio": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Voice settings, as in the editor. Each one is optional; a missing one takes its default. An unknown key answers 400.",
                    "properties": {
                      "speed": {
                        "type": "number",
                        "minimum": 0.7,
                        "maximum": 1.2,
                        "default": 1.0,
                        "description": "Speaking speed."
                      },
                      "stability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.5,
                        "description": "Lower is more expressive, higher is steadier."
                      },
                      "similarityBoost": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.75,
                        "description": "How closely the output sticks to the original voice."
                      }
                    }
                  }
                }
              },
              "example": {
                "voiceId": "tzX5paJ07p5hyWFcU3uG",
                "audioUrl": "https://cdn.example.com/recordings/take-3.m4a",
                "audio": {
                  "stability": 0.6
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Speech generated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "voiceoverId",
                        "url",
                        "urlExpiresInSeconds",
                        "sourceDurationSeconds",
                        "creditsUsed"
                      ],
                      "properties": {
                        "voiceoverId": {
                          "type": "string",
                          "description": "The voiceover saved to your team (it shows up in the editor's generated voiceovers)."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "A link to the MP3. It works for `urlExpiresInSeconds` (10 minutes): download it now."
                        },
                        "urlExpiresInSeconds": {
                          "type": "integer",
                          "description": "How long `url` works, in seconds (600)."
                        },
                        "sourceDurationSeconds": {
                          "type": "number",
                          "description": "Length of the recording, in seconds (what the price is counted on)."
                        },
                        "creditsUsed": {
                          "type": "number",
                          "description": "Credits charged. `0` on BYOK: your ElevenLabs key pays."
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Speech generated",
                  "data": {
                    "voiceoverId": "cm4xa5f6g0003ab12cd34ef56",
                    "url": "https://files.hooked.so/team/public/media/voiceover/voiceover-1759660800000.mp3?X-Amz-Signature=...",
                    "urlExpiresInSeconds": 600,
                    "sourceDurationSeconds": 42.3,
                    "creditsUsed": 5
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid body, voice or audio file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "audioUrl: The audio is too long (412 s, at most 300 s)"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "description": "The team does not have the product, or its storage is full",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/EntitlementRequired403"
                    },
                    {
                      "type": "object",
                      "description": "Your plan's storage is full. Nothing was charged.",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "success",
                        "message"
                      ]
                    }
                  ]
                },
                "example": {
                  "success": false,
                  "message": "Insufficient storage. The pro plan has a limit of 50GB and you have already used 50GB"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "description": "Internal server error (anything charged is given back)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error500"
                },
                "example": {
                  "success": false,
                  "message": "Failed to generate the speech"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatar/create/from-photo": {
      "post": {
        "summary": "Create Avatar from Photo",
        "description": "Makes one of your team's own avatars from a photo, as **Upload a photo** does in the dashboard: a public `https` URL or an image of your media library. The photo is copied, tagged (age, skin tone, setting, expression; gender too unless you set it) and the avatar is ready at once (`201`, `status: COMPLETED`). Managed teams: 200 credits (the dashboard's custom actor price). BYOK teams: no credits; the tagging runs on the team's own OpenRouter key.",
        "operationId": "createAvatarFromPhoto",
        "tags": [
          "Avatars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "The avatar's name (1-60 characters)."
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "Public `https` URL of a JPEG, PNG or WEBP photo, up to 20 MB. Required unless `mediaId` is given; send one of the two."
                  },
                  "mediaId": {
                    "type": "string",
                    "description": "Id of a `COMPLETED` image of your media library. Required unless `imageUrl` is given."
                  },
                  "gender": {
                    "type": "string",
                    "enum": [
                      "Female",
                      "Male"
                    ],
                    "description": "Leave it out to read it from the photo."
                  }
                }
              },
              "example": {
                "name": "Maya",
                "imageUrl": "https://cdn.example.com/team/maya.jpg",
                "gender": "Female"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Avatar created and ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomAvatar"
                        },
                        {
                          "type": "object",
                          "required": [
                            "usedCredits"
                          ],
                          "properties": {
                            "usedCredits": {
                              "type": "number",
                              "description": "Credits charged (200 on managed teams; 0 on BYOK)."
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Avatar created",
                  "data": {
                    "id": "cm7a1v9t20003ab12cd34ef56",
                    "name": "Maya",
                    "type": "Realistic",
                    "gender": "Female",
                    "age": "Young Adult",
                    "image": "https://cdn.hooked.so/team/public/image/cm7a1v9t2/maya.png?X-Amz-Signature=...",
                    "status": "COMPLETED",
                    "situation": [
                      "Kitchen"
                    ],
                    "emotions": [
                      "Happy"
                    ],
                    "skinTone": "medium",
                    "isCustom": true,
                    "source": "custom",
                    "createdAt": "2026-10-05T09:12:44.000Z",
                    "usedCredits": 200
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, a missing or invalid field (`name: Required`, `imageUrl or mediaId is required`, `gender: ...`), a URL that is not public `https` or cannot be downloaded, a file that is not a JPEG, PNG or WEBP image or is over 20 MB, or a `mediaId` that is not a ready image of your library",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "imageUrl: Must be a JPEG, PNG or WEBP image"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/avatar/create/generate": {
      "post": {
        "summary": "Generate Avatar",
        "description": "Generates one of your team's own avatars from a description, as **Generate with AI** does in the dashboard: one portrait with the image model you pick, which becomes the avatar. Answers `202` at once with the avatar `PROCESSING`; the portrait takes about 20-60 seconds. Poll Get Avatar until `COMPLETED` or `FAILED`. Managed teams pay the image model's price (GPT Image 2 by default: 4 credits), charged now and refunded if the generation fails. BYOK teams: no credits; the team's own OpenRouter key is used.",
        "operationId": "generateAvatar",
        "tags": [
          "Avatars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "description"
                ],
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 2000,
                    "description": "Who the avatar is and where: age, gender, look, what they are doing, the setting. For example `28 year old woman with curly hair in a bright kitchen, holding a coffee`."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "The avatar's name. Defaults to the first words of `description`."
                  },
                  "model": {
                    "type": "string",
                    "default": "gpt_image_2",
                    "description": "Image model: an `id` of GET /v1/catalog/image-models."
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_1_1",
                      "ratio_16_9"
                    ],
                    "default": "ratio_9_16"
                  },
                  "artStyle": {
                    "type": "string",
                    "default": "realistic",
                    "description": "Visual style: a library `id` of GET /v1/catalog/visual-styles (`realistic`, `anime`, ...). Custom styles are not accepted."
                  }
                }
              },
              "example": {
                "description": "28 year old woman with curly hair in a bright kitchen, holding a coffee",
                "name": "Maya"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Generation started; the avatar is `PROCESSING`",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CustomAvatar"
                        },
                        {
                          "type": "object",
                          "required": [
                            "usedCredits"
                          ],
                          "properties": {
                            "usedCredits": {
                              "type": "number",
                              "description": "Credits charged for the portrait (0 on BYOK). Refunded if the generation fails."
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Avatar generation started",
                  "data": {
                    "id": "cm7a1v9t20003ab12cd34ef56",
                    "name": "Maya",
                    "type": "AI",
                    "gender": "Female",
                    "age": "Adult",
                    "image": null,
                    "status": "PROCESSING",
                    "situation": [],
                    "emotions": [],
                    "skinTone": "medium",
                    "isCustom": true,
                    "source": "custom",
                    "createdAt": "2026-10-05T09:12:44.000Z",
                    "usedCredits": 4
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or a missing or invalid field (`description: Required`, `model: ...`, `aspectRatio: ...`, `artStyle: ...`, `name: ...`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "description: Required"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/avatar/{avatarId}": {
      "get": {
        "summary": "Get Avatar",
        "description": "One of your team's own avatars, with its Hook + Demo reactions. Poll it after Generate Avatar until `status` is `COMPLETED` or `FAILED`, and after Create Reaction until the reaction is. Library avatars are not served here (see List Avatars).",
        "operationId": "getAvatar",
        "tags": [
          "Avatars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "avatarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The id of one of your team's own avatars (from List Avatars with `type=custom`, or a create call). Library avatars are not accepted here."
          }
        ],
        "responses": {
          "200": {
            "description": "The avatar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/CustomAvatar"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Avatar fetched successfully",
                  "data": {
                    "id": "cm7a1v9t20003ab12cd34ef56",
                    "name": "Maya",
                    "type": "Realistic",
                    "gender": "Female",
                    "age": "Young Adult",
                    "image": "https://cdn.hooked.so/team/public/image/cm7a1v9t2/maya.png?X-Amz-Signature=...",
                    "status": "COMPLETED",
                    "situation": [
                      "Kitchen"
                    ],
                    "emotions": [
                      "Happy"
                    ],
                    "skinTone": "medium",
                    "isCustom": true,
                    "source": "custom",
                    "createdAt": "2026-10-05T09:12:44.000Z",
                    "reactions": [
                      {
                        "id": "cm7a2r4k80011ab12gh78ij90",
                        "reaction": "surprise",
                        "status": "COMPLETED",
                        "videoUrl": "https://cdn.hooked.so/team/public/avatar-reactions/cm7a2r4k8.mp4?X-Amz-Signature=...",
                        "thumbnailUrl": "https://cdn.hooked.so/team/public/avatar-reactions/cm7a2r4k8.jpg?X-Amz-Signature=...",
                        "createdAt": "2026-10-05T09:20:03.000Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such avatar of your team (a library avatar, another team's, a deleted or a malformed id answer the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Avatar not found"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      },
      "delete": {
        "summary": "Delete Avatar",
        "description": "Deletes one of your team's own avatars for good, as the dashboard does: its image and the avatar, and its reactions with it. **This cannot be undone.** Videos already rendered are not affected. Refused with `409` (nothing deleted) while its generation is still running, while a project using it or one of its reactions is processing, or while one of its reactions is being made. Library avatars cannot be deleted.",
        "operationId": "deleteAvatar",
        "tags": [
          "Avatars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "avatarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The id of one of your team's own avatars (from List Avatars with `type=custom`, or a create call). Library avatars are not accepted here."
          }
        ],
        "responses": {
          "200": {
            "description": "Avatar deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "required": [
                        "avatarId",
                        "deleted"
                      ],
                      "properties": {
                        "avatarId": {
                          "type": "string",
                          "description": "The avatar that was deleted"
                        },
                        "deleted": {
                          "type": "boolean",
                          "description": "Always `true`"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Avatar deleted",
                  "data": {
                    "avatarId": "cm7a1v9t20003ab12cd34ef56",
                    "deleted": true
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such avatar of your team (a library avatar, another team's, a deleted or a malformed id answer the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Avatar not found"
                }
              }
            }
          },
          "409": {
            "description": "The avatar cannot be deleted yet; nothing was deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Conflict409"
                },
                "examples": {
                  "generating": {
                    "value": {
                      "success": false,
                      "message": "Avatar is still being generated"
                    }
                  },
                  "in use": {
                    "value": {
                      "success": false,
                      "message": "Cannot delete: this avatar is used in the project \"Serum ad\", which is still processing"
                    }
                  },
                  "reaction": {
                    "value": {
                      "success": false,
                      "message": "Cannot delete: a reaction of this avatar is still being generated"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/avatar/{avatarId}/reaction": {
      "post": {
        "summary": "Create Reaction",
        "description": "Makes a Hook + Demo reaction of one of your team's own avatars, as **Studio → Actors → Reactions** does in the dashboard: a still of the avatar making the face, animated into a short silent clip (5-6 s). Answers `202` at once; it takes about 1-3 minutes. Follow it in Get Avatar (`reactions`). Once `COMPLETED`, its `id` is an `avatarId` for Create Hook Demo and it is listed in GET /v1/catalog/reactions. Managed teams pay the still plus the clip at the models picked (the price the dashboard quotes: 52 credits with the defaults, GPT Image 2 + Grok Imagine), charged now and refunded if it fails. BYOK teams: no credits; the team's own OpenRouter key is used.",
        "operationId": "createAvatarReaction",
        "tags": [
          "Avatars"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "avatarId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The id of one of your team's own avatars (from List Avatars with `type=custom`, or a create call). Library avatars are not accepted here."
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reaction"
                ],
                "properties": {
                  "reaction": {
                    "type": "string",
                    "enum": [
                      "surprise",
                      "shock",
                      "excitement",
                      "smirk",
                      "confusion",
                      "disgust",
                      "happy",
                      "laughing",
                      "whispers",
                      "nervous",
                      "frustrated",
                      "crying",
                      "turn_reveal",
                      "side_look",
                      "double_take",
                      "lean_in",
                      "custom"
                    ],
                    "description": "The face to make. `custom` takes your own `customPrompt`."
                  },
                  "customPrompt": {
                    "type": "string",
                    "maxLength": 1000,
                    "description": "What the avatar does, for `reaction: custom` (required then). Ignored for the other reactions."
                  },
                  "model": {
                    "type": "string",
                    "default": "gpt_image_2",
                    "description": "Image model for the still: an `id` of GET /v1/catalog/image-models."
                  },
                  "videoModel": {
                    "type": "string",
                    "enum": [
                      "grok_imagine_video",
                      "grok_imagine_video_lite",
                      "seedance_2_0_fast",
                      "seedance_2_0_mini",
                      "seedance_2_0",
                      "kling_3_0",
                      "wan_2_7_i2v"
                    ],
                    "default": "grok_imagine_video",
                    "description": "Video model for the clip, cheapest first."
                  }
                }
              },
              "example": {
                "reaction": "surprise"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Reaction started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/AvatarReaction"
                        },
                        {
                          "type": "object",
                          "required": [
                            "usedCredits"
                          ],
                          "properties": {
                            "usedCredits": {
                              "type": "number",
                              "description": "Credits charged for the still and the clip (0 on BYOK). Refunded if the reaction fails."
                            }
                          }
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Reaction generation started",
                  "data": {
                    "id": "cm7a2r4k80011ab12gh78ij90",
                    "reaction": "surprise",
                    "status": "PROCESSING",
                    "videoUrl": null,
                    "thumbnailUrl": null,
                    "createdAt": "2026-10-05T09:20:03.000Z",
                    "avatarId": "cm7a1v9t20003ab12cd34ef56",
                    "usedCredits": 52
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON, a missing or invalid field (`reaction: Required`, `customPrompt: Required for the custom reaction`, `model: ...`, `videoModel: ...`), or an avatar that is not ready (`Avatar is not ready (status PROCESSING)`)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError400"
                },
                "example": {
                  "success": false,
                  "message": "reaction: Required"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "403": {
            "$ref": "#/components/responses/EntitlementRequired"
          },
          "404": {
            "description": "No such avatar of your team (a library avatar, another team's, a deleted or a malformed id answer the same)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotFound404"
                },
                "example": {
                  "success": false,
                  "message": "Avatar not found"
                }
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/IdempotencyInProgress"
          },
          "422": {
            "$ref": "#/components/responses/IdempotencyMismatch"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited429"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/media/{mediaId}/remove-background": {
      "post": {
        "summary": "Remove a Clip's Background",
        "description": "Cuts the person in a library clip (up to 60 s) out of their background with Bria, kept on the same clip: the version a layer of POST /v1/project/compose plays with `cutOut` (the speaker over a new backdrop, text behind their head). Renders nothing, unlike /v1/project/create/remove-background. Charged once; calling again while it runs or after it is done is free and answers its state. Follow it with GET /v1/media/{mediaId} until `backgroundRemoval.status` is COMPLETED (a minute or two). Images go through POST /v1/image/remove-background.",
        "operationId": "removeClipBackground",
        "tags": [
          "Images"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "A clip of the library (GET /v1/media/list?type=video).",
            "example": "media_abc123"
          }
        ],
        "responses": {
          "200": {
            "description": "The clip already had its cut-out",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The library clip the cut-out belongs to"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "COMPLETED",
                            "PROCESSING"
                          ]
                        },
                        "backgroundRemovedUrl": {
                          "type": "string",
                          "description": "COMPLETED: signed URL of the clip on a green backdrop, which a composed layer plays through the chroma key"
                        },
                        "jobId": {
                          "type": "string",
                          "description": "PROCESSING, when this call started it"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits this call charged: 0 when the cut-out existed or was already running"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Background already removed",
                  "data": {
                    "mediaId": "media_abc123",
                    "status": "COMPLETED",
                    "backgroundRemovedUrl": "https://.../media_abc123-green.mp4",
                    "usedCredits": 0
                  }
                }
              }
            }
          },
          "202": {
            "description": "Removal started (or already running)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "mediaId": {
                          "type": "string",
                          "description": "The library clip the cut-out belongs to"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "COMPLETED",
                            "PROCESSING"
                          ]
                        },
                        "backgroundRemovedUrl": {
                          "type": "string",
                          "description": "COMPLETED: signed URL of the clip on a green backdrop, which a composed layer plays through the chroma key"
                        },
                        "jobId": {
                          "type": "string",
                          "description": "PROCESSING, when this call started it"
                        },
                        "usedCredits": {
                          "type": "number",
                          "description": "Credits this call charged: 0 when the cut-out existed or was already running"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Background removal started",
                  "data": {
                    "mediaId": "media_abc123",
                    "status": "PROCESSING",
                    "jobId": "bria_123",
                    "usedCredits": 12
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/v1/project/compose": {
      "post": {
        "summary": "Compose a Project",
        "description": "A finished project put together from pieces the team already has, as layers on the editor's timeline, listed bottom to top (a later layer is drawn over an earlier one): library clips, whole or cut out of their background, images, voiceovers and text. Nothing is generated and nothing is charged; POST /v1/render renders it, and it opens in the dashboard editor like any project. Burned captions: POST /v1/project/create/add-captions on the rendered video.",
        "operationId": "composeProject",
        "tags": [
          "Videos"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "layers"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "ratio_9_16",
                      "ratio_16_9",
                      "ratio_1_1"
                    ],
                    "description": "Default ratio_9_16."
                  },
                  "backgroundColor": {
                    "type": "string",
                    "description": "#RRGGBB where no layer covers the frame. Default #000000."
                  },
                  "layers": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 60,
                    "items": {
                      "type": "object",
                      "required": [
                        "type"
                      ],
                      "description": "One layer. Fields other than its kind's are refused.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "video",
                            "image",
                            "text",
                            "audio"
                          ]
                        },
                        "mediaId": {
                          "type": "string",
                          "description": "video / image: a COMPLETED library clip or image."
                        },
                        "voiceoverId": {
                          "type": "string",
                          "description": "audio: a voiceover of the team (POST /v1/voice/speech answers its id)."
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 300,
                          "description": "text: the words on screen."
                        },
                        "start": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Seconds into the video the layer appears. Default 0."
                        },
                        "duration": {
                          "type": "number",
                          "description": "Seconds it stays. Omitted: a clip or a voiceover plays to its end; an image or a text to the video's end."
                        },
                        "trimStart": {
                          "type": "number",
                          "description": "video: seconds into the clip it starts from."
                        },
                        "position": {
                          "oneOf": [
                            {
                              "type": "string",
                              "enum": [
                                "full",
                                "top",
                                "center",
                                "bottom",
                                "top-half",
                                "bottom-half",
                                "left-half",
                                "right-half",
                                "top-left",
                                "top-right",
                                "bottom-left",
                                "bottom-right"
                              ]
                            },
                            {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "x",
                                "y",
                                "width",
                                "height"
                              ],
                              "properties": {
                                "x": {
                                  "type": "number",
                                  "description": "Left edge, % of the frame width"
                                },
                                "y": {
                                  "type": "number",
                                  "description": "Top edge, % of the frame height"
                                },
                                "width": {
                                  "type": "number",
                                  "description": "% of the frame width"
                                },
                                "height": {
                                  "type": "number",
                                  "description": "% of the frame height"
                                }
                              }
                            }
                          ],
                          "description": "Where the layer sits: a named spot, or a box in % of the frame."
                        },
                        "fit": {
                          "type": "string",
                          "enum": [
                            "cover",
                            "contain"
                          ],
                          "description": "video / image: fill the box (default) or show it whole."
                        },
                        "cutOut": {
                          "type": "boolean",
                          "description": "video: play the clip's background-removed version (POST /v1/media/{mediaId}/remove-background first); image: its cut-out PNG (POST /v1/image/remove-background first)."
                        },
                        "kenBurns": {
                          "type": "boolean",
                          "description": "image: a slow push across it while it shows."
                        },
                        "volume": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "video / audio: 0 to 1, default 1."
                        },
                        "style": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "text only.",
                          "properties": {
                            "preset": {
                              "type": "string",
                              "description": "An editor text style: modern (default), tiktok, social, impact, slicedText, minimalMonochrome, highlight, gradient, neonFuture, avantGarde, glassmorphic, stageEffect, neonEffect, glowEffect, wrapEffect."
                            },
                            "color": {
                              "type": "string",
                              "description": "#RRGGBB"
                            },
                            "background": {
                              "type": "string",
                              "description": "#RRGGBB box behind the words"
                            },
                            "size": {
                              "type": "integer",
                              "description": "Font size in px on a 1080-wide frame"
                            },
                            "align": {
                              "type": "string",
                              "enum": [
                                "left",
                                "center",
                                "right"
                              ]
                            },
                            "uppercase": {
                              "type": "boolean"
                            }
                          }
                        },
                        "enter": {
                          "type": "string",
                          "enum": [
                            "fadeIn",
                            "grow",
                            "slideUp",
                            "slideDown",
                            "zoomIn",
                            "bounce",
                            "blur",
                            "swipeReveal",
                            "pulse"
                          ],
                          "description": "text: how it arrives (default fadeIn)."
                        },
                        "exit": {
                          "type": "string",
                          "enum": [
                            "fadeOut",
                            "shrinkOut",
                            "zoomOut",
                            "slideLeftOut",
                            "slideRightOut"
                          ],
                          "description": "text: how it leaves."
                        }
                      }
                    },
                    "description": "Bottom to top."
                  },
                  "music": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "musicId"
                    ],
                    "properties": {
                      "musicId": {
                        "type": "string",
                        "description": "A track of GET /v1/music/list"
                      },
                      "volume": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "description": "Default 0.25"
                      }
                    }
                  }
                }
              },
              "example": {
                "name": "Text behind the speaker",
                "aspectRatio": "ratio_9_16",
                "layers": [
                  {
                    "type": "video",
                    "mediaId": "media_take123"
                  },
                  {
                    "type": "text",
                    "text": "8 hours lost",
                    "position": "top",
                    "style": {
                      "preset": "impact",
                      "size": 180
                    }
                  },
                  {
                    "type": "video",
                    "mediaId": "media_take123",
                    "cutOut": true,
                    "volume": 0
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Composed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "durationSeconds": {
                          "type": "number"
                        },
                        "layers": {
                          "type": "integer"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "completed"
                          ]
                        }
                      }
                    }
                  }
                },
                "example": {
                  "success": true,
                  "message": "Project composed",
                  "data": {
                    "projectId": "cm4x9k2p10001ab12cd34ef56",
                    "name": "Text behind the speaker",
                    "durationSeconds": 8,
                    "layers": 3,
                    "status": "completed"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/ApiBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/ApiNotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Videos",
      "description": "Create projects, follow them and render videos"
    },
    {
      "name": "Account Analysis",
      "description": "Analyze TikTok and YouTube accounts"
    },
    {
      "name": "Channels",
      "description": "Connected social accounts you publish to"
    },
    {
      "name": "Publish",
      "description": "Schedule videos to your connected accounts"
    },
    {
      "name": "Images",
      "description": "Image editing: background removal and expansion"
    },
    {
      "name": "Media",
      "description": "Your media library: list, import from a URL, upload a file"
    },
    {
      "name": "Avatars",
      "description": "Your team's own avatars (Actors) and their Hook + Demo reactions"
    }
  ]
}
