Magic Hour Video Projects API

API related to video projects

Operations 13

GET /v1/video-projects/{id} Get video details #
DELETE /v1/video-projects/{id} Delete video #
POST /v1/ai-talking-photo AI Talking Photo #
POST /v1/ai-video-editor AI Video Editor #
POST /v1/animation Animation #
POST /v1/audio-to-video Audio-to-Video #
POST /v1/auto-subtitle-generator Auto Subtitle Generator #
POST /v1/character-replace Character Replace #
POST /v1/face-swap Face Swap Video #
POST /v1/image-to-video Image-to-Video #
POST /v1/lip-sync Lip Sync #
POST /v1/text-to-video Text-to-Video #
POST /v1/video-to-video Video-to-Video #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/magichour-video-projects-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

magichour-video-projects-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Magic Hour Video Projects API
  version: beta
  description: "\nMagic Hour provides an API (beta) that can be integrated into your own application to generate videos and images using AI. \n\nWebhook documentation can be found [here](https://docs.magichour.ai/webhook-reference).\n\nIf you have any questions, please reach out to us via [discord](https://discord.gg/JX5rgsZaJp).\n\n# Authentication\n\nEvery request requires an API key.\n\nTo get started, first generate your API key [here](https://magichour.ai/developer?tab=api-keys&utm_source=docs&utm_medium=referral&utm_campaign=api-reference).\n\nThen, add the `Authorization` header to the request.\n\n| Key | Value |\n|-|-|\n| Authorization | Bearer mhk_live_apikey |\n\n> **Warning**: any API call that renders a video will utilize credits in your account.\n"
  termsOfService: https://magichour.ai/terms-of-service
servers:
- url: https://api.magichour.ai
tags:
- name: Video Projects
  description: API related to video projects
paths:
  /v1/video-projects/{id}:
    get:
      description: "Check the progress of a video project. The `downloads` field is populated after a successful render.\n  \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used"
      summary: Get video details
      tags:
      - Video Projects
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: cuid-example
        description: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
      operationId: videoProjects.getDetails
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: cuid-example
                    description: Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
                  name:
                    type:
                    - string
                    - 'null'
                    description: The name of the video.
                    example: Example Name
                  status:
                    type: string
                    enum:
                    - draft
                    - queued
                    - rendering
                    - complete
                    - error
                    - canceled
                    description: 'The status of the video.


                      - `draft` - the project was created but has not been submitted for rendering

                      - `queued` - the job is waiting for an available server

                      - `rendering` - the job is being processed; the `video.started` webhook event fires when rendering begins

                      - `complete` - the job finished successfully; fires `video.completed`

                      - `error` - the job failed during processing; fires `video.errored`

                      - `canceled` - the job was manually canceled (for example from the Magic Hour web app)


                      **Note:** `rendering`, `complete`, and `error` have matching webhook events; `canceled` does not - a canceled job emits no webhook event, so poll this endpoint to detect cancellation.'
                    example: complete
                  type:
                    type: string
                    description: The type of the video project. Possible values are ANIMATION, AUTO_SUBTITLE, VIDEO_TO_VIDEO, FACE_SWAP, TEXT_TO_VIDEO, IMAGE_TO_VIDEO, LIP_SYNC, TALKING_PHOTO, AVATAR, VIDEO_UPSCALER, VIDEO_EDITOR, CHARACTER_REPLACE, VIDEO_COLORIZER, VIDEO_TRANSLATOR, MUSIC_VIDEO, EXTEND, AUDIO_TO_VIDEO, VIDEO_EXPANDER, UGC_AD
                    example: FACE_SWAP
                  created_at:
                    type: string
                    format: date-time
                  width:
                    type: integer
                    description: The width of the final output video. A value of -1 indicates the width can be ignored.
                    example: 512
                  height:
                    type: integer
                    description: The height of the final output video. A value of -1 indicates the height can be ignored.
                    example: 960
                  enabled:
                    type: boolean
                    description: Whether this resource is active. If false, it is deleted.
                  start_seconds:
                    type: number
                    minimum: 0
                    description: Start time of your clip (seconds). Must be ≥ 0.
                    format: float
                    example: 0
                  end_seconds:
                    type: number
                    minimum: 0.1
                    description: End time of your clip (seconds). Must be greater than start_seconds.
                    format: float
                    example: 15
                  credits_charged:
                    type: integer
                    description: "The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. \n\nIf video generation fails, credits will be refunded, and this field will be updated to include the refund."
                    example: 450
                  fps:
                    type: number
                    description: Frame rate of the video. If the status is not 'complete', the frame rate is an estimate and will be adjusted when the video completes.
                    example: 30
                  error:
                    type:
                    - object
                    - 'null'
                    properties:
                      message:
                        type: string
                        description: Details on the reason why a failure happened.
                        example: Please use an image with a detectable face
                      code:
                        type: string
                        example: no_source_face
                        description: An error code to indicate why a failure happened.
                    required:
                    - message
                    - code
                    description: In the case of an error, this object will contain the error encountered during video render
                    example: null
                  downloads:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          format: uri
                          example: https://videos.magichour.ai/id/output.mp4
                        expires_at:
                          type: string
                          format: date-time
                          example: '2024-10-19T05:16:19.027Z'
                      required:
                      - url
                      - expires_at
                      description: The download url and expiration date of the image project
                required:
                - id
                - name
                - status
                - type
                - created_at
                - width
                - height
                - enabled
                - start_seconds
                - end_seconds
                - credits_charged
                - fps
                - error
                - downloads
                description: Success
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request is invalid
                example:
                  message: Missing request body
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Unauthorized
                required:
                - message
                description: The request is not properly authenticated
                example:
                  message: Unauthorized
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request requires payment
                example:
                  message: Payment required
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not Found
                required:
                - message
                description: Requested resource is not found
                example:
                  message: Not Found
      security:
      - bearerAuth: []
      x-codeSamples:
      - lang: python
        source: 'from magic_hour import Client

          from os import getenv


          client = Client(token=getenv("API_TOKEN"))

          res = client.v1.video_projects.get(id="cuid-example")'
      - lang: javascript
        source: 'import { Client } from "magic-hour";


          const client = new Client({ token: process.env["API_TOKEN"]!! });

          const res = await client.v1.videoProjects.get({ id: "cuid-example" });'
      - lang: go
        source: "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tvideo_projects \"github.com/magichourhq/magic-hour-go/resources/v1/video_projects\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"API_TOKEN\")),\n\t)\n\tres, err := client.V1.VideoProjects.Get(video_projects.GetRequest{\n\t\tId: \"cuid-example\",\n\t})\n}"
      - lang: rust
        source: "let client = magic_hour::Client::default()\n    .with_bearer_auth(&std::env::var(\"API_TOKEN\").unwrap());\nlet res = client\n    .v1()\n    .video_projects()\n    .get(magic_hour::resources::v1::video_projects::GetRequest {\n        id: \"cuid-example\".to_string(),\n    })\n    .await;"
      - lang: curl
        source: "curl --request GET \\\n     --url https://api.magichour.ai/v1/video-projects/id \\\n     --header 'accept: application/json' \\\n     --header 'authorization: Bearer <token>'"
      - lang: php
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.magichour.ai/v1/video-projects/id\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => [\n    \"accept: application/json\",\n    \"authorization: Bearer <token>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: java
        source: "HttpResponse<String> response = Unirest.get(\"https://api.magichour.ai/v1/video-projects/id\")\n  .header(\"accept\", \"application/json\")\n  .header(\"authorization\", \"Bearer <token>\")\n  .asString();"
    delete:
      description: Permanently delete the rendered video. This action is not reversible, please be sure before deleting.
      summary: Delete video
      tags:
      - Video Projects
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          example: cuid-example
        description: Unique ID of the video project. This value is returned by all of the POST APIs that create a video.
      operationId: videoProjects.delete
      responses:
        '204':
          description: '204'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request is invalid
                example:
                  message: Missing request body
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Unauthorized
                required:
                - message
                description: The request is not properly authenticated
                example:
                  message: Unauthorized
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request requires payment
                example:
                  message: Payment required
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not Found
                required:
                - message
                description: Requested resource is not found
                example:
                  message: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: When a request fails validations
                example:
                  message: video is a template and cannot be deleted. Please reach out to our support team.
      security:
      - bearerAuth: []
      x-codeSamples:
      - lang: python
        source: 'from magic_hour import Client

          from os import getenv


          client = Client(token=getenv("API_TOKEN"))

          res = client.v1.video_projects.delete(id="cuid-example")'
      - lang: javascript
        source: 'import { Client } from "magic-hour";


          const client = new Client({ token: process.env["API_TOKEN"]!! });

          const res = await client.v1.videoProjects.delete({ id: "cuid-example" });'
      - lang: go
        source: "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tvideo_projects \"github.com/magichourhq/magic-hour-go/resources/v1/video_projects\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"API_TOKEN\")),\n\t)\n\terr := client.V1.VideoProjects.Delete(video_projects.DeleteRequest{\n\t\tId: \"cuid-example\",\n\t})\n}"
      - lang: rust
        source: "let client = magic_hour::Client::default()\n    .with_bearer_auth(&std::env::var(\"API_TOKEN\").unwrap());\nlet res = client\n    .v1()\n    .video_projects()\n    .delete(magic_hour::resources::v1::video_projects::DeleteRequest {\n        id: \"cuid-example\".to_string(),\n    })\n    .await;"
      - lang: curl
        source: "curl --request DELETE \\\n     --url https://api.magichour.ai/v1/video-projects/id \\\n     --header 'accept: application/json' \\\n     --header 'authorization: Bearer <token>'"
      - lang: php
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.magichour.ai/v1/video-projects/id\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"DELETE\",\n  CURLOPT_HTTPHEADER => [\n    \"accept: application/json\",\n    \"authorization: Bearer <token>\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: java
        source: "HttpResponse<String> response = Unirest.delete(\"https://api.magichour.ai/v1/video-projects/id\")\n  .header(\"accept\", \"application/json\")\n  .header(\"authorization\", \"Bearer <token>\")\n  .asString();"
  /v1/ai-talking-photo:
    post:
      description: Create a talking photo from an image and audio or text input.
      summary: AI Talking Photo
      tags:
      - Video Projects
      parameters: []
      operationId: aiTalkingPhoto.createTalkingPhoto
      requestBody:
        required: true
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Give your image a custom name for easy identification.
                  example: My Talking Photo image
                  default: Talking Photo - dateTime
                start_seconds:
                  type: number
                  minimum: 0
                  description: 'The start time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.'
                  format: float
                  example: 0
                end_seconds:
                  type: number
                  minimum: 0.1
                  description: 'The end time of the input audio in seconds. Maximum clip length depends on style.generation_mode: realistic 180s, prompted 45s.'
                  format: float
                  example: 15
                assets:
                  type: object
                  properties:
                    image_file_path:
                      type: string
                      minLength: 1
                      description: 'The source image to animate. This value is either

                        - a direct URL to the video file

                        - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).


                        See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.

                        '
                      example: api-assets/id/1234.png
                    audio_file_path:
                      type: string
                      minLength: 1
                      description: 'The audio file to sync with the image. This value is either

                        - a direct URL to the video file

                        - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).


                        See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.

                        '
                      example: api-assets/id/1234.mp3
                  required:
                  - image_file_path
                  - audio_file_path
                  description: Provide the assets for creating a talking photo
                style:
                  type: object
                  properties:
                    generation_mode:
                      default: realistic
                      type: string
                      enum:
                      - realistic
                      - prompted
                      - pro
                      - standard
                      - stable
                      - expressive
                      description: 'Controls overall motion style.

                        * `realistic` - Maintains likeness well, high quality, and reliable.

                        * `prompted` - Slightly lower likeness; allows option to prompt scene.


                        **Deprecated values (maintained for backward compatibility):**

                        * `pro` - Deprecated: use `realistic`

                        * `standard` - Deprecated: use `prompted`

                        * `stable` - Deprecated: use `realistic`

                        * `expressive` - Deprecated: use `prompted`'
                      example: realistic
                    prompt:
                      type: string
                      description: 'A text prompt to guide the generation. Only applicable when generation_mode is `prompted`.

                        This field is ignored for other modes.'
                  description: Attributes used to dictate the style of the output
                max_resolution:
                  type: integer
                  description: Constrains the larger dimension (height or width) of the output video. Allows you to set a lower resolution than your plan's maximum if desired. The value is capped by your plan's max resolution.
                  example: 1024
              required:
              - start_seconds
              - end_seconds
              - assets
              description: Provide the assets for creating a talking photo
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: cuid-example
                    description: Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
                  credits_charged:
                    type: integer
                    description: "The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. \n\nIf video generation fails, credits will be refunded, and this field will be updated to include the refund."
                    example: 450
                required:
                - id
                - credits_charged
                description: Success
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request is invalid
                example:
                  message: Missing request body
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Unauthorized
                required:
                - message
                description: The request is not properly authenticated
                example:
                  message: Unauthorized
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                - message
                description: The request requires payment
                example:
                  message: Payment required
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not Found
                required:
                - message
                description: Requested resource is not found
                example:
                  message: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unable to create talking photo
                required:
                - message
                description: Unprocessable Entity
      security:
      - bearerAuth: []
      x-codeSamples:
      - lang: python
        source: "from magic_hour import Client\nfrom os import getenv\n\nclient = Client(token=getenv(\"API_TOKEN\"))\nres = client.v1.ai_talking_photo.generate(\n    assets={\n        \"audio_file_path\": \"/path/to/1234.mp3\",\n        \"image_file_path\": \"/path/to/1234.png\",\n    },\n    end_seconds=15.0,\n    start_seconds=0.0,\n    name=\"Talking Photo image\",\n    wait_for_completion=True,\n    download_outputs=True,\n    download_directory=\".\"\n)"
      - lang: javascript
        source: "import { Client } from \"magic-hour\";\n\nconst client = new Client({ token: process.env[\"API_TOKEN\"]!! });\nconst res = await client.v1.aiTalkingPhoto.generate(\n  {\n    assets: {\n      audioFilePath: \"/path/to/1234.mp3\",\n      imageFilePath: \"/path/to/1234.png\",\n    },\n    endSeconds: 15.0,\n    name: \"Talking Photo image\",\n    startSeconds: 0.0,\n  },\n  {\n    waitForCompletion: true,\n    downloadOutputs: true,\n    downloadDirectory: \".\",\n  },\n);"
      - lang: go
        source: "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tai_talking_photo \"github.com/magichourhq/magic-hour-go/resources/v1/ai_talking_photo\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"API_TOKEN\")),\n\t)\n\tres, err := client.V1.AiTalkingPhoto.Create(ai_talking_photo.CreateRequest{\n\t\tAssets: types.V1AiTalkingPhotoCreateBodyAssets{\n\t\t\tAudioFilePath: \"api-assets/id/1234.mp3\",\n\t\t\tImageFilePath: \"api-assets/id/1234.png\",\n\t\t},\n\t\tEndSeconds:    15.0,\n\t\tMaxResolution: nullable.NewValue(1024),\n\t\tName:          nullable.NewValue(\"My Talking Photo image\"),\n\t\tStartSeconds:  0.0,\n\t})\n}"
      - lang: rust
        source: "let client = magic_hour::Client::default()\n    .with_bearer_auth(&std::env::var(\"API_TOKEN\").unwrap());\nlet res = client\n    .v1()\n    .ai_talking_photo()\n    .create(magic_hour::resources::v1::ai_talking_photo::CreateRequest {\n        assets: magic_hour::models::V1AiTalkingPhotoCreateBodyAssets {\n            audio_file_path: \"api-assets/id/1234.mp3\".to_string(),\n            image_file_path: \"api-assets/id/1234.png\".to_string(),\n        },\n        end_seconds: 15.0,\n        max_resolution: Some(1024),\n        name: Some(\"My Talking Photo image\".to_string()),\n        start_seconds: 0.0,\n        ..Default::default()\n    })\n    .await;"
      - lang: curl
        source: "curl --request POST \\\n     --url https://api.magichour.ai/v1/ai-talking-photo \\\n     --header 'accept: application/json' \\\n     --header 'authorization: Bearer <token>' \\\n     --header 'content-type: application/json' \\\n     --data '\n{\n  \"name\": \"My Talking Photo image\",\n  \"start_seconds\": 0,\n  \"end_seconds\": 15,\n  \"assets\": {\n    \"image_file_path\": \"api-assets/id/1234.png\",\n    \"audio_file_path\": \"api-assets/id/1234.mp3\"\n  },\n  \"style\": {\n    \"generation_mode\": \"realistic\",\n    \"prompt\": \"string\"\n  },\n  \"max_resolution\": 1024\n}\n'"
      - lang: php
        source: "<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_URL => \"https://api.magichour.ai/v1/ai-talking-photo\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => json_encode([\n    'name' => 'My Talking Photo image',\n    'start_seconds' => 0,\n    'end_seconds' => 15,\n    'assets' => [\n        'image_file_path' => 'api-assets/id/1234.png',\n        'audio_file_path' => 'api-assets/id/1234.mp3'\n    ],\n    'style' => [\n        'generation_mode' => 'realistic',\n        'prompt' => 'string'\n    ],\n    'max_resolution' => 1024\n  ]),\n  CURLOPT_HTTPHEADER => [\n    \"accept: application/json\",\n    \"authorization: Bearer <token>\",\n    \"content-type: application/json\"\n  ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"
      - lang: java
        source: "HttpResponse<String> response = Unirest.post(\"https://api.magichour.ai/v1/ai-talking-photo\")\n  .header(\"accept\", \"application/json\")\n  .header(\"content-type\", \"application/json\")\n  .header(\"authorization\", \"Bearer <token>\")\n  .body(\"{\\\"name\\\":\\\"My Talking Photo image\\\",\\\"start_seconds\\\":0,\\\"end_seconds\\\":15,\\\"assets\\\":{\\\"image_file_path\\\":\\\"api-assets/id/1234.png\\\",\\\"audio_file_path\\\":\\\"api-assets/id/1234.mp3\\\"},\\\"style\\\":{\\\"generation_mode\\\":\\\"realistic\\\",\\\"prompt\\\":\\\"string\\\"},\\\"max_resolution\\\":1024}\")\n  .asString();"
  /v1/ai-video-editor:
    post:
      description: "**What this API does**\n\nCreate the same Video Editor you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.\n    \n**Good for**\n- Automation and batch processing  \n- Adding video editor into apps, pipelines, or tools  \n\n**How it works (3 steps)**\n1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.  \n2) Send a request to create a video editor job with the basic fields.  \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: see the request schema for endpoint-specific assets  \n- Resolution: free users default to 480p; higher plans unlock HD and larger sizes  \n- Extra fields: see the request schema for endpoint-specific options  \n\n**Cost**  \nCredits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/ai-video-editor)."
      summary: AI Video Editor
      tags:
      - Video Projects
      parameters: []
      operationId: aiVideoEditor.createVideo
      requestBody:
        required: true
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Give your video a custom name for easy identification.
                  example: My Video Editor video
                  default: Video Editor - dateTime
                start_seconds:
                  default: 0
                  type: number
                  minimum: 0
                  description: Start time of your clip (seconds). Must be ≥ 0.
                  format: float
                  example: 0
                end_seconds:
                  type: number
                  minimum: 0.1
                  description: 'End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni`: 3s, `ltx-2.3`: 0.5s. Maximum duration 

# --- truncated at 32 KB (192 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/magichour/refs/heads/main/openapi/magichour-video-projects-api-openapi.yml