GET
/
v1
/
video-projects
/
{id}
Python
from magic_hour import Client
from os import getenv

client = Client(token=getenv("API_TOKEN"))
res = client.v1.video_projects.get(id="cuid-example")
{
  "id": "cuid-example",
  "name": "Example Name",
  "status": "complete",
  "type": "FACE_SWAP",
  "created_at": "2023-11-07T05:31:56Z",
  "width": 512,
  "height": 960,
  "enabled": true,
  "start_seconds": 0,
  "end_seconds": 15,
  "total_frame_cost": 450,
  "credits_charged": 450,
  "fps": 30,
  "error": null,
  "downloads": [
    {
      "url": "https://videos.magichour.ai/id/output.mp4",
      "expires_at": "2024-10-19T05:16:19.027Z"
    }
  ],
  "download": {
    "url": "https://videos.magichour.ai/id/output.mp4",
    "expires_at": "2024-10-19T05:16:19.027Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".

Path Parameters

id
string
required

Unique ID of the video project. This value is returned by all of the POST APIs that create a video.

Example:

"cuid-example"

Response

Success

id
string
required

Unique ID of the video. This value can be used in the get video project API to fetch additional details such as status

Example:

"cuid-example"

name
string | null
required

The name of the video.

Example:

"Example Name"

status
enum<string>
required

The status of the video.

Available options:
draft,
queued,
rendering,
complete,
error,
canceled
Example:

"complete"

type
string
required

The type of the video project. Possible values are ANIMATION, IMAGE_TO_VIDEO, VIDEO_TO_VIDEO, TEXT_TO_VIDEO, FACE_SWAP, LIP_SYNC, AUTO_SUBTITLE, TALKING_PHOTO

Example:

"FACE_SWAP"

created_at
string<date-time>
required
width
integer
required

The width of the final output video. A value of -1 indicates the width can be ignored.

Example:

512

height
integer
required

The height of the final output video. A value of -1 indicates the height can be ignored.

Example:

960

enabled
boolean
required

Indicates whether the resource is deleted

start_seconds
number
required

The start time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.

Required range: x >= 0
Example:

0

end_seconds
number
required

The end time of the input video in seconds. This value is used to trim the input video. The value must be greater than 0.1, and more than the start_seconds.

Required range: x >= 0.1
Example:

15

total_frame_cost
integer
required
deprecated

Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.

The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.

Example:

450

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.

Example:

450

fps
number
required

Frame rate of the video. If the status is not 'complete', the frame rate is an estimate and will be adjusted when the video completes.

Example:

30

error
object | null
required

In the case of an error, this object will contain the error encountered during video render

Example:

null

downloads
object[]
required
download
object | null
required
deprecated

Deprecated: Please use .downloads instead. The download url and expiration date of the video project