Create a video generation job
curl --request POST \
--url https://api.creatok.ai/v1/videos/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "<string>",
"input": {},
"max_cost_usd": "<string>",
"metadata": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({model: '<string>', input: {}, max_cost_usd: '<string>', metadata: {}})
};
fetch('https://api.creatok.ai/v1/videos/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.creatok.ai/v1/videos/generation"
payload = {
"model": "<string>",
"input": {},
"max_cost_usd": "<string>",
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "job",
"capability": "<string>",
"model": "<string>",
"status": "queued",
"input": {},
"output": {
"files": [
{
"type": "<string>",
"url": "<string>"
}
]
},
"cost": {
"amount_usd": "<string>",
"refunded_usd": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"created_at": "<string>",
"completed_at": "<string>",
"expires_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Videos
Create a video generation job
POST
/
videos
/
generation
Create a video generation job
curl --request POST \
--url https://api.creatok.ai/v1/videos/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "<string>",
"input": {},
"max_cost_usd": "<string>",
"metadata": {}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({model: '<string>', input: {}, max_cost_usd: '<string>', metadata: {}})
};
fetch('https://api.creatok.ai/v1/videos/generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.creatok.ai/v1/videos/generation"
payload = {
"model": "<string>",
"input": {},
"max_cost_usd": "<string>",
"metadata": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"object": "job",
"capability": "<string>",
"model": "<string>",
"status": "queued",
"input": {},
"output": {
"files": [
{
"type": "<string>",
"url": "<string>"
}
]
},
"cost": {
"amount_usd": "<string>",
"refunded_usd": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"created_at": "<string>",
"completed_at": "<string>",
"expires_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Maximum string length:
255Body
application/json
Response
The generation request was accepted as a Job resource.
Allowed value:
"job"Available options:
queued, running, succeeded, failed, canceled Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

