> ## 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.

# Regenerate script

> Update project input and regenerate its script using prj_id.

MCP tool: `podcast_regenerate_script`. OAuth scope: `podcast.generate`.


## OpenAPI

````yaml api-reference/openapi.json PUT /open/podcast/v1/projects
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/projects:
    put:
      tags:
        - Podcast
      summary: regenerate script
      description: Update project input and regenerate its script using prj_id.
      operationId: podcast_regenerate_script
      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.CreatePodcastProjectReq'
        description: 请求体
        required: true
        x-originalParamName: req
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vo.ProjectEmptyResp'
          description: OK
      security:
        - ApiKey: []
components:
  schemas:
    dto.CreatePodcastProjectReq:
      properties:
        attachments:
          description: 编辑态附件列表
          items:
            $ref: '#/components/schemas/dto.GPTAttachment'
          type: array
        input:
          description: OpenAI Responses 风格 input[].content[]
          items:
            $ref: '#/components/schemas/dto.GPTInputMessage'
          type: array
        language:
          description: 语言
          type: string
        long_text:
          description: 长文本的内容
          type: string
        mixInfo:
          description: 混合来源详情，Origin=8时会有值
          type: integer
        need_send_mq:
          description: 是否发送mq消息
          type: boolean
        network_enabled:
          description: 是否允许联网搜索
          type: boolean
        origin:
          description: 参考资料来源 1:网页 URL/2:YouTube URL/3:文档文件 URL/4:长文本/5:原文本驱动/6:上传脚本/7:上传音频
          enum:
            - 1
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
          type: integer
        podcast_template_id:
          description: 跟创模板
          type: integer
        prj_id:
          description: PutPodcastProject 接口使用，要编辑的项目ID
          type: string
        render_subtitle:
          description: 是否开启字幕 1:开启字幕/2:关闭字幕
          type: integer
        script_params:
          allOf:
            - $ref: '#/components/schemas/dto.GPTScriptParams'
          description: GPT 脚本生成参数
        text:
          description: 编辑态文本，支持 {{ref:id}} 引用附件
          type: string
        tool_choice:
          description: none/auto/required
          enum:
            - none
            - auto
            - required
          type: string
        tools:
          description: 例如 [{"type":"web_search","external_web_access":true}]
          items:
            $ref: '#/components/schemas/dto.GPTTool'
          type: array
        url:
          description: 链接, 上传文件后的地址或者站点地址，以逗号分割的字符串数组
          type: string
        urls:
          description: 链接数组；兼容 url 的逗号分隔格式
          items:
            type: string
          type: array
        video_duration:
          description: 视频总时长
          enum:
            - '-3'
            - '-5'
            - 13-17
            - 18-22
            - 23-30
            - 4-6
            - 7-12
            - 22-28
            - '0.5'
            - 0.5-1
            - 1-3
            - 3-5
            - 5-10
          type: string
      type: object
    vo.ProjectEmptyResp:
      properties:
        project_id:
          type: string
      type: object
    dto.GPTAttachment:
      properties:
        id:
          type: string
        type:
          type: string
        url:
          type: string
      type: object
    dto.GPTInputMessage:
      properties:
        content:
          items:
            $ref: '#/components/schemas/dto.GPTContentBlock'
          type: array
        role:
          enum:
            - developer
            - system
            - user
          type: string
      required:
        - content
        - role
      type: object
    dto.GPTScriptParams:
      properties:
        duration_seconds:
          type: integer
        language:
          type: string
        script_style:
          type: string
        speaker_count:
          type: integer
        target_audience:
          type: string
      type: object
    dto.GPTTool:
      properties:
        external_web_access:
          type: boolean
        type:
          enum:
            - web_search
          type: string
      required:
        - type
      type: object
    dto.GPTContentBlock:
      properties:
        detail:
          enum:
            - auto
            - low
            - high
          type: string
        file_id:
          type: string
        file_url:
          type: string
        image_url:
          type: string
        text:
          type: string
        type:
          enum:
            - input_text
            - input_image
            - input_file
          type: string
      required:
        - type
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````