curl --request POST \
--url https://api.motion.so/api/motion/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a 20-second launch video."
}
'{
"job_id": "<string>",
"status": "queued",
"status_url": "<string>",
"chat_url": "<string>",
"engine": "<string>",
"effort": "standard",
"template": "<string>"
}{
"error": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"details": [
{}
]
}{
"error": "insufficient_credits",
"code": "<string>",
"message": "<string>",
"minimum_required_credits": 123,
"current_balance": 123
}{
"error": "engine_access_required",
"message": "Your account does not have access to this engine. Use list_engines or GET /engines to see available engines."
}API Reference
Create a video
POST
/
sessions
curl --request POST \
--url https://api.motion.so/api/motion/sessions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "Create a 20-second launch video."
}
'{
"job_id": "<string>",
"status": "queued",
"status_url": "<string>",
"chat_url": "<string>",
"engine": "<string>",
"effort": "standard",
"template": "<string>"
}{
"error": "<string>",
"details": [
{}
]
}{
"error": "<string>",
"details": [
{}
]
}{
"error": "insufficient_credits",
"code": "<string>",
"message": "<string>",
"minimum_required_credits": 123,
"current_balance": 123
}{
"error": "engine_access_required",
"message": "Your account does not have access to this engine. Use list_engines or GET /engines to see available engines."
}Authorizations
Body
application/json
Creates a durable video job owned by the API key user. Requires available Motion credits on that user's account. Credits and auto top-ups are managed at https://motion.so, not through the API.
Response
Job accepted
Was this page helpful?