Video Projects

AI Talking Photo

Changed on

Create a talking photo video from an image and an audio file.

post/v1/ai-talking-photo

Request

  • Base URL
    https://api.magichour.ai
  • URL
    https://api.magichour.ai/v1/ai-talking-photo
  • Auth
    HTTP bearer

Request body

namestring

Give your video a custom name for easy identification.

start_secondsnumber float required

The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s.

end_secondsnumber float required

The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 300s, prompted 60s.

resolution'480p' | '720p'

Output preset. Overrides max_resolution. Defaults to 480p in prompted mode; realistic mode uses the mapped plan maximum.

Example request

{
  "name": "My Talking Photo video",
  "end_seconds": 5,
  "assets": {
    "image_file_path": "api-assets/id/1234.png",
    "audio_file_path": "api-assets/id/1234.mp3"
  },
  "style": {
    "generation_mode": "realistic",
    "prompt": "A person smiling and speaking naturally to the camera"
  },
  "resolution": "480p"
}

Response

Success

idstring required

Unique ID of the video. Use it with the Get video Project API to fetch status and downloads.

credits_chargedinteger required

The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.

If video generation fails, credits will be refunded, and this field will be updated to include the refund.

Example response

{
  "id": "cuid-example",
  "credits_charged": 450
}

Changes

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      removed the Not Found enum value from the response property for the response status

    • info

      removed the Unauthorized enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status