Create a movie
curl --request POST \
--url https://api.keyframe.art/v1/movies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a cinematic 30 second launch film for a compact desk lamp."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'Create a cinematic 30 second launch film for a compact desk lamp.'})
};
fetch('https://api.keyframe.art/v1/movies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.keyframe.art/v1/movies"
payload = { "prompt": "Create a cinematic 30 second launch film for a compact desk lamp." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "movie_abc123",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"duration_seconds": 123,
"aspect_ratio": "16:9",
"progress": {
"percent": 50,
"stage": "<string>"
},
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}Movies
Create a movie
Create an asynchronous movie generation job.
POST
/
movies
Create a movie
curl --request POST \
--url https://api.keyframe.art/v1/movies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a cinematic 30 second launch film for a compact desk lamp."
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({prompt: 'Create a cinematic 30 second launch film for a compact desk lamp.'})
};
fetch('https://api.keyframe.art/v1/movies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.keyframe.art/v1/movies"
payload = { "prompt": "Create a cinematic 30 second launch film for a compact desk lamp." }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "movie_abc123",
"status": "queued",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"duration_seconds": 123,
"aspect_ratio": "16:9",
"progress": {
"percent": 50,
"stage": "<string>"
},
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "req_abc123"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Unique key used to safely retry billable creation requests.
Required string length:
8 - 255Body
application/json
Creative brief for the movie.
Required string length:
10 - 8000Target final movie duration.
Required range:
5 <= x <= 120Available options:
16:9, 9:16, 1:1, 4:5 Natural-language style direction.
Maximum string length:
1000Maximum array length:
20Show child attributes
Show child attributes
Optional HTTPS endpoint for lifecycle events.
Response
Movie job accepted.
Example:
"movie_abc123"
Available options:
queued, planning, generating, rendering, completed, failed, canceled Available options:
16:9, 9:16, 1:1, 4:5 Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I