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

# Generate background

> Generate one host background in the shared Podcast library. Select typ 0 for speaker focus or 2 for alternating shots; poll get_image_task with the returned ID.

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


## OpenAPI

````yaml api-reference/openapi.json POST /open/podcast/v1/backgrounds/generate
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/backgrounds/generate:
    post:
      tags:
        - Podcast
      summary: generate background
      description: >-
        Generate one host background in the shared Podcast library. Select typ 0
        for speaker focus or 2 for alternating shots; poll get_image_task with
        the returned ID.
      operationId: podcast_generate_background
      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.PodcastGenerateBackgroundReq'
        description: One Podcast host background
        required: true
        x-originalParamName: req
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/echo.JSON'
                  - properties:
                      data:
                        type: string
                    type: object
          description: OK
        '429':
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  retry_after:
                    minimum: 1
                    type: integer
                required:
                  - code
                  - msg
                  - retry_after
                type: object
          description: >-
            Shared user and Space rate limit exceeded. Retry after the indicated
            number of seconds.
          headers:
            Retry-After:
              description: Seconds until the request can be retried.
              schema:
                type: integer
        '503':
          description: Rate limiter unavailable; the business operation was not executed.
      security:
        - ApiKey: []
components:
  schemas:
    dto.PodcastGenerateBackgroundReq:
      properties:
        aspect_ratio:
          description: '0: 9:16, 1: 16:9, 2: 1:1; covers also accept 3: 3:4 and 4: 4:3.'
          enum:
            - 0
            - 1
            - 2
            - 3
            - 4
          maximum: 4
          minimum: 0
          type: integer
        avatar_type:
          description: Background avatar category; defaults to default.
          enum:
            - default
            - pet
            - cartoon
          type: string
        detail:
          description: Image prompt, up to 16000 characters.
          maxLength: 16000
          type: string
        model:
          default: nano-banana-pro
          description: Public model name, mapped to the existing Web model.
          enum:
            - nano-banana
            - nano-banana-pro
            - gpt-image-2
          type: string
        quality:
          description: Optional GPT Image 2 quality.
          enum:
            - low
            - medium
            - high
          type: string
        reference_images:
          description: Optional reference images.
          items:
            $ref: '#/components/schemas/dto.ReferenceImageReq'
          type: array
        resolution:
          default: 2K
          description: >-
            Output resolution; uses the existing Web price for the selected
            model.
          enum:
            - 1K
            - 2K
            - 4K
          type: string
        typ:
          description: '0: speaker focus, 2: alternating shots.'
          enum:
            - 0
            - 2
          type: integer
      required:
        - detail
        - typ
      type: object
    echo.JSON:
      properties:
        cause:
          type: string
        code:
          type: integer
        data: {}
        details: {}
        msg:
          type: string
        rid:
          type: string
      type: object
    dto.ReferenceImageReq:
      properties:
        key:
          description: >-
            Reference type. No fixed enumeration for source=image, background,
            podcast_background, or podcast_cover.
          type: string
        url:
          description: Image URL.
          type: string
      required:
        - key
        - url
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: X-Api-Key
      type: apiKey

````