> ## Documentation Index
> Fetch the complete documentation index at: https://docs.podcastor.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create image template

> Create an image Podcast template in the shared Web library.

MCP tool: `podcast_create_image_template`. OAuth scope: `asset.write`.


## OpenAPI

````yaml api-reference/openapi.json POST /open/podcast/v1/image_templates
openapi: 3.0.3
info:
  description: >-
    Atomic Podcast capabilities. Credits, tasks and assets are shared with the
    Web account and Space.
  title: Podcastor API
  version: 1.0.0
servers:
  - url: https://api-services.podcastor.ai
    description: Podcastor API
security: []
paths:
  /open/podcast/v1/image_templates:
    post:
      tags:
        - Podcast
      summary: create image template
      description: Create an image Podcast template in the shared Web library.
      operationId: podcast_create_image_template
      parameters:
        - description: Replay a completed identical request without repeating side effects.
          in: header
          name: Idempotency-Key
          schema:
            maxLength: 128
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dto.AddRippleImagePodcastTemplateReq'
        description: 请求体
        required: true
        x-originalParamName: req
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/echo.JSON'
                  - properties:
                      data:
                        $ref: >-
                          #/components/schemas/vo.AddRippleImagePodcastTemplateResp
                    type: object
          description: OK
      security:
        - ApiKey: []
components:
  schemas:
    dto.AddRippleImagePodcastTemplateReq:
      properties:
        aspect_ratio:
          description: 宽高比 0:9比16/1:16比9
          enum:
            - 0
            - 1
          type: integer
        scene:
          $ref: '#/components/schemas/dto.RippleImagePodcastTemplateSceneReq'
      required:
        - scene
      type: object
    echo.JSON:
      properties:
        cause:
          type: string
        code:
          type: integer
        data: {}
        details: {}
        msg:
          type: string
        rid:
          type: string
      type: object
    vo.AddRippleImagePodcastTemplateResp:
      properties:
        aspect_ratio:
          description: 宽高比 0:9比16/1:16比9
          type: integer
        id:
          type: integer
      type: object
    dto.RippleImagePodcastTemplateSceneReq:
      properties:
        tracks:
          items:
            $ref: '#/components/schemas/vo.Track'
          type: array
      type: object
    vo.Track:
      properties:
        index:
          description: 时间轴索引
          type: integer
        key:
          description: 前端使用，用于在编辑器标识轴用的，后端不管，帮忙传递即可
          type: string
        layers:
          description: 时间轴元素列表
          items:
            $ref: '#/components/schemas/vo.TrackLayer'
          type: array
        type:
          description: >-
            时间轴类型 数字人person ｜ 背景音乐music ｜ tts ｜ 字幕subtitle | 字幕subtitle-2 ｜
            素材other ｜ 色块shape
          type: string
      type: object
    vo.TrackLayer:
      properties:
        alpha:
          description: 透明度，0 为不透明
          type: number
        api_template_meta:
          allOf:
            - $ref: '#/components/schemas/vo.ApiTemplateMeta'
          description: 自定义API属性，制作模板用
        color:
          description: 数字人如果是头像框模式的话，需要传颜色，可以默认传#FFFFFF；非头像框模式不传
          type: string
        crop:
          allOf:
            - $ref: '#/components/schemas/vo.TrackLayerCrop'
          description: 裁剪参数
        fit_mode:
          description: 元素填充方式默认为fit， fit=自适应 | fill 充满
          type: string
        flip:
          description: 镜像，默认为空
          type: string
        gauss:
          description: 高斯模糊取值范围为[0-♾️]但仅为奇数
          type: integer
        h:
          description: 元素高度
          type: integer
        key:
          description: 标识元素用
          type: string
        mode:
          description: 元素使用方式 def:默认，啥也不处理/sig:只播一次/alg:自动拉伸/cir:循环
          type: string
        moving_camera:
          allOf:
            - $ref: '#/components/schemas/vo.MovingCamera'
          description: >-
            运镜效果  从左到右=right | 从右到左=left | 从上到下=down | 从下到上=up | 从右下至左上 =
            left-top | 从左下至右上 =right-top | 缩小 = zoom-in | 放大 = zoom-out
        path:
          description: 元素路径
          type: string
        person_cover:
          description: 数字人封面
          type: string
        person_preview_url:
          description: 数字人预览视频URL
          type: string
        preview_path:
          description: 预览路径
          type: string
        prop:
          allOf:
            - $ref: '#/components/schemas/vo.TrackLayerProp'
          description: 特有元素属性
        r:
          description: 元素旋转角度
          type: integer
        radius:
          description: 元素圆角【支持字符串数字格式，或100%，100%则为圆】
          type: string
        shape:
          allOf:
            - $ref: '#/components/schemas/vo.LayerShape'
          description: 有此对象，说明此元素是一个容器，此对象内为容器内元素的信息
        subtitle:
          allOf:
            - $ref: '#/components/schemas/vo.LayerSubtitle'
          description: 字幕信息
        template_meta:
          allOf:
            - $ref: '#/components/schemas/vo.TemplateMeta'
          description: 自定义属性，制作模板用
        timeline:
          allOf:
            - $ref: '#/components/schemas/vo.LayerTimeline'
          description: 元素在时间轴上的信息
        top_level_key:
          description: 全局key，用来表示不同分镜中的元素实质上是类似的元素
          type: string
        tts_audio_url:
          description: TTS音频URL，驱动的时候用这个，前端播放的时候用压缩过的
          type: string
        type:
          description: >-
            渲染类型:video | pic | music | person | subtitle | subtitle-2 ｜ text |
            other | shape ｜ img
          type: string
        volume:
          description: 音量, 仅类型为other
          type: integer
        w:
          description: 元素宽度
          type: integer
        x:
          description: 元素位置x
          type: integer
        'y':
          description: 元素位置y
          type: integer
      type: object
    vo.ApiTemplateMeta:
      properties:
        replace_key:
          description: 元素标识符，方便调用API的时候定位到此元素
          type: string
      type: object
    vo.TrackLayerCrop:
      properties:
        h:
          description: 裁剪高度，默认值给个1
          type: number
        w:
          description: 裁剪宽度，默认值给个1
          type: number
        x:
          description: 裁剪位置x
          type: number
        'y':
          description: 裁剪位置y
          type: number
      type: object
    vo.MovingCamera:
      properties:
        type:
          type: string
      type: object
    vo.TrackLayerProp:
      properties:
        animationInfo:
          $ref: '#/components/schemas/vo.TrackLayerPropAnimationInfo'
        audioPath:
          description: 波纹图使用的音频地址
          type: string
        bg_transparent:
          description: 是否是抠像数字人
          type: boolean
        clip:
          allOf:
            - $ref: '#/components/schemas/vo.TrackLayerPropClip'
          description: 视频裁剪; 仅类型为other的video时有用
        emotion:
          allOf:
            - $ref: '#/components/schemas/vo.TrackLayerPropEmotion'
          description: 数字人情绪详情
        meta:
          $ref: '#/components/schemas/vo.TrackLayerPropMeta'
        play_mode:
          description: >-
            播放方式 目前都用 play-preset-1 其余枚举值:
            play-default:常规播放/play-immobilization:播完定格/play-match:自动填充/play-loop:循环播放
          type: string
        renderScale:
          description: 缩放倍数，类型为text时使用，默认为1
          type: integer
        shapeInfo:
          allOf:
            - $ref: '#/components/schemas/vo.TrackLayerPropShapeInfo'
          description: 色块信息
        show_type:
          description: 数字人展示形式 all = 全身 | circle = 头像
          type: string
        templateInfo:
          additionalProperties: {}
          description: 标记字幕动效用的，后端不改内容
          type: object
        textConfig:
          allOf:
            - $ref: '#/components/schemas/vo.TextConfig'
          description: 标记字幕样式用的，后端不改内容
        textInfo:
          $ref: '#/components/schemas/vo.TrackLayerPropTextInfo'
        waveformConfig:
          additionalProperties: {}
          description: 波纹图渲染参数
          type: object
        word_seq:
          description: 字幕轴信息
          items:
            $ref: '#/components/schemas/vo.SubtitleWordSeq'
          type: array
      type: object
    vo.LayerShape:
      properties:
        background_gauss:
          description: 背景高斯模糊取值范围为[0-10]
          type: integer
        color:
          description: 形状背景颜色
          type: string
        content_position:
          allOf:
            - $ref: '#/components/schemas/vo.LayerShapeContentPosition'
          description: 容器内元素位置信息
        disable_shape:
          description: >-
            给合成服务传参时是否【不】套容器；模板给出的素材该字段均为false；用户添加的素材默认true，有需要裁剪或者圆角之类的才改成false
          type: boolean
        object_fit:
          description: 内容填充方式默认 cover /contain/fill/none/scale-down
          type: string
        radius:
          description: 圆角
          type: integer
        type:
          description: 形状 矩形 rect、圆形 circle
          type: string
      type: object
    vo.LayerSubtitle:
      properties:
        font_family:
          allOf:
            - $ref: '#/components/schemas/vo.SubtitleFontFamily'
          description: 字幕字体
        html:
          description: 字幕HTML代码
          type: string
        line_size:
          description: 字幕共多少行
          type: integer
        mss:
          description: 每行多少个字
          type: integer
        prop:
          additionalProperties:
            additionalProperties: {}
            type: object
          description: 字幕样式信息
          type: object
        text:
          description: 字幕文本
          type: string
        tts_info_index:
          description: 标记对应的是哪个 ttsres ，默认情况下等同于场景索引，除非用户删除/添加了场景
          type: integer
        word_seq:
          description: 字幕轴信息
          items:
            $ref: '#/components/schemas/vo.SubtitleWordSeq'
          type: array
      type: object
    vo.TemplateMeta:
      properties:
        is_goods_media:
          description: 该元素是否是商品资源
          type: boolean
        is_logo:
          description: 该元素是否是logo
          type: boolean
        no_need_replace:
          description: 元素不需要替换，元素类型为 other 的时候生效，为 true 的话不会用商品图替换该元素
          type: boolean
      type: object
    vo.LayerTimeline:
      properties:
        cross:
          allOf:
            - $ref: '#/components/schemas/vo.Cross'
          description: 转场信息
        end:
          description: 结束时间
          type: number
        key_frames:
          description: 关键帧
          items:
            $ref: '#/components/schemas/vo.KeyFrame'
          type: array
        start:
          description: 开始时间
          type: number
      type: object
    vo.TrackLayerPropAnimationInfo:
      properties:
        cycle:
          $ref: '#/components/schemas/vo.TrackLayerPropAnimationInfoItem'
        enter:
          $ref: '#/components/schemas/vo.TrackLayerPropAnimationInfoItem'
        leave:
          $ref: '#/components/schemas/vo.TrackLayerPropAnimationInfoItem'
      type: object
    vo.TrackLayerPropClip:
      properties:
        end:
          description: 视频裁剪结束时间
          type: number
        start:
          description: 视频裁剪开始时间
          type: number
      type: object
    vo.TrackLayerPropEmotion:
      properties:
        cover:
          description: 封面图
          type: string
        id:
          description: 情绪表ID
          type: integer
        name:
          description: 情绪名称
          type: string
        preview_transparent_video:
          description: 抠像数字人地址
          type: string
        preview_video:
          description: 压缩过的预览视频地址
          type: string
      type: object
    vo.TrackLayerPropMeta:
      properties:
        cover:
          description: 数字人封面
          type: string
        id:
          type: integer
        name:
          type: string
        origin_height:
          description: 原图高度
          type: integer
        origin_width:
          description: 原图宽度
          type: integer
        person_source:
          description: 数字人来源0:官方提供的数字/1:用户定制数字人
          type: integer
        playback_type:
          description: 仅多机位对话数字人使用；正反播模式，与合成参数的同名字段同含义
          type: string
        preview_transparent_video:
          description: 抠像数字人视频URL
          type: string
        preview_video:
          description: 数字人预览视频URL
          type: string
        show_type_preset:
          allOf:
            - $ref: '#/components/schemas/vo.ShowTypePreset'
          description: 数字人预设的大小和位置
        sub_type:
          description: 具体应用的动态字幕的类型
          type: string
        tts_url:
          description: 仅多机位对话数字人使用；当前数字人元素使用的音频地址
          type: string
        type:
          description: '[字幕类型 static:静态 / animation:动画]'
          type: string
      type: object
    vo.TrackLayerPropShapeInfo:
      properties:
        color:
          description: 色块填充色
          type: string
        html:
          description: 色块HTML代码
          type: string
        strokeColor:
          description: 描边颜色
          type: string
        strokeType:
          description: 描边类型 solid、dotted
          type: string
        strokeWidth:
          description: 描边宽度
          type: integer
        type:
          description: 色块形状 circle、square、triangle
          type: string
      type: object
    vo.TextConfig:
      properties:
        align:
          type: string
        background:
          additionalProperties: {}
          type: object
        color:
          type: string
        fontFamily:
          additionalProperties:
            type: string
          type: object
        fontSize:
          type: number
        fontStyle:
          additionalProperties: {}
          type: object
        padding:
          additionalProperties: {}
          type: object
        shadow:
          additionalProperties: {}
          type: object
        stroke:
          additionalProperties: {}
          type: object
        textDecoration:
          type: string
        verticalAlign:
          type: string
      type: object
    vo.TrackLayerPropTextInfo:
      properties:
        backgroundColor:
          description: 背景颜色
          type: string
        color:
          description: 文字颜色
          type: string
        content:
          description: 文本内容
          type: string
        fontFamily:
          description: 字体
          type: string
        fontFamilyID:
          description: 字体ID
          type: string
        fontFileName:
          description: 字体文件名
          type: string
        fontSize:
          description: 字体大小
          type: number
        fontStyle:
          description: 斜体设置
          type: string
        fontWeight:
          description: 字体粗细 normal | bold | bolder | lighter
          type: string
        paddingBottom:
          description: 下内边距
          type: integer
        paddingLeft:
          description: 左内边距
          type: integer
        paddingRight:
          description: 右内边距
          type: integer
        paddingTop:
          description: 上内边距
          type: integer
        radius:
          description: 圆角
          type: integer
        strokeColor:
          description: 描边颜色
          type: string
        strokeWidth:
          description: 描边宽度
          type: integer
        textAlign:
          description: 文本对齐方式 left | right | center | justify
          type: string
        textDecoration:
          description: ’underline‘ 下划线
          type: string
        textOrientation:
          description: 文本方向
          type: string
        textShadowBlur:
          description: 文本阴影模糊度
          type: number
        textShadowColor:
          description: 文本阴影颜色
          type: string
        textShadowH:
          description: 文本阴影x轴偏移
          type: number
        textShadowV:
          description: 文本阴影y轴偏移
          type: number
        writingMode:
          description: 文本书写方向
          type: string
      type: object
    vo.SubtitleWordSeq:
      properties:
        break:
          description: 前端使用；打断方式，默认为空, 'line' = 强制换行 ｜ 'page' = 强制换页
          type: string
        end:
          description: 单词结束时间，注意这个时间要以当前subtitle的开始时间为准
          type: number
        hide:
          description: 隐藏方式，默认为空, 'true' = 隐藏
          type: boolean
        key:
          description: 单词唯一标识
          type: string
        start:
          description: 单词开始时间，注意这个时间要以当前subtitle的开始时间为准
          type: number
        text:
          description: 字幕单词/单字
          type: string
      type: object
    vo.LayerShapeContentPosition:
      properties:
        h:
          description: 容器内元素高度 【相对容器尺寸，单位为百分比】
          type: number
        r:
          description: 容器内元素旋转角度
          type: integer
        w:
          description: 容器内元素宽度 【相对容器尺寸，单位为百分比】
          type: number
        x:
          description: 容器内元素位置x 【相对容器位置，单位为百分比】
          type: number
        'y':
          description: 容器内元素位置y 【相对容器位置，单位为百分比】
          type: number
      type: object
    vo.SubtitleFontFamily:
      properties:
        name:
          type: string
        url:
          type: string
      type: object
    vo.Cross:
      properties:
        in:
          description: 转场进入方式 null | "fate" | "left" | "right" | "up" | "down"
          items:
            type: string
          type: array
        in_time:
          description: 转场进入的持续时间
          type: number
        out:
          description: 转场离开方式 null | "fate" | "left" | "right" | "up" | "down"
          items:
            type: string
          type: array
        out_time:
          description: 转场离开的持续时间
          type: number
      type: object
    vo.KeyFrame:
      properties:
        func:
          description: 关键帧函数
          type: string
        properties:
          allOf:
            - $ref: '#/components/schemas/vo.KeyFrameProperties'
          description: 关键帧时该元素属性
        timestamp:
          description: 关键帧时间，单位为秒
          type: number
      type: object
    vo.TrackLayerPropAnimationInfoItem:
      properties:
        duration:
          type: number
        effectType:
          type: string
      type: object
    vo.ShowTypePreset:
      properties:
        all:
          $ref: '#/components/schemas/vo.ShowTypePresetItem'
        circle:
          $ref: '#/components/schemas/vo.ShowTypePresetItem'
      type: object
    vo.KeyFrameProperties:
      properties:
        alpha:
          description: 透明度
          type: number
        h:
          description: 元素高度
          type: integer
        r:
          description: 旋转角度
          type: integer
        scale:
          description: 缩放比例
          type: number
        w:
          description: 元素宽度
          type: integer
        x:
          description: 元素位置坐标 x
          type: integer
        'y':
          description: 元素位置坐标 y
          type: integer
      type: object
    vo.ShowTypePresetItem:
      properties:
        shape:
          $ref: '#/components/schemas/vo.ShowTypePresetShape'
        size:
          $ref: '#/components/schemas/vo.ShowTypePresetSize'
      type: object
    vo.ShowTypePresetShape:
      properties:
        color:
          description: 背景颜色
          type: string
        h:
          description: 容器内元素高度 【相对容器尺寸，单位为百分比】
          type: number
        r:
          description: 容器内元素旋转角度
          type: integer
        type:
          description: 形状 矩形 rect、圆形 circle
          type: string
        w:
          description: 容器内元素宽度 【相对容器尺寸，单位为百分比】
          type: number
        x:
          description: 容器内元素位置x 【相对容器位置，单位为百分比】
          type: number
        'y':
          description: 容器内元素位置y 【相对容器位置，单位为百分比】
          type: number
      type: object
    vo.ShowTypePresetSize:
      properties:
        h:
          type: integer
        w:
          type: integer
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````