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

# Vidu Timing-to-Audio

> Generate controllable sound effect clips using the Vidu model based on timeline. Creators can freely control the timing of multiple sound events within the audio through a timeline. (BGM not supported) After submission, query status via `GET /vidu/ent/v2/tasks/{task_id}/creations`.



## OpenAPI

````yaml api-reference/en/zmodelAudio/vidu/vidu-timing-to-audio.json POST /vidu/ent/v2/timing2audio
openapi: 3.0.1
info:
  title: Vidu Timing-to-Audio
  version: 1.0.0
servers:
  - url: https://api.powertokens.ai
security: []
paths:
  /vidu/ent/v2/timing2audio:
    post:
      summary: Vidu Timing-to-Audio
      description: >-
        Generate controllable sound effect clips using the Vidu model based on
        timeline. Creators can freely control the timing of multiple sound
        events within the audio through a timeline. (BGM not supported) After
        submission, query status via `GET
        /vidu/ent/v2/tasks/{task_id}/creations`.
      operationId: viduTimingToAudioEn
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimingToAudioRequest'
            examples:
              basic_timing_audio:
                summary: Basic timing audio
                value:
                  model: audio1.0
                  duration: 10
                  timing_prompts:
                    - from: 0
                      to: 3
                      prompt: Rain sound
                    - from: 2
                      to: 5
                      prompt: Thunder
                    - from: 6
                      to: 9
                      prompt: Birdsong
                  seed: 42
              overlapping_events:
                summary: Overlapping sound events
                value:
                  model: audio1.0
                  duration: 8
                  timing_prompts:
                    - from: 0
                      to: 8
                      prompt: Ambient background sound
                    - from: 1
                      to: 3
                      prompt: Footsteps
                    - from: 4
                      to: 6
                      prompt: Door opening sound
                    - from: 7
                      to: 8
                      prompt: Door closing sound
              precise_control:
                summary: Precise timing control
                value:
                  model: audio1.0
                  duration: 5
                  timing_prompts:
                    - from: 0
                      to: 0.5
                      prompt: Phone unlock sound
                    - from: 1
                      to: 1.5
                      prompt: Keyboard typing sound
                    - from: 2.5
                      to: 3
                      prompt: Message notification sound
                    - from: 4
                      to: 4.5
                      prompt: Notification ringtone
                  seed: 123456
      responses:
        '200':
          description: Submission successful, returns an audio task object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimingToAudioResponse'
              examples:
                success:
                  value:
                    task_id: your_task_id_here
                    state: created
                    model: audio1.0
                    duration: 10
                    timing_prompts:
                      - from: 0
                        to: 3
                        prompt: Birds chirping in the morning
                      - from: 3
                        to: 6
                        prompt: A distant train passing by
                      - from: 5
                        to: 9.5
                        prompt: Waves gently lapping the beach
                    seed: 0
                    credits: 10
                    created_at: '2025-01-01T10:00:00.000Z'
      security:
        - BearerAuth: []
components:
  schemas:
    TimingToAudioRequest:
      type: object
      required:
        - model
        - timing_prompts
      properties:
        model:
          type: string
          enum:
            - audio1.0
          description: >-
            Audio generation model name.

            - **audio1.0**: Supports generating controllable sound effects based
            on timeline
        duration:
          type: number
          format: float
          default: 10
          minimum: 2
          maximum: 10
          description: |-
            Audio duration in seconds.
            - Default: 10 seconds
            - Range: 2-10 seconds
        timing_prompts:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/TimingPrompt'
          description: >-
            Timeline-based sound event prompts list.

            Each item defines a sound event with from and to timestamps and a
            prompt description.

            Notes:

            - Max 1500 characters per event prompt

            - Events can overlap

            - from and to must be within [0, duration] range
        seed:
          type: integer
          description: |-
            Random seed.
            - If not provided or set to 0, a random value will be used
            - Fixed value ensures reproducibility
        callback_url:
          type: string
          description: >-
            Callback When creating a task, you need to actively set the
            callback_url with a POST request. When the video generation task
            changes its status, Vidu will send a callback request to this URL,
            containing the latest status of the task. The structure of the
            callback request content will be the same as the return body of the
            GET Generation API.The "status" in the callback response includes
            the following states:- processing: Task is being processed.-
            success: Task is completed (if sending fails, it will retry the
            callback three times).- failed: Task failed (if sending fails, it
            will retry the callback three times).Vidu uses a callback signature
            algorithm for verification, check out the details here: Callback
            Signature
    TimingToAudioResponse:
      type: object
      properties:
        task_id:
          type: string
          description: Vidu generated Task ID
        state:
          type: string
          enum:
            - created
            - queueing
            - processing
            - success
            - failed
          description: |-
            Task state:
            - created: Task created successfully
            - queueing: Task in queue
            - processing: Task is being processed
            - success: Generation successful
            - failed: Task failed
        model:
          type: string
          description: Model parameter used
        duration:
          type: integer
          description: Audio duration
        timing_prompts:
          type: array
          items:
            $ref: '#/components/schemas/TimingPrompt'
          description: List of configured sound events
        seed:
          type: integer
          description: Random seed used
        credits:
          type: integer
          description: The credits used for this call
        created_at:
          type: string
          description: Task creation timestamp (ISO8601 format)
    TimingPrompt:
      type: object
      required:
        - from
        - to
        - prompt
      properties:
        from:
          type: number
          format: float
          minimum: 0
          description: |-
            Sound event start time in seconds.
            Must be within [0, duration] range.
        to:
          type: number
          format: float
          description: |-
            Sound event end time in seconds.
            Must be within [0, duration] range and greater than from.
        prompt:
          type: string
          maxLength: 1500
          description: >-
            Text description of the sound event, with a maximum length of 1500
            characters.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````