curl -X POST "https://app.axeimmo.com/api/public/v1/generation/start" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": true,
"images": true
},
"animate_image": true
}'
import requests
url = "https://app.axeimmo.com/api/public/v1/generation/start"
headers = {
"Authorization": "Bearer your_api_key",
"Content-Type": "application/json"
}
data = {
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": True,
"images": True
},
"animate_image": True
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://app.axeimmo.com/api/public/v1/generation/start', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: "Create a video about sustainable energy solutions",
duration: 60,
voice_id: "voice_en_us_female_1",
avatar_id: "avatar_business_woman_1",
format: "vertical",
web_search: {
script: true,
images: true
},
animate_image: true
})
});
const data = await response.json();
console.log(data);
{
"job_id": "run_abcd1234",
"status": "pending",
"estimated_credits": 85
}
{
"error": "Validation failed",
"details": [
{
"code": "MISSING_FIELD",
"message": "Duration is required when using prompt",
"field": "duration"
}
]
}
{
"error": "Insufficient credits. Required: 85, Available: 45",
"code": "INSUFFICIENT_CREDITS"
}
Generation
Start Video Generation
Start generating a video from a prompt, script, or media files
POST
/
api
/
public
/
v1
/
generation
/
start
curl -X POST "https://app.axeimmo.com/api/public/v1/generation/start" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": true,
"images": true
},
"animate_image": true
}'
import requests
url = "https://app.axeimmo.com/api/public/v1/generation/start"
headers = {
"Authorization": "Bearer your_api_key",
"Content-Type": "application/json"
}
data = {
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": True,
"images": True
},
"animate_image": True
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://app.axeimmo.com/api/public/v1/generation/start', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: "Create a video about sustainable energy solutions",
duration: 60,
voice_id: "voice_en_us_female_1",
avatar_id: "avatar_business_woman_1",
format: "vertical",
web_search: {
script: true,
images: true
},
animate_image: true
})
});
const data = await response.json();
console.log(data);
{
"job_id": "run_abcd1234",
"status": "pending",
"estimated_credits": 85
}
{
"error": "Validation failed",
"details": [
{
"code": "MISSING_FIELD",
"message": "Duration is required when using prompt",
"field": "duration"
}
]
}
{
"error": "Insufficient credits. Required: 85, Available: 45",
"code": "INSUFFICIENT_CREDITS"
}
Overview
This endpoint initiates video generation using various input methods. You can generate videos from text prompts, custom scripts, or by providing your own media files (voice, avatar, images).Authentication
This endpoint requires API key authentication. Include your API key in the
Authorization header.Request Body
Video format:
vertical (9:16), square (1:1), ads (4:5), horizontal (16:9), or custom.Response
Example
curl -X POST "https://app.axeimmo.com/api/public/v1/generation/start" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": true,
"images": true
},
"animate_image": true
}'
import requests
url = "https://app.axeimmo.com/api/public/v1/generation/start"
headers = {
"Authorization": "Bearer your_api_key",
"Content-Type": "application/json"
}
data = {
"prompt": "Create a video about sustainable energy solutions",
"duration": 60,
"voice_id": "voice_en_us_female_1",
"avatar_id": "avatar_business_woman_1",
"format": "vertical",
"web_search": {
"script": True,
"images": True
},
"animate_image": True
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://app.axeimmo.com/api/public/v1/generation/start', {
method: 'POST',
headers: {
'Authorization': 'Bearer your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: "Create a video about sustainable energy solutions",
duration: 60,
voice_id: "voice_en_us_female_1",
avatar_id: "avatar_business_woman_1",
format: "vertical",
web_search: {
script: true,
images: true
},
animate_image: true
})
});
const data = await response.json();
console.log(data);
{
"job_id": "run_abcd1234",
"status": "pending",
"estimated_credits": 85
}
{
"error": "Validation failed",
"details": [
{
"code": "MISSING_FIELD",
"message": "Duration is required when using prompt",
"field": "duration"
}
]
}
{
"error": "Insufficient credits. Required: 85, Available: 45",
"code": "INSUFFICIENT_CREDITS"
}
Input Methods
1. Prompt-based Generation
Provide aprompt and duration. The AI will generate a script and find relevant media.
2. Script-based Generation
Provide a customscript along with voice_id or voice_url.
3. Media-based Generation
Providevoice_url and/or avatar_url with custom media files.
Credit Costs
Generation costs depend on several factors:- Base cost: 5 credits every 30 seconds (with 15 seconds of buffer)
- Image animation: +5 credits per image
Next Steps
- Monitor Progress: Check status with
/generation/status/{job_id} - Export Video: Use
/export/startendpoint to export the video in the desired format - Monitor Export Progress: Check status with
/export/status/{job_id}
Error Codes
MISSING_CONTENT: No prompt, script, voice_url, or avatar_url providedMISSING_FIELD: Required duration missing when using promptMISSING_VOICE: No voice specified when using custom scriptINSUFFICIENT_CREDITS: Not enough credits availableINVALID_VOICE_ID: Voice ID not foundINVALID_AVATAR_ID: Avatar ID not foundINVALID_FORMAT: Invalid video format

