---
title: "AI Talking Photo"
method: POST
path: "/v1/ai-talking-photo"
tags: ["Video Projects"]
---

# AI Talking Photo

`POST /v1/ai-talking-photo`

Create a talking photo from an image and audio or text input.

## Request body

- object — Provide the assets for creating a talking photo
  - `name` string — Give your image a custom name for easy identification.
  - `start_seconds` number, float, required — The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
  - `end_seconds` number, float, required — The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.
  - `assets` object, required — Provide the assets for creating a talking photo
    - `image_file_path` string, required — The source image to animate. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
    - `audio_file_path` string, required — The audio file to sync with the image. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
  - `style` object — Attributes used to dictate the style of the output
    - `generation_mode` 'realistic' | 'prompted' | 'pro' | 'standard' | 'stable' | 'expressive' — Controls overall motion style. * `realistic` - Maintains likeness well, high quality, and reliable. * `prompted` - Slightly lower likeness; allows option to prompt scene. **Deprecated values (maintained for backward compatibility):** * `pro` - Deprecated: use `realistic` * `standard` - Deprecated: use `prompted` * `stable` - Deprecated: use `realistic` * `expressive` - Deprecated: use `prompted`
    - `prompt` string — A text prompt to guide the generation. Only applicable when generation_mode is `prompted`. This field is ignored for other modes.
  - `max_resolution` integer — Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution.

## Response `200`

Success

- object — Success
  - `id` string, required — Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
  - `credits_charged` integer, 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.

## Other responses

- `400` — Invalid Request
- `401` — Unauthorized
- `402` — Payment Required
- `404` — Not Found
- `422` — Unprocessable Entity

---

[API](https://skmtc.net/magichourhq/apis/magic-hour-api.md) · [All operations](https://skmtc.net/magichourhq/apis/magic-hour-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/magichourhq/magic-hour-api/revisions/379ec88a7e47/schema)
