{
 "openapi": "3.1.0",
 "info": {
  "title": "GoMotion API",
  "version": "1.3.0",
  "description": "Create AI documentary videos from a script or your own voiceover, write scripts and thumbnails, and export MP4s — with the same credits as the GoMotion studio. Docs: https://gomotionai.com/developers Since 1.3: Shorts (vertical videos in ready-made niches) through /v1/shorts, paid from the Shorts credits pot."
 },
 "servers": [
  {
   "url": "https://gomotionai.com"
  }
 ],
 "security": [
  {
   "bearer": []
  },
  {
   "apiKey": []
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer",
    "description": "Authorization: Bearer gmk_live_..."
   },
   "apiKey": {
    "type": "apiKey",
    "in": "header",
    "name": "X-API-Key"
   }
  },
  "schemas": {
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "string",
      "description": "Human readable message (English)."
     },
     "code": {
      "type": "string",
      "description": "Stable machine code (on errors added in API 1.1): plan_required, key_videos_in_flight, key_videos_per_day, account_videos_per_day, api_capacity, api_paused, api_not_enabled; API 1.2: topic_no_references, topic_search_failed, webhook_limit, webhooks_paused, dns, blocked_address.; API 1.3 (Shorts): invalid_options, not_sellable, over_max_cost, insufficient_shorts_credits, niche_closed, shorts_limit, shorts_unavailable, not_yours, upload_missing, upload_too_large, link_expired, api_paused."
     },
     "retry_after": {
      "type": "integer",
      "description": "Seconds to wait before retrying (also in the Retry-After header)."
     },
     "required_plan": {
      "type": "string"
     },
     "needed": {
      "type": "integer"
     },
     "available": {
      "type": "integer"
     },
     "cap": {
      "type": "integer"
     },
     "spent": {
      "type": "integer"
     },
     "limit": {
      "type": "integer"
     },
     "cost_credits": {
      "type": "integer"
     },
     "max_cost_credits": {
      "type": "integer"
     },
     "errors": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      },
      "description": "422 invalid_options: {option: reason}."
     },
     "buy_url": {
      "type": "string"
     }
    },
    "additionalProperties": true,
    "required": [
     "error"
    ]
   },
   "Video": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^j_[a-f0-9]{16}$"
     },
     "object": {
      "const": "video"
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "cancelled",
       "interrupted"
      ]
     },
     "progress": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "percent": {
          "type": [
           "integer",
           "null"
          ]
         },
         "phase": {
          "type": [
           "string",
           "null"
          ]
         },
         "eta_s": {
          "type": [
           "integer",
           "null"
          ]
         }
        },
        "additionalProperties": false,
        "required": [
         "percent",
         "phase",
         "eta_s"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "queue_position": {
      "type": [
       "integer",
       "null"
      ]
     },
     "project_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "estimated_duration_sec": {
      "type": [
       "number",
       "null"
      ]
     },
     "cost_credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "refunded": {
      "type": "boolean"
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "updated_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "progress",
     "queue_position",
     "project_id",
     "estimated_duration_sec",
     "cost_credits",
     "refunded",
     "error",
     "created_at",
     "updated_at"
    ]
   },
   "Export": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^j_[a-f0-9]{16}$"
     },
     "object": {
      "const": "export"
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "cancelled",
       "interrupted"
      ]
     },
     "progress": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "percent": {
          "type": [
           "integer",
           "null"
          ]
         },
         "phase": {
          "type": [
           "string",
           "null"
          ]
         },
         "eta_s": {
          "type": [
           "integer",
           "null"
          ]
         }
        },
        "additionalProperties": false,
        "required": [
         "percent",
         "phase",
         "eta_s"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "queue_position": {
      "type": [
       "integer",
       "null"
      ]
     },
     "project_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "cost_credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "refunded": {
      "type": "boolean"
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "download_url": {
      "type": [
       "string",
       "null"
      ],
      "description": "Signed MP4 link (only when status is succeeded). Re-signed on every GET. Valid 12 h; the file is kept 48 h: download it and host it yourself."
     },
     "download_url_expires_in_s": {
      "type": [
       "integer",
       "null"
      ]
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "updated_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "download_filename": {
      "type": [
       "string",
       "null"
      ],
      "description": "File name the download_url saves as (download_filename of the export call, default gomotion_video.mp4; null until succeeded). Since API 1.2."
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "progress",
     "queue_position",
     "project_id",
     "cost_credits",
     "refunded",
     "error",
     "download_url",
     "download_url_expires_in_s",
     "created_at",
     "updated_at"
    ]
   },
   "VideoList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Video"
      }
     },
     "has_more": {
      "type": "boolean"
     },
     "next_starting_after": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as ?starting_after= to get the next page (null on the last page). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "has_more"
    ]
   },
   "ExportList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Export"
      }
     },
     "has_more": {
      "type": "boolean"
     },
     "next_starting_after": {
      "type": [
       "string",
       "null"
      ],
      "description": "Pass as ?starting_after= to get the next page (null on the last page). Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "has_more"
    ]
   },
   "ScriptResult": {
    "type": "object",
    "properties": {
     "title": {
      "type": "string"
     },
     "script": {
      "type": "string"
     },
     "words": {
      "type": [
       "integer",
       "null"
      ]
     },
     "estimated_minutes": {
      "type": [
       "number",
       "null"
      ]
     },
     "references": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "credits": {
      "type": "integer"
     },
     "included_in_plan": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "title",
     "script",
     "words",
     "estimated_minutes",
     "references",
     "credits",
     "included_in_plan"
    ]
   },
   "ThumbnailResult": {
    "type": "object",
    "properties": {
     "url": {
      "type": [
       "string",
       "null"
      ]
     },
     "permanent": {
      "type": "boolean"
     },
     "title": {
      "type": "string"
     },
     "references": {
      "type": "array"
     },
     "credits": {
      "type": "integer"
     },
     "included_in_plan": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "url",
     "permanent",
     "title",
     "references",
     "credits",
     "included_in_plan"
    ]
   },
   "Task": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^(scr|thm)_[a-f0-9]{16}$"
     },
     "object": {
      "enum": [
       "script",
       "thumbnail"
      ]
     },
     "status": {
      "enum": [
       "running",
       "succeeded",
       "failed"
      ]
     },
     "result": {
      "oneOf": [
       {
        "$ref": "#/components/schemas/ScriptResult"
       },
       {
        "$ref": "#/components/schemas/ThumbnailResult"
       },
       {
        "type": "null"
       }
      ]
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "updated_at": {
      "type": "integer"
     },
     "credits_refunded": {
      "type": [
       "integer",
       "null"
      ]
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     },
     "references_source": {
      "enum": [
       "channel",
       "video_ids",
       "topic_search"
      ],
      "description": "Scripts only: where the style references came from. Since API 1.2."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status",
     "result",
     "error",
     "created_at",
     "updated_at"
    ]
   },
   "Credits": {
    "type": "object",
    "properties": {
     "balance": {
      "type": "integer"
     },
     "held": {
      "type": "integer"
     },
     "available": {
      "type": "integer"
     },
     "expires_at": {
      "type": "integer"
     },
     "topup_credits": {
      "type": "integer"
     },
     "renews_at": {
      "type": "integer"
     },
     "key": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "max_credits_day": {
          "type": "integer"
         },
         "spent_today": {
          "type": "integer"
         }
        },
        "additionalProperties": false,
        "required": [
         "id",
         "max_credits_day",
         "spent_today"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "shorts": {
      "$ref": "#/components/schemas/ShortsPot",
      "description": "The Shorts credits pot (since 1.3)."
     }
    },
    "additionalProperties": false,
    "required": [
     "balance",
     "held",
     "available",
     "expires_at",
     "topup_credits",
     "renews_at",
     "key"
    ]
   },
   "CreditsHistory": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "at": {
         "type": "integer"
        },
        "type": {
         "enum": [
          "credit",
          "hold",
          "charge",
          "refund",
          "adjustment",
          "expiry",
          "other"
         ]
        },
        "credits": {
         "type": "integer"
        },
        "balance_after": {
         "type": "integer"
        },
        "job_id": {
         "type": [
          "string",
          "null"
         ]
        },
        "short_id": {
         "oneOf": [
          {
           "type": "string",
           "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
           "description": "A Short's id, e.g. 20261116-111525-7602bf."
          },
          {
           "type": "null"
          }
         ],
         "description": "pot=shorts: the Short of this row (since 1.3)."
        }
       },
       "additionalProperties": false,
       "required": [
        "at",
        "type",
        "credits",
        "balance_after",
        "job_id"
       ]
      }
     },
     "pot": {
      "enum": [
       "long",
       "shorts"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "Account": {
    "type": "object",
    "properties": {
     "object": {
      "const": "account"
     },
     "plan": {
      "type": [
       "string",
       "null"
      ]
     },
     "limits": {
      "type": "object",
      "properties": {
       "requests_per_minute_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "requests_per_minute_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "paid_requests_per_minute_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "scripts_and_thumbnails_in_progress_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_in_progress_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_in_progress_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_per_day_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "videos_per_day_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "active_keys_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "shorts_in_progress_per_account": {
        "type": [
         "integer",
         "null"
        ]
       },
       "shorts_in_progress_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "shorts_per_day_per_key": {
        "type": [
         "integer",
         "null"
        ]
       },
       "shorts_per_day_per_account": {
        "type": [
         "integer",
         "null"
        ]
       }
      },
      "additionalProperties": false
     },
     "custom_limits": {
      "type": "boolean",
      "description": "true = GoMotion set limits for this account (ask support@gomotionai.com). Since API 1.2."
     },
     "key": {
      "oneOf": [
       {
        "type": "object",
        "properties": {
         "id": {
          "type": "string"
         },
         "scopes": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "max_credits_day": {
          "type": "integer"
         },
         "credits_spent_today": {
          "type": "integer"
         },
         "videos_today": {
          "type": "integer"
         },
         "videos_in_progress": {
          "type": "integer"
         }
        },
        "additionalProperties": false,
        "required": [
         "id",
         "scopes",
         "max_credits_day",
         "credits_spent_today",
         "videos_today",
         "videos_in_progress"
        ]
       },
       {
        "type": "null"
       }
      ]
     },
     "plan_name": {
      "type": [
       "string",
       "null"
      ],
      "description": "The account's plan (since 1.3)."
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "plan",
     "limits",
     "key"
    ]
   },
   "Quote": {
    "type": "object",
    "properties": {
     "duration_sec": {
      "type": "integer"
     },
     "lang": {
      "type": "string"
     },
     "voice": {
      "type": [
       "string",
       "null"
      ]
     },
     "quality": {
      "enum": [
       "standard",
       "high"
      ]
     },
     "cost_credits": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "duration_sec",
     "lang",
     "voice",
     "quality",
     "cost_credits"
    ]
   },
   "Languages": {
    "type": "object",
    "properties": {
     "languages": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "model": {
         "type": [
          "string",
          "null"
         ]
        },
        "chars_per_min": {
         "type": [
          "number",
          "null"
         ]
        },
        "quality": {
         "enum": [
          "standard",
          "high"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "code",
        "name",
        "model",
        "chars_per_min",
        "quality"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "languages"
    ]
   },
   "Voices": {
    "type": "object",
    "properties": {
     "lang": {
      "type": "string"
     },
     "voices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "gender": {
         "type": [
          "string",
          "null"
         ]
        },
        "age": {
         "type": [
          "string",
          "null"
         ]
        },
        "style": {
         "type": [
          "string",
          "null"
         ]
        },
        "region": {
         "type": [
          "string",
          "null"
         ]
        },
        "model": {
         "type": [
          "string",
          "null"
         ]
        },
        "sample_url": {
         "type": [
          "string",
          "null"
         ]
        },
        "quality": {
         "enum": [
          "standard",
          "high"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "name",
        "gender",
        "age",
        "style",
        "region",
        "model",
        "sample_url",
        "quality"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "lang",
     "voices"
    ]
   },
   "References": {
    "type": "object",
    "properties": {
     "object": {
      "const": "references"
     },
     "type": {
      "enum": [
       "channel",
       "video"
      ]
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ]
     },
     "videos": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "title": {
         "type": "string"
        },
        "url": {
         "type": "string"
        },
        "thumbnail_url": {
         "type": [
          "string",
          "null"
         ]
        },
        "duration_sec": {
         "type": [
          "integer",
          "null"
         ]
        },
        "views": {
         "type": [
          "integer",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "title",
        "url",
        "thumbnail_url",
        "duration_sec",
        "views"
       ]
      }
     },
     "credits": {
      "type": "object",
      "properties": {
       "script": {
        "type": "integer"
       },
       "thumbnail": {
        "type": "integer"
       }
      },
      "additionalProperties": false,
      "required": [
       "script",
       "thumbnail"
      ]
     },
     "included_in_plan_left": {
      "type": "object",
      "properties": {
       "scripts": {
        "type": "integer"
       },
       "thumbnails": {
        "type": "integer"
       }
      },
      "additionalProperties": false,
      "required": [
       "scripts",
       "thumbnails"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "type",
     "sort",
     "videos",
     "credits",
     "included_in_plan_left"
    ]
   },
   "ScriptUpload": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string"
     },
     "chars": {
      "type": "integer"
     },
     "expires_in_hours": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "key",
     "chars",
     "expires_in_hours"
    ]
   },
   "Upload": {
    "type": "object",
    "properties": {
     "object": {
      "const": "upload"
     },
     "kind": {
      "enum": [
       "audio",
       "music"
      ]
     },
     "key": {
      "type": "string"
     },
     "put_url": {
      "type": "string"
     },
     "method": {
      "const": "PUT"
     },
     "expires_in_s": {
      "type": "integer"
     },
     "max_bytes": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "kind",
     "key",
     "put_url",
     "method",
     "expires_in_s",
     "max_bytes"
    ]
   },
   "VideoCreate": {
    "type": "object",
    "properties": {
     "script": {
      "type": "string",
      "maxLength": 50000,
      "description": "The narration text (TTS voice). One of script, script_key, audio_key."
     },
     "script_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads/script (for long scripts)."
     },
     "audio_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads with kind=audio: your own voiceover (no TTS)."
     },
     "duration_sec": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5400,
      "description": "Length of your audio in seconds (required with audio_key). You are billed on the real length the server measures."
     },
     "lang": {
      "type": "string",
      "description": "Language code from GET /v1/languages, or auto. Default en (script) / auto (audio)."
     },
     "voice": {
      "type": "string",
      "description": "Voice id from GET /v1/voices (script videos only)."
     },
     "title": {
      "type": "string",
      "maxLength": 150
     },
     "subtitles": {
      "type": "boolean",
      "default": true
     },
     "animations": {
      "type": "boolean",
      "default": true
     },
     "background": {
      "type": "string",
      "description": "blue (default), cinematic, vintage, light or grid",
      "examples": [
       "blue",
       "cinematic",
       "vintage",
       "light",
       "grid"
      ]
     },
     "no_music": {
      "type": "boolean",
      "default": false
     },
     "music_volume": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 0.03
     },
     "music_style": {
      "enum": [
       "epic",
       "documentary",
       "tension",
       "sad",
       "chill",
       "upbeat"
      ]
     },
     "music_track": {
      "type": "string",
      "description": "'<mood>/<file>.mp3' from the music catalog"
     },
     "music_key": {
      "type": "string",
      "description": "Key from POST /v1/uploads with kind=music: your own background track."
     },
     "max_cost_credits": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000,
      "description": "Refuse (422) if the video would cost more; never charged above it. Not with audio_key."
     },
     "options": {
      "type": "object",
      "description": "Same fields nested (accepted for web-body compatibility)."
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true
   },
   "ExportCreate": {
    "type": "object",
    "properties": {
     "quality": {
      "enum": [
       "high",
       "medium",
       "fast"
      ],
      "default": "medium"
     },
     "download_filename": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9 ._()-]{0,95}(\\.[mM][pP]4)?$",
      "description": "File name of the download (your brand, not GoMotion's); .mp4 is added. Default gomotion_video.mp4."
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Default: the video's."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Default: the video's metadata."
     }
    },
    "additionalProperties": true
   },
   "ScriptCreate": {
    "type": "object",
    "properties": {
     "channel_url": {
      "type": "string",
      "maxLength": 500,
      "description": "YouTube channel link; the first 3 videos are the references. Or pass video_ids."
     },
     "video_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "reference_titles": {
      "type": "array",
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "topic": {
      "type": "string",
      "minLength": 8,
      "maxLength": 400,
      "description": "What the script is about. Alone (no channel_url / video_ids) GoMotion searches YouTube for the topic and uses 3 videos as style references (same price)."
     },
     "minutes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 90,
      "default": 8
     },
     "lang": {
      "type": "string",
      "description": "Force the script language (e.g. en, es)."
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ],
      "default": "recent"
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true
   },
   "ThumbnailCreate": {
    "type": "object",
    "properties": {
     "title": {
      "type": "string",
      "maxLength": 300
     },
     "text": {
      "type": "string",
      "maxLength": 120
     },
     "subject": {
      "type": "string",
      "maxLength": 300
     },
     "script": {
      "type": "string",
      "maxLength": 50000
     },
     "with_text": {
      "type": "boolean",
      "default": true
     },
     "channel_url": {
      "type": "string",
      "maxLength": 500
     },
     "video_ids": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
       "type": "string"
      }
     },
     "sort": {
      "enum": [
       "recent",
       "popular"
      ],
      "default": "recent"
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": true,
    "required": [
     "title"
    ]
   },
   "UploadCreate": {
    "type": "object",
    "properties": {
     "kind": {
      "enum": [
       "audio",
       "music"
      ]
     }
    },
    "additionalProperties": true,
    "required": [
     "kind"
    ]
   },
   "ScriptUploadCreate": {
    "type": "object",
    "properties": {
     "text": {
      "type": "string",
      "maxLength": 50000
     }
    },
    "additionalProperties": true,
    "required": [
     "text"
    ]
   },
   "Webhook": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "url": {
      "type": "string"
     },
     "events": {
      "type": "array",
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed"
       ]
      }
     },
     "description": {
      "type": "string"
     },
     "status": {
      "enum": [
       "enabled",
       "disabled"
      ]
     },
     "disabled_reason": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "last_success_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_failure_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "failed_in_a_row": {
      "type": "integer",
      "description": "Events in a row that used all attempts (25 disables the endpoint)."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "url",
     "events",
     "description",
     "status",
     "disabled_reason",
     "created_at",
     "last_success_at",
     "last_failure_at",
     "failed_in_a_row"
    ]
   },
   "WebhookWithSecret": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "url": {
      "type": "string"
     },
     "events": {
      "type": "array",
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed"
       ]
      }
     },
     "description": {
      "type": "string"
     },
     "status": {
      "enum": [
       "enabled",
       "disabled"
      ]
     },
     "disabled_reason": {
      "type": [
       "string",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "last_success_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_failure_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "failed_in_a_row": {
      "type": "integer",
      "description": "Events in a row that used all attempts (25 disables the endpoint)."
     },
     "secret": {
      "type": "string",
      "pattern": "^whsec_",
      "description": "Signing secret. Shown only on create and rotate-secret: store it."
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "url",
     "events",
     "description",
     "status",
     "disabled_reason",
     "created_at",
     "last_success_at",
     "last_failure_at",
     "failed_in_a_row",
     "secret"
    ]
   },
   "WebhookList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Webhook"
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "WebhookDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "object": {
      "const": "webhook"
     },
     "deleted": {
      "const": true
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "deleted"
    ]
   },
   "WebhookTestResult": {
    "type": "object",
    "properties": {
     "object": {
      "const": "webhook_test"
     },
     "event_id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "delivered": {
      "type": "boolean"
     },
     "status_code": {
      "type": [
       "integer",
       "null"
      ]
     },
     "error": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "event_id",
     "delivered",
     "status_code",
     "error"
    ]
   },
   "WebhookDelivery": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "object": {
      "const": "webhook_delivery"
     },
     "type": {
      "enum": [
       "video.succeeded",
       "video.failed",
       "video.cancelled",
       "export.succeeded",
       "export.failed",
       "export.cancelled",
       "script.succeeded",
       "script.failed",
       "thumbnail.succeeded",
       "thumbnail.failed",
       "webhook.test"
      ]
     },
     "object_id": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "enum": [
       "pending",
       "delivered",
       "failed"
      ]
     },
     "attempts": {
      "type": "integer"
     },
     "last_status_code": {
      "type": [
       "integer",
       "null"
      ]
     },
     "last_error": {
      "type": [
       "string",
       "null"
      ]
     },
     "next_attempt_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "created_at": {
      "type": "integer"
     },
     "delivered_at": {
      "type": [
       "integer",
       "null"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "type",
     "object_id",
     "status",
     "attempts",
     "last_status_code",
     "last_error",
     "next_attempt_at",
     "created_at",
     "delivered_at"
    ]
   },
   "WebhookDeliveryList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/WebhookDelivery"
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "WebhookDeliveryRetry": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$"
     },
     "object": {
      "const": "webhook_delivery"
     },
     "status": {
      "const": "pending"
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "status"
    ]
   },
   "WebhookTestObject": {
    "type": "object",
    "properties": {
     "object": {
      "const": "webhook_test"
     },
     "webhook_id": {
      "type": "string",
      "pattern": "^wh_[a-f0-9]{16}$"
     },
     "message": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "webhook_id",
     "message"
    ]
   },
   "Event": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^evt_[a-f0-9]{20}$",
      "description": "Same id on every retry: dedupe on it."
     },
     "object": {
      "const": "event"
     },
     "type": {
      "enum": [
       "video.succeeded",
       "video.failed",
       "video.cancelled",
       "export.succeeded",
       "export.failed",
       "export.cancelled",
       "script.succeeded",
       "script.failed",
       "thumbnail.succeeded",
       "thumbnail.failed",
       "webhook.test"
      ]
     },
     "api_version": {
      "const": "2026-11-01"
     },
     "created_at": {
      "type": "integer"
     },
     "data": {
      "type": "object",
      "properties": {
       "object": {
        "anyOf": [
         {
          "$ref": "#/components/schemas/Video"
         },
         {
          "$ref": "#/components/schemas/Export"
         },
         {
          "$ref": "#/components/schemas/Task"
         },
         {
          "$ref": "#/components/schemas/WebhookTestObject"
         }
        ],
        "description": "The same object GET /v1/videos|exports|scripts|thumbnails/{id} returns."
       }
      },
      "additionalProperties": false,
      "required": [
       "object"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "type",
     "api_version",
     "created_at",
     "data"
    ],
    "description": "Body of every webhook POST. Headers: GoMotion-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>, GoMotion-Event-Id, GoMotion-Event-Type."
   },
   "WebhookCreate": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "maxLength": 2000,
      "description": "https, port 443, a public host name (no IP, no localhost/.local/.internal); every address it resolves to must be public. 10 s timeout, no redirects."
     },
     "events": {
      "type": "array",
      "minItems": 1,
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed",
        "short.succeeded",
        "short.failed",
        "short.cancelled",
        "short.succeeded",
        "short.failed",
        "short.cancelled",
        "*"
       ]
      },
      "description": "Default (or [\"*\"]): all events."
     },
     "description": {
      "type": "string",
      "maxLength": 200
     }
    },
    "additionalProperties": true,
    "required": [
     "url"
    ]
   },
   "WebhookUpdate": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "maxLength": 2000,
      "description": "https, port 443, a public host name (no IP, no localhost/.local/.internal); every address it resolves to must be public. 10 s timeout, no redirects."
     },
     "events": {
      "type": "array",
      "minItems": 1,
      "items": {
       "enum": [
        "video.succeeded",
        "video.failed",
        "video.cancelled",
        "export.succeeded",
        "export.failed",
        "export.cancelled",
        "script.succeeded",
        "script.failed",
        "thumbnail.succeeded",
        "thumbnail.failed",
        "short.succeeded",
        "short.failed",
        "short.cancelled",
        "short.succeeded",
        "short.failed",
        "short.cancelled",
        "*"
       ]
      },
      "description": "Default (or [\"*\"]): all events."
     },
     "description": {
      "type": "string",
      "maxLength": 200
     },
     "enabled": {
      "type": "boolean",
      "description": "true re-enables an endpoint disabled after failures."
     }
    },
    "additionalProperties": true
   },
   "ShortChoice": {
    "type": "object",
    "properties": {
     "value": {},
     "label": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": "string"
     },
     "tags": {
      "type": "array"
     },
     "group": {
      "type": "string"
     },
     "gender": {
      "type": "string"
     },
     "seconds": {
      "type": "number",
      "description": "Length choices only: the choice in seconds."
     },
     "sets": {
      "type": "object",
      "description": "Picking this choice also sets these options (a preset), unless the order sets them itself."
     },
     "show_if": {
      "type": "object"
     }
    },
    "additionalProperties": true,
    "required": [
     "value"
    ]
   },
   "ShortOption": {
    "type": "object",
    "properties": {
     "key": {
      "type": "string"
     },
     "type": {
      "enum": [
       "string",
       "text",
       "enum",
       "enum_list",
       "string_list",
       "boolean",
       "number",
       "range",
       "color",
       "url",
       "upload",
       "voice",
       "language",
       "music",
       "background",
       "caption_style",
       "ideas",
       "list"
      ]
     },
     "label": {
      "type": "string"
     },
     "help": {
      "type": "string"
     },
     "placeholder": {
      "type": "string"
     },
     "default": {},
     "default_is_sample": {
      "type": "boolean"
     },
     "choices": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ShortChoice"
      }
     },
     "allow_custom": {
      "type": "boolean"
     },
     "min": {
      "type": "number"
     },
     "max": {
      "type": "number"
     },
     "step_size": {
      "type": "number"
     },
     "unit": {
      "type": "string"
     },
     "integer": {
      "type": "boolean"
     },
     "max_length": {
      "type": "integer"
     },
     "max_items": {
      "type": "integer"
     },
     "min_items": {
      "type": "integer"
     },
     "multiline": {
      "type": "boolean"
     },
     "required": {
      "type": "boolean"
     },
     "advanced": {
      "type": "boolean"
     },
     "simple": {
      "type": "boolean",
      "description": "One of the niche's main options (the web's quick form)."
     },
     "show_if": {
      "type": "object",
      "description": "The option only counts when every key here has that value: {key: value | [values] | {$ne: v} | {$in: [...]} | {$truthy: bool}}."
     },
     "ai_fills_when_empty": {
      "type": "boolean",
      "description": "Left empty, the niche's AI writes it."
     },
     "section": {
      "type": "string"
     },
     "section_title": {
      "type": "string"
     },
     "upload": {
      "type": "object",
      "properties": {
       "kind": {
        "enum": [
         "image",
         "video",
         "audio"
        ]
       },
       "accept": {
        "type": "string"
       },
       "max_mb": {
        "type": [
         "number",
         "null"
        ]
       }
      },
      "additionalProperties": false,
      "required": [
       "kind"
      ]
     },
     "voice": {
      "type": "object",
      "properties": {
       "presets_only": {
        "type": "boolean"
       },
       "own_clones": {
        "type": "boolean"
       }
      },
      "additionalProperties": false
     },
     "item": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ShortOption"
      }
     }
    },
    "additionalProperties": true,
    "required": [
     "key",
     "type",
     "simple"
    ]
   },
   "ShortLength": {
    "type": "object",
    "properties": {
     "option": {
      "type": [
       "string",
       "null"
      ]
     },
     "choices": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "value": {},
        "seconds": {
         "type": "number"
        },
        "label": {
         "type": [
          "string",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "value",
        "seconds"
       ]
      }
     },
     "min": {
      "type": "number"
     },
     "max": {
      "type": "number"
     },
     "step_size": {
      "type": "number"
     },
     "unit": {
      "type": "string"
     },
     "default": {},
     "only_when": {
      "type": [
       "object",
       "null"
      ]
     },
     "other_values": {
      "type": "array"
     },
     "driven_by": {
      "const": "content",
      "description": "No length option: the content sets the length."
     },
     "min_seconds": {
      "type": [
       "number",
       "null"
      ]
     },
     "max_seconds": {
      "type": [
       "number",
       "null"
      ]
     },
     "default_seconds": {
      "type": [
       "number",
       "null"
      ]
     }
    },
    "additionalProperties": true,
    "required": [
     "option"
    ]
   },
   "NicheSummary": {
    "type": "object",
    "properties": {
     "slug": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "tagline": {
      "type": [
       "string",
       "null"
      ]
     },
     "tags": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "aspect": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     },
     "orderable": {
      "type": "boolean"
     },
     "length": {
      "$ref": "#/components/schemas/ShortLength"
     },
     "features": {
      "type": "object",
      "properties": {
       "voice": {
        "type": "boolean"
       },
       "language": {
        "type": "boolean"
       },
       "characters": {
        "type": "boolean"
       },
       "photo": {
        "type": "boolean"
       },
       "captions_switch": {
        "type": "boolean"
       },
       "uploads": {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      },
      "additionalProperties": false,
      "required": [
       "voice",
       "language",
       "characters",
       "photo",
       "uploads"
      ]
     },
     "simple_options": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "preview": {
      "type": "object",
      "properties": {
       "video_url": {
        "type": [
         "string",
         "null"
        ]
       },
       "image_url": {
        "type": [
         "string",
         "null"
        ]
       }
      },
      "additionalProperties": false,
      "required": [
       "video_url",
       "image_url"
      ]
     },
     "docs_url": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "slug",
     "name",
     "orderable",
     "length",
     "features",
     "preview",
     "docs_url"
    ]
   },
   "NicheList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/NicheSummary"
      }
     },
     "count": {
      "type": "integer"
     },
     "orderable": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "count",
     "orderable"
    ]
   },
   "Niche": {
    "type": "object",
    "properties": {
     "object": {
      "const": "niche"
     },
     "slug": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
     },
     "name": {
      "type": "string"
     },
     "category": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "tab": {
      "type": [
       "string",
       "null"
      ],
      "description": "The gallery tab of the web's Short form (e.g. viral)."
     },
     "tagline": {
      "type": [
       "string",
       "null"
      ]
     },
     "tags": {
      "type": "array"
     },
     "aspect": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     },
     "orderable": {
      "type": "boolean"
     },
     "outputs": {},
     "length": {
      "$ref": "#/components/schemas/ShortLength"
     },
     "sections": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "title": {
         "type": "string"
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "title"
       ]
      }
     },
     "options": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ShortOption"
      }
     },
     "voice_options": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "language_options": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "characters": {
      "type": "object",
      "properties": {
       "supported": {
        "type": "boolean"
       },
       "max": {
        "type": "integer"
       },
       "photo_options": {
        "type": "array",
        "items": {
         "type": "string"
        }
       }
      },
      "additionalProperties": false,
      "required": [
       "supported",
       "max",
       "photo_options"
      ]
     },
     "uploads": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "option": {
         "type": "string"
        },
        "kind": {
         "type": "string"
        },
        "accept": {
         "type": "string"
        },
        "max_mb": {
         "type": [
          "number",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "option",
        "kind"
       ]
      }
     },
     "auto_fill": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "option": {
         "type": "string"
        },
        "how": {
         "enum": [
          "pre_action",
          "ideas",
          "value",
          "example"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "option",
        "how"
       ]
      }
     },
     "prices": {
      "oneOf": [
       {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "length_seconds": {
           "type": [
            "number",
            "null"
           ]
          },
          "credits": {
           "type": [
            "integer",
            "null"
           ]
          },
          "sellable": {
           "type": "boolean"
          }
         },
         "additionalProperties": false,
         "required": [
          "length_seconds",
          "credits",
          "sellable"
         ]
        }
       },
       {
        "type": "null"
       }
      ]
     },
     "examples": {
      "type": "object",
      "properties": {
       "minimal": {
        "type": "object"
       },
       "full": {
        "type": "object"
       }
      },
      "additionalProperties": false,
      "required": [
       "minimal",
       "full"
      ]
     },
     "preview": {
      "type": "object",
      "properties": {
       "video_url": {
        "type": [
         "string",
         "null"
        ]
       },
       "image_url": {
        "type": [
         "string",
         "null"
        ]
       }
      },
      "additionalProperties": false,
      "required": [
       "video_url",
       "image_url"
      ]
     },
     "docs_url": {
      "type": "string"
     },
     "schema_version": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "slug",
     "name",
     "orderable",
     "length",
     "options",
     "voice_options",
     "language_options",
     "characters",
     "uploads",
     "examples",
     "schema_version"
    ]
   },
   "ShortQuote": {
    "type": "object",
    "properties": {
     "object": {
      "const": "quote"
     },
     "niche": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
     },
     "credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "length_seconds": {
      "type": [
       "number",
       "null"
      ]
     },
     "breakdown": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "label": {
         "type": "string"
        },
        "credits": {
         "type": "integer"
        }
       },
       "additionalProperties": false,
       "required": [
        "label",
        "credits"
       ]
      }
     },
     "sellable": {
      "type": "boolean"
     },
     "missing": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      }
     },
     "warning": {
      "type": [
       "string",
       "null"
      ]
     },
     "applied": {
      "type": "object"
     },
     "notes": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "pot": {
      "const": "shorts"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "niche",
     "credits",
     "breakdown",
     "sellable",
     "missing",
     "pot"
    ]
   },
   "Short": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
      "description": "A Short's id, e.g. 20261116-111525-7602bf."
     },
     "object": {
      "const": "short"
     },
     "niche": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
     },
     "niche_name": {
      "type": [
       "string",
       "null"
      ]
     },
     "title": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "enum": [
       "queued",
       "running",
       "succeeded",
       "failed",
       "cancelled",
       "expired"
      ]
     },
     "progress": {
      "type": "object",
      "properties": {
       "percent": {
        "type": [
         "integer",
         "null"
        ]
       },
       "stage": {
        "type": [
         "string",
         "null"
        ]
       }
      },
      "additionalProperties": false,
      "required": [
       "percent",
       "stage"
      ]
     },
     "queue_position": {
      "type": [
       "integer",
       "null"
      ]
     },
     "cost_credits": {
      "type": [
       "integer",
       "null"
      ]
     },
     "refunded": {
      "type": "boolean"
     },
     "refunded_credits": {
      "type": "integer",
      "description": "Shorts credits given back for this Short (failed / cancelled)."
     },
     "files": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "label": {
         "type": "string"
        },
        "kind": {
         "enum": [
          "video",
          "image"
         ]
        },
        "duration_seconds": {
         "type": [
          "number",
          "null"
         ]
        },
        "bytes": {
         "type": [
          "integer",
          "null"
         ]
        },
        "download_url": {
         "type": "string",
         "description": "Signed link (no key needed), valid 1 hour: GET the Short again for fresh links. The file is kept 48 h: download it."
        },
        "thumbnail_url": {
         "type": [
          "string",
          "null"
         ]
        },
        "light_url": {
         "type": "string",
         "description": "A lighter copy for phones (when made)."
        }
       },
       "additionalProperties": false,
       "required": [
        "label",
        "kind",
        "download_url"
       ]
      }
     },
     "expired": {
      "type": "boolean"
     },
     "job_url": {
      "type": "string",
      "description": "The Short's page in the GoMotion web app (the user must be logged in)."
     },
     "editor_url": {
      "type": [
       "string",
       "null"
      ],
      "description": "Opens the Short in the GoMotion editor (when succeeded; logged in)."
     },
     "error": {
      "type": [
       "string",
       "null"
      ],
      "description": "One plain line for the customer when it failed / was cancelled."
     },
     "notice": {
      "type": [
       "string",
       "null"
      ]
     },
     "warnings": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "external_id": {
      "type": [
       "string",
       "null"
      ],
      "description": "Your own id from the create call (null if none). Since API 1.2."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": "string",
       "maxLength": 500
      },
      "description": "Your own key-value data from the create call ({} if none). Since API 1.2."
     },
     "created_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "started_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "finished_at": {
      "type": [
       "integer",
       "null"
      ]
     },
     "stages": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "label": {
         "type": "string"
        },
        "percent": {
         "type": "integer"
        },
        "at_utc": {
         "type": "string"
        }
       },
       "additionalProperties": false,
       "required": [
        "label",
        "percent",
        "at_utc"
       ]
      },
      "description": "GET /v1/shorts/{id} only: the steps so far (never a log line)."
     },
     "replayed": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "niche",
     "status",
     "progress",
     "cost_credits",
     "refunded",
     "files",
     "job_url",
     "editor_url",
     "error",
     "external_id",
     "metadata",
     "created_at"
    ]
   },
   "ShortList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Short"
      }
     },
     "has_more": {
      "type": "boolean"
     },
     "next_starting_after": {
      "oneOf": [
       {
        "type": "string",
        "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
        "description": "A Short's id, e.g. 20261116-111525-7602bf."
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data",
     "has_more",
     "next_starting_after"
    ]
   },
   "ShortVoices": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "language": {
      "type": "string"
     },
     "note": {
      "type": "string"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "id": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "gender": {
         "type": [
          "string",
          "null"
         ]
        },
        "age": {
         "type": [
          "string",
          "null"
         ]
        },
        "style": {
         "type": [
          "string",
          "null"
         ]
        },
        "accent": {
         "type": [
          "string",
          "null"
         ]
        },
        "quality": {
         "const": "high"
        },
        "source": {
         "enum": [
          "niche_preset",
          "catalog",
          "own_clone"
         ]
        },
        "option": {
         "type": "string"
        },
        "description": {
         "type": [
          "string",
          "null"
         ]
        },
        "sample_url": {
         "type": [
          "string",
          "null"
         ]
        }
       },
       "additionalProperties": false,
       "required": [
        "id",
        "quality",
        "source"
       ]
      }
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "language",
     "data"
    ]
   },
   "ShortLanguages": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "flag_url": {
         "type": "string"
        }
       },
       "additionalProperties": false,
       "required": [
        "code",
        "name",
        "flag_url"
       ]
      }
     },
     "niche": {
      "type": "object",
      "properties": {
       "slug": {
        "type": "string",
        "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
       },
       "options": {
        "type": "object"
       }
      },
      "additionalProperties": false,
      "required": [
       "slug",
       "options"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "Character": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "character"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "ready": {
      "type": "boolean"
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "niches": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "voice": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "name",
     "ready"
    ]
   },
   "CharacterList": {
    "type": "object",
    "properties": {
     "object": {
      "const": "list"
     },
     "data": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Character"
      }
     },
     "own": {
      "type": "integer"
     },
     "ready": {
      "type": "integer"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "data"
    ]
   },
   "CharacterDeleted": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "object": {
      "const": "character"
     },
     "deleted": {
      "const": true
     }
    },
    "additionalProperties": false,
    "required": [
     "id",
     "object",
     "deleted"
    ]
   },
   "ShortUpload": {
    "type": "object",
    "properties": {
     "object": {
      "const": "upload"
     },
     "id": {
      "type": "string",
      "pattern": "^upl_[0-9a-f]{20}$"
     },
     "kind": {
      "enum": [
       "image",
       "video",
       "audio"
      ]
     },
     "put_url": {
      "type": "string"
     },
     "method": {
      "const": "PUT"
     },
     "expires_in_s": {
      "type": "integer"
     },
     "max_bytes": {
      "type": "integer"
     },
     "next": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "id",
     "kind",
     "put_url",
     "method",
     "expires_in_s",
     "max_bytes"
    ]
   },
   "ShortUploadDone": {
    "type": "object",
    "properties": {
     "object": {
      "const": "upload"
     },
     "id": {
      "type": "string"
     },
     "kind": {
      "type": "string"
     },
     "file": {
      "type": "string",
      "pattern": "^uploads/[A-Za-z0-9_./-]{1,200}$",
      "description": "A `file` from POST /v1/shorts/uploads/{id}/complete."
     },
     "bytes": {
      "type": "integer"
     },
     "use": {
      "type": "string"
     },
     "replayed": {
      "type": "boolean"
     }
    },
    "additionalProperties": false,
    "required": [
     "object",
     "id",
     "kind",
     "file"
    ]
   },
   "ShortsPot": {
    "oneOf": [
     {
      "type": "object",
      "properties": {
       "balance": {
        "type": "integer"
       },
       "held": {
        "type": "integer"
       },
       "available": {
        "type": "integer"
       },
       "expires_at": {
        "type": "integer"
       },
       "topup_credits": {
        "type": "integer"
       }
      },
      "additionalProperties": false,
      "required": [
       "balance",
       "held",
       "available",
       "expires_at",
       "topup_credits"
      ]
     },
     {
      "type": "null"
     }
    ]
   },
   "ShortQuoteRequest": {
    "type": "object",
    "properties": {
     "niche": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$",
      "description": "A slug from GET /v1/shorts/niches."
     },
     "options": {
      "type": "object",
      "description": "The niche's options {key: value} (GET /v1/shorts/niches/{slug}). Leave out what you do not need; empty text fields are written by the niche's AI, as in the web."
     },
     "length_seconds": {
      "type": "number",
      "minimum": 1,
      "description": "Picks the niche's nearest length choice."
     },
     "voice": {
      "type": "string",
      "description": "An id from GET /v1/shorts/voices (high quality only), or auto."
     },
     "language": {
      "type": "string",
      "description": "A code for the niche's main language option."
     },
     "characters": {
      "type": "array",
      "maxItems": 4,
      "items": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "role": {
           "type": "string"
          }
         },
         "additionalProperties": false,
         "required": [
          "id"
         ]
        }
       ]
      },
      "description": "Character ids (GET /v1/shorts/characters), main character first."
     }
    },
    "additionalProperties": false,
    "required": [
     "niche"
    ]
   },
   "ShortCreate": {
    "type": "object",
    "properties": {
     "niche": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$",
      "description": "A slug from GET /v1/shorts/niches."
     },
     "options": {
      "type": "object",
      "description": "The niche's options {key: value} (GET /v1/shorts/niches/{slug}). Leave out what you do not need; empty text fields are written by the niche's AI, as in the web."
     },
     "length_seconds": {
      "type": "number",
      "minimum": 1,
      "description": "Picks the niche's nearest length choice."
     },
     "voice": {
      "type": "string",
      "description": "An id from GET /v1/shorts/voices (high quality only), or auto."
     },
     "language": {
      "type": "string",
      "description": "A code for the niche's main language option."
     },
     "characters": {
      "type": "array",
      "maxItems": 4,
      "items": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "object",
         "properties": {
          "id": {
           "type": "string"
          },
          "role": {
           "type": "string"
          }
         },
         "additionalProperties": false,
         "required": [
          "id"
         ]
        }
       ]
      },
      "description": "Character ids (GET /v1/shorts/characters), main character first."
     },
     "title": {
      "type": "string",
      "maxLength": 120
     },
     "max_cost_credits": {
      "type": "integer",
      "minimum": 1,
      "description": "Refuse (402 over_max_cost, nothing charged) if the price is higher."
     },
     "external_id": {
      "type": "string",
      "pattern": "^[\\x21-\\x7e]{1,128}$",
      "description": "Your own order or customer id: 1-128 printable ASCII characters, no spaces. Filter lists with ?external_id=."
     },
     "metadata": {
      "type": "object",
      "maxProperties": 20,
      "propertyNames": {
       "pattern": "^[A-Za-z0-9_.-]{1,40}$"
      },
      "additionalProperties": {
       "type": [
        "string",
        "number"
       ],
       "maxLength": 500
      },
      "description": "Your own data, echoed on the object and on webhooks: up to 20 keys [A-Za-z0-9_.-]{1,40}, string values up to 500 characters (numbers become strings), 8 KB in total."
     }
    },
    "additionalProperties": false,
    "required": [
     "niche"
    ]
   },
   "CharacterCreate": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 40
     },
     "image": {
      "type": "string",
      "pattern": "^uploads/[A-Za-z0-9_./-]{1,200}$",
      "description": "A `file` from POST /v1/shorts/uploads/{id}/complete."
     },
     "description": {
      "type": "string",
      "maxLength": 300
     },
     "niche": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
     },
     "voice": {
      "type": "string"
     }
    },
    "additionalProperties": false,
    "required": [
     "name",
     "image"
    ]
   },
   "ShortUploadCreate": {
    "type": "object",
    "properties": {
     "kind": {
      "enum": [
       "image",
       "video",
       "audio"
      ]
     },
     "filename": {
      "type": "string",
      "maxLength": 80
     },
     "size": {
      "type": "integer",
      "minimum": 1,
      "description": "Bytes (image <= 25 MB, video <= 600 MB, audio <= 100 MB)."
     }
    },
    "additionalProperties": false,
    "required": [
     "kind",
     "filename",
     "size"
    ]
   }
  }
 },
 "paths": {
  "/v1/account": {
   "get": {
    "summary": "Your plan, API limits and this key's usage today",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Account"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/credits": {
   "get": {
    "summary": "Credit balance",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": "credits:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Credits"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/credits/history": {
   "get": {
    "summary": "Credit movements (newest first)",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": "credits:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CreditsHistory"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 200
      }
     },
     {
      "name": "pot",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "long",
        "shorts"
       ]
      },
      "description": "shorts = the Shorts pot's history (since 1.3)."
     }
    ]
   }
  },
  "/v1/quote": {
   "get": {
    "summary": "Price of a video in credits",
    "tags": [
     "Account"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Quote"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "chars",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1
      },
      "description": "Script length in characters (or pass duration_sec)."
     },
     {
      "name": "duration_sec",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 0
      },
      "description": "Length in seconds (for your own audio)."
     },
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "voice",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/languages": {
   "get": {
    "summary": "Voice languages",
    "tags": [
     "Voices"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Languages"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/voices": {
   "get": {
    "summary": "Voices of a language",
    "tags": [
     "Voices"
    ],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Voices"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "lang",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Language code (default en)."
     },
     {
      "name": "quality",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "standard",
        "high"
       ]
      }
     }
    ]
   }
  },
  "/v1/uploads/script": {
   "post": {
    "summary": "Upload a long script",
    "tags": [
     "Uploads"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ScriptUpload"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ScriptUploadCreate"
       }
      }
     }
    }
   }
  },
  "/v1/uploads": {
   "post": {
    "summary": "Get a signed URL to upload your own voiceover or music",
    "tags": [
     "Uploads"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Upload"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Then PUT the file bytes to put_url (any common audio format) within 1 hour, and pass key as audio_key or music_key to POST /v1/videos.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/UploadCreate"
       }
      }
     }
    }
   }
  },
  "/v1/videos": {
   "post": {
    "summary": "Create a video",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "video price (GET /v1/quote)",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "200": {
      "description": "Replay of the same Idempotency-Key",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "413": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Charges the video price when accepted (refunded if it fails). Poll GET /v1/videos/{id}.",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/VideoCreate"
       }
      }
     }
    }
   },
   "get": {
    "summary": "List videos (newest first)",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/VideoList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled",
        "interrupted"
       ]
      }
     },
     {
      "name": "starting_after",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^j_[a-f0-9]{16}$"
      },
      "description": "Cursor: the last id of the previous page (next_starting_after)."
     },
     {
      "name": "external_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only objects created with this external_id."
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "maxProperties": 5,
       "additionalProperties": {
        "type": "string",
        "maxLength": 500
       }
      },
      "description": "metadata[key]=value: only objects whose metadata has that value (up to 5 keys; metadata.key=value also works)."
     }
    ]
   }
  },
  "/v1/videos/{id}": {
   "get": {
    "summary": "Get a video",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Video"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/videos/{id}/export": {
   "post": {
    "summary": "Export the video to MP4 (1080p)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "first export free, then 4",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "410": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ExportCreate"
       }
      }
     }
    }
   }
  },
  "/v1/exports": {
   "get": {
    "summary": "List exports (newest first)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ExportList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 50
      }
     },
     {
      "name": "starting_after",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^j_[a-f0-9]{16}$"
      },
      "description": "Cursor: the last id of the previous page (next_starting_after)."
     },
     {
      "name": "external_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Only objects created with this external_id."
     },
     {
      "name": "metadata",
      "in": "query",
      "required": false,
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "maxProperties": 5,
       "additionalProperties": {
        "type": "string",
        "maxLength": 500
       }
      },
      "description": "metadata[key]=value: only objects whose metadata has that value (up to 5 keys; metadata.key=value also works)."
     }
    ]
   }
  },
  "/v1/exports/{id}": {
   "get": {
    "summary": "Get an export (download_url when succeeded)",
    "tags": [
     "Exports"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Export"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/jobs/{id}/cancel": {
   "post": {
    "summary": "Cancel a video or export (credits come back)",
    "tags": [
     "Videos"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "The cancelled video or export",
      "content": {
       "application/json": {
        "schema": {
         "oneOf": [
          {
           "$ref": "#/components/schemas/Video"
          },
          {
           "$ref": "#/components/schemas/Export"
          }
         ]
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/references": {
   "get": {
    "summary": "Videos of a YouTube channel (references for scripts and thumbnails)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": [
     "scripts:write",
     "thumbnails:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/References"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "channel_url",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "sort",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "recent",
        "popular"
       ]
      }
     }
    ]
   }
  },
  "/v1/scripts": {
   "post": {
    "summary": "Write a script with AI (async)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "scripts:write",
    "x-gomotion-credits": "4 (or included in plan)",
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Give channel_url, video_ids or only topic (then GoMotion finds 3 references on YouTube: 422 topic_no_references / 502 topic_search_failed, nothing charged).",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ScriptCreate"
       }
      }
     }
    }
   }
  },
  "/v1/scripts/{id}": {
   "get": {
    "summary": "Get a script task",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "scripts:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/thumbnails": {
   "post": {
    "summary": "Make a thumbnail with AI (async)",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "thumbnails:write",
    "x-gomotion-credits": "4 (or included in plan)",
    "responses": {
     "202": {
      "description": "Accepted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "200": {
      "description": "Replay",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "502": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ThumbnailCreate"
       }
      }
     }
    }
   }
  },
  "/v1/thumbnails/{id}": {
   "get": {
    "summary": "Get a thumbnail task",
    "tags": [
     "Scripts & thumbnails"
    ],
    "x-gomotion-scope": "thumbnails:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Task"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/v1/webhooks": {
   "post": {
    "summary": "Add a webhook endpoint (max 3 per key)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookWithSecret"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Events for videos, exports, scripts and thumbnails created by THIS key, sent when they end. The secret is shown only here and on rotate-secret.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookCreate"
       }
      }
     }
    }
   },
   "get": {
    "summary": "List this key's webhooks",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/webhooks/{id}": {
   "get": {
    "summary": "Get a webhook",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Webhook"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   },
   "post": {
    "summary": "Update a webhook (url, events, description, enabled)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Webhook"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/WebhookUpdate"
       }
      }
     }
    }
   },
   "delete": {
    "summary": "Delete a webhook",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeleted"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/test": {
   "post": {
    "summary": "Send one signed webhook.test event now",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Sent (delivered tells if your server answered 2xx)",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookTestResult"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/rotate-secret": {
   "post": {
    "summary": "New signing secret (the old one stops at once)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookWithSecret"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/deliveries": {
   "get": {
    "summary": "Recent deliveries (newest first, kept 7 days)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeliveryList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 100
      }
     }
    ]
   }
  },
  "/v1/webhooks/{id}/deliveries/{evt}/retry": {
   "post": {
    "summary": "Send an event again (same event id)",
    "tags": [
     "Webhooks"
    ],
    "x-gomotion-scope": [
     "videos:read",
     "videos:write"
    ],
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Queued",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/WebhookDeliveryRetry"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^wh_[a-f0-9]{16}$"
      }
     },
     {
      "name": "evt",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     }
    ]
   }
  },
  "/v1/shorts/niches": {
   "get": {
    "summary": "Shorts niches you can order now",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Niches",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/NicheList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Live: niches open and close in GoMotion; this list always shows production's own set.",
    "parameters": [
     {
      "name": "all",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean"
      },
      "description": "true = also the coming-soon niches (not orderable)."
     }
    ]
   }
  },
  "/v1/shorts/niches/{id}": {
   "get": {
    "summary": "A niche: every option, lengths, voices, languages, characters, prices",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Niche",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Niche"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
      },
      "description": "Niche slug."
     }
    ]
   }
  },
  "/v1/shorts/quote": {
   "post": {
    "summary": "Price of a Short (free)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Quote",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortQuote"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ShortQuoteRequest"
       }
      }
     }
    }
   }
  },
  "/v1/shorts": {
   "post": {
    "summary": "Create a Short (charges the Shorts credits pot)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Created",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Short"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "Async: queued at once, done in about 5-60 minutes; poll GET /v1/shorts/{id} or use webhooks (short.*). The same Idempotency-Key and body within 24 h returns the same Short (200).",
    "parameters": [
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{8,64}$"
      },
      "description": "Any unique string per new request. Retrying with the same key and body returns the same object (never charges twice)."
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ShortCreate"
       }
      }
     }
    }
   },
   "get": {
    "summary": "List Shorts (newest first)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Shorts",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled",
        "expired"
       ]
      }
     },
     {
      "name": "niche",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
      }
     },
     {
      "name": "source",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "api",
        "all"
       ]
      },
      "description": "api (default): made through the API; all: every Short of the account."
     },
     {
      "name": "external_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "starting_after",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
       "description": "A Short's id, e.g. 20261116-111525-7602bf."
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "minimum": 1
      },
      "description": "How many (videos: max 100, exports: max 50, history: max 200)."
     },
     {
      "name": "metadata",
      "in": "query",
      "style": "deepObject",
      "explode": true,
      "schema": {
       "type": "object",
       "additionalProperties": {
        "type": "string"
       }
      }
     }
    ]
   }
  },
  "/v1/shorts/{id}": {
   "get": {
    "summary": "Get a Short (status, stages, files, links)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Short",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Short"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
       "description": "A Short's id, e.g. 20261116-111525-7602bf."
      }
     }
    ]
   }
  },
  "/v1/shorts/{id}/cancel": {
   "post": {
    "summary": "Cancel a Short (credits come back as in the web)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Short",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Short"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "description": "A queued Short is cancelled at once. A running Short stops at its next step, usually within seconds, so this answer may still read `running`: GET the Short until it reads `cancelled` (with `refunded_credits`). A finished Short is not refunded.",
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^\\d{8}-\\d{6}-[0-9a-f]{6}$",
       "description": "A Short's id, e.g. 20261116-111525-7602bf."
      }
     }
    ]
   }
  },
  "/v1/shorts/voices": {
   "get": {
    "summary": "High-quality voices for Shorts",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Voices",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortVoices"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "language",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "niche",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
      }
     },
     {
      "name": "gender",
      "in": "query",
      "required": false,
      "schema": {
       "enum": [
        "male",
        "female"
       ]
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Search name / style / accent."
     }
    ]
   }
  },
  "/v1/shorts/languages": {
   "get": {
    "summary": "Languages (and a niche's language codes)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Languages",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortLanguages"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "niche",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
      }
     }
    ]
   }
  },
  "/v1/shorts/characters": {
   "get": {
    "summary": "Your characters and the ready ones",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:read",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Characters",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CharacterList"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "niche",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "^[a-z0-9][a-z0-9-]{1,60}$"
      }
     }
    ]
   },
   "post": {
    "summary": "Create a character (free)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Character",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Character"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CharacterCreate"
       }
      }
     }
    }
   }
  },
  "/v1/shorts/characters/{id}": {
   "delete": {
    "summary": "Delete one of your characters",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "Deleted",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CharacterDeleted"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[A-Za-z0-9_-]{2,40}$"
      }
     }
    ]
   }
  },
  "/v1/shorts/uploads": {
   "post": {
    "summary": "Upload a file for a Short (signed PUT)",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "201": {
      "description": "Upload",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortUpload"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ShortUploadCreate"
       }
      }
     }
    }
   }
  },
  "/v1/shorts/uploads/{id}/complete": {
   "post": {
    "summary": "Hand the uploaded file to GoMotion",
    "tags": [
     "Shorts"
    ],
    "x-gomotion-scope": "videos:write",
    "x-gomotion-credits": "free",
    "responses": {
     "200": {
      "description": "File",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShortUploadDone"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    },
    "parameters": [
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^upl_[0-9a-f]{20}$"
      }
     }
    ]
   }
  },
  "/v1/shorts/files/{ticket}": {
   "get": {
    "summary": "A Short's file (the signed download_url / thumbnail_url / light_url link)",
    "tags": [
     "Shorts"
    ],
    "security": [],
    "x-gomotion-scope": null,
    "x-gomotion-credits": "free",
    "description": "No key: the link itself is the credential, valid 1 hour. Answers the file (Range supported) or a redirect to it. 403 link_expired: GET the Short again for fresh links.",
    "parameters": [
     {
      "name": "ticket",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "The file",
      "content": {
       "video/mp4": {},
       "image/jpeg": {}
      }
     },
     "302": {
      "description": "Redirect to the file"
     },
     "403": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "webhooks": {
  "video.succeeded": {
   "post": {
    "summary": "video.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "video.failed": {
   "post": {
    "summary": "video.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "video.cancelled": {
   "post": {
    "summary": "video.cancelled",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.succeeded": {
   "post": {
    "summary": "export.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.failed": {
   "post": {
    "summary": "export.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "export.cancelled": {
   "post": {
    "summary": "export.cancelled",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "script.succeeded": {
   "post": {
    "summary": "script.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "script.failed": {
   "post": {
    "summary": "script.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "thumbnail.succeeded": {
   "post": {
    "summary": "thumbnail.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "thumbnail.failed": {
   "post": {
    "summary": "thumbnail.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "webhook.test": {
   "post": {
    "summary": "webhook.test",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "short.succeeded": {
   "post": {
    "summary": "short.succeeded",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "short.failed": {
   "post": {
    "summary": "short.failed",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  },
  "short.cancelled": {
   "post": {
    "summary": "short.cancelled",
    "tags": [
     "Webhooks"
    ],
    "parameters": [
     {
      "name": "GoMotion-Signature",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<raw body>\")>. Compare in constant time; reject t older than 5 minutes."
     },
     {
      "name": "GoMotion-Event-Id",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^evt_[a-f0-9]{20}$"
      }
     },
     {
      "name": "GoMotion-Event-Type",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/Event"
       }
      }
     }
    },
    "responses": {
     "2XX": {
      "description": "Received. Any other answer (or none in 10 s) is retried at +30 s, 2 min, 10 min, 30 min, 2 h, 6 h and 12 h."
     }
    }
   }
  }
 }
}
