POST
/
v1
/
text-to-video
curl --request POST \
  --url https://api.magichour.ai/v1/text-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Text To Video video",
  "end_seconds": 5,
  "orientation": "landscape",
  "style": {
    "prompt": "<string>"
  }
}'
{
  "id": "clx7uu86w0a5qp55yxz315r6r",
  "estimated_frame_cost": 450
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Body
end_seconds
number
required

The total duration of the output video in seconds.

Required range: 5 <= x <= 60
Example:

5

orientation
enum<string>
required

Determines the orientation of the output video

Available options:
portrait,
landscape,
square
Example:

"landscape"

style
object
required
name
string
default:Text To Video - dateTime

The name of video

Example:

"Text To Video video"

Response

200
application/json

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:

"clx7uu86w0a5qp55yxz315r6r"

estimated_frame_cost
integer
required

Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes

Example:

450