DataEyesAI
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
  1. HappyHorse
  • OpenAI format (supports major original models)
    • Chat (Response)
      • Create Network Search
      • Create Model Response GPT-5 Enable Thinking
      • Create Function Call
      • Create Model Response
      • Create Model Response (Streaming Return)
      • Create Model Response (Control Thinking Length)
    • ChatGPT Interface
      • Audio
        • Audio to text gpt-4o-transcribe
        • GPT-4o-audio
        • Audio to text whisper-1
        • Audio to text gpt-4o-transcribe
        • Create voice gpt-4o-mini-tts
      • Chat
        • Create chat-based image recognition (non-streaming)
        • Create chat-based image recognition (streaming)
        • Create chat-based image recognition (streaming) best64
        • Official N test
        • Create structured output
        • Control the effort level of the inference model
        • Create chat function call
        • deepseek-ocr recognition
        • Create chat completion (non-stream)
      • Completions
        • ChatGPT automatic completion
        • Create completion
    • Image
      • Edit image
      • Create chat completion (streaming)
      • Create chat completion (qwen-mt-turbo)
      • Create chat completion with deepseek v3.1 level of reasoning (streaming)
    • Audio
      • Speech recognition
      • Speech synthesis
      • Official Function Calling invocation
      • Create chat-generated images (non-streaming)
    • Embedding
      • Text embeddings
  • Anthropic format
    • Chat
    • Chat(prompt cache)
    • Streaming response
    • Chat (deep reasoning)
    • Tool invocation (function call)
    • Analyze image
  • Google Gemini interface
    • Native format
      • Text-to-image + control over aspect ratio + clarity
      • Generate image
      • Text generation
      • Text generation - stream
      • Text generation + reasoning - stream
      • Image generation
      • Formatted output
      • Function call
      • Document understanding
      • URL context [native format]
      • Code execution
      • Video understanding
      • URL context
      • Video understanding - url [native format]
      • Imagen 4
      • Audio understanding
      • Embeddings
      • Chat
      • Edit image
    • Image-to-image Base64 request method
      • Multi-image fusion slice generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity
      • Image editing
      • Single image gemini-3-pro-image-preview, controlling aspect ratio and clarity.
      • Image generation( gemini-2.5-flash-image)
      • Image generation gemini-2.5-flash-image, controlling aspect ratio.
      • Image understanding
    • Image-to-image URL request returns URL request format OpenAI
      • Single image generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity.
      • Multi-image fusion slice generation with gemini-3-pro-image-preview, controlling aspect ratio and clarity.
      • Image understanding
  • NanoBanana
    • OpenAI request
      • Edit image
      • OpenAI image format
    • Gemini request
      • Generate image
      • Edit image
  • Midjourney format
    • Midjourney API Reference
    • Task query interface
    • Upload image
    • Get seed (Seed)
    • Submit Imagine task
    • Query tasks based on ID list
    • FaceSwap
    • Execute Action operation
    • /mj/submit/blend
    • Submit Describe task
    • Submit Modal
    • Refresh link
    • Edit image
    • Query task status by task ID
    • Get the seed of the task image
  • Doubao - Painting
    • doubao-seededit-3-0-i2i-250628
    • doubao-seedream-4-0-250828 - text-to-image
    • doubao-seedream-4-0-250828 - image-to-image
    • doubao-seedream-4-0-250828 - multi-image generation
  • Rerank Reordering Model
    • Rerank
  • Video Model
    • Grok Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-Video-Extension
    • Seedance Video Generation
      • 00-Overview
      • 01-Create-Video-Generation-Task
      • 02-Query-Video-Generation-Task
      • 03-Query-Video-Generation-Task-List
      • 04-Cancel-or-Delete-Task
      • Seedance Private Asset Library API Documentation
    • MiniMax-H3 Video Generation
      • 00-Overview
      • 01-Create-Video-Generation
      • 02-Create-Video-Regeneration
      • 03-Create-H3-Context-IR
      • 04-Query-Task
      • 05-List-Tasks
      • 06-Cancel-or-Delete-Task
    • Hailuo Video Generation
      • 00-Overview
      • 01-Text-to-Video-T2V
      • 02-Image-to-Video-I2V
      • 03-First-Last-Frame-FL2V
      • 04-Subject-Reference-S2V
      • 05-Query-Task-Status
      • 06-Video-Download
      • 99-Appendix-Camera-Movement-and-Webhooks
    • Jimeng Video Generation
      • 00-Overview
      • 01-3.0-Pro-Video-Generation
      • 02-720P-Text-to-Video
      • 03-720P-Image-to-Video-First-Frame
      • 04-720P-Image-to-Video-Start-End-Frame
      • 05-720P-Image-to-Video-Camera
      • 06-1080P-Text-to-Video
      • 07-1080P-Image-to-Video-First-Frame
      • 08-1080P-Image-to-Video-Start-End-Frame
      • 09-Error-Codes
    • Kling AI Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Omni-Video
      • 04-Multi-Image-to-Video
      • 05-Motion-Control
      • 06-Multi-Elements
      • 07-Video-Extension
      • 08-Lip-Sync
      • 09-Avatar
      • 10-Text-to-Audio
      • 11-Video-to-Audio
      • 12-TTS
      • 13-Custom-Voices
      • 14-Image-Recognition
      • 15-Element-Management
      • 16-Video-Effects
    • Vidu Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Start-End-Frame
      • 05-Multi-Frame
      • 06-Scene-Template
      • 07-Template-Story
      • 08-Query-Tasks
    • HappyHorse
      • HappyHorse Text-to-Video
      • HappyHorse Image-to-Video (First Frame)
      • HappyHorse Reference-to-Video
      • HappyHorse Video Editing
    • Wan Video Generation
      • 00-Overview.md
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-First-Last-Frame-to-Video
      • 06-Motion-Transfer-and-Character-Swap
      • 07-Digital-Human-Video
      • 08-VACE-Video-Editing
      • 09-Query-Task
  • Audio API
    • Audio API
    • Gemini TTS API
    • Google DeepMind Lyria API
    • Elevenlabs Speech to Text API Reference
    • Text-to-Music Suno
      • Task Submission
        • Generate Song (Inspiration Mode)
        • Generate Song (Custom Mode)
        • Generate Song (Continuation Mode)
        • Generate Song (Singer Style)
        • Generate Song (Secondary Creation from Uploaded Song)
        • Generate Song (Song Stitching)
        • Generate Lyrics
        • Song Stitching
      • Query Interface
        • Batch Retrieve Tasks
        • Query Single Task
  1. HappyHorse

HappyHorse Video Editing

DataEyes HappyHorse Video Editing API Reference

Overview

The DataEyes HappyHorse Video Editing API enables programmatic video editing through AI-driven style transfer, local replacement, and other visual transformations. By combining an input video with optional reference images and a text prompt describing the desired edit, the API produces a new video reflecting the specified modifications.

  • Model: happyhorse-1.0-video-edit (fixed; no other models are available for this endpoint)
  • Workflow: Asynchronous. Submit a task via POST, then poll for results via GET.
  • Output: A single edited video, 3--15 seconds in duration.

Base URL

https://platform.dataeyes.ai/ali

Authentication

All requests require the following headers:

HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer <your_api_key>Yes
X-DashScope-AsyncenableYes

Test key (for development and integration testing only):

sk-your-api-key

Workflow

1. POST /api/v1/services/aigc/video-generation/video-synthesis
      ↓
   Response contains task_id
      ↓
2. GET /api/v1/tasks/{task_id}    (poll every ~15 seconds)
      ↓
   When status == SUCCEEDED → retrieve output video URL

Step 1: Create a Video Editing Task

Endpoint

POST /api/v1/services/aigc/video-generation/video-synthesis

Request Body

{
  "model": "happyhorse-1.0-video-edit",
  "input": {
    "prompt": "Convert to watercolor painting style",
    "media": [
      {
        "type": "video",
        "url": "https://example.com/source-video.mp4"
      },
      {
        "type": "reference_image",
        "url": "https://example.com/style-reference.jpg"
      }
    ]
  },
  "parameters": {
    "resolution": "1080P",
    "watermark": true,
    "audio_setting": "auto",
    "seed": 42
  }
}

Request Fields

Top-Level

FieldTypeRequiredDescription
modelstringYesMust be happyhorse-1.0-video-edit.
inputobjectYesContains the prompt and media inputs.
parametersobjectNoOptional generation parameters.

input

FieldTypeRequiredDescription
promptstringYesDescribes the editing intent (e.g., style conversion, local replacement, color grading).
mediaarrayYesArray of media objects. Must contain exactly 1 video entry and optionally 0--5 reference_image entries.

input.media[]

FieldTypeRequiredDescription
typestringYes"video" or "reference_image".
urlstringYesPublicly accessible URL for the media file. For reference_image, Base64-encoded data is also accepted.

parameters

FieldTypeDefaultDescription
resolutionstring"1080P"Output resolution. Accepted values: 720P, 1080P.
watermarkbooleantrueWhether to include a watermark on the output video.
audio_settingstring"auto"Audio handling. "auto": the model controls audio output. "origin": preserve the original audio track from the input video.
seedinteger--Random seed for reproducibility. Range: [0, 2147483647].

Note: The ratio and duration parameters are not supported for video editing tasks.

Video Constraints (type: "video")

PropertyRequirement
FormatsMP4, MOV (H.264 codec recommended)
Duration3--60 seconds
Long edge<= 4096 px
Short edge>= 360 px
Aspect ratio1:2.5 to 2.5:1
File size<= 100 MB
Frame rate> 8 fps
URLMust be a publicly accessible URL (Base64 not supported for video)

Output duration behavior:

  • If the input video is <= 15 seconds, the output video matches the input duration.
  • If the input video is > 15 seconds, the system automatically truncates to the first 15 seconds for processing.

Reference Image Constraints (type: "reference_image")

PropertyRequirement
FormatsJPEG, JPG, PNG, WEBP
Minimum dimensionsWidth >= 300 px, Height >= 300 px
Aspect ratio1:2.5 to 2.5:1
File size<= 20 MB
URLPublicly accessible URL or Base64-encoded data
Max count5 reference images per request

Supported MIME types:

FormatMIME Type
JPEG / JPGimage/jpeg
PNGimage/png
WEBPimage/webp

Response

{
  "request_id": "req-xxxxxxxxxxxx",
  "output": {
    "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "task_status": "PENDING"
  }
}
FieldTypeDescription
request_idstringUnique identifier for the API request.
output.task_idstringTask identifier used to poll for results. Valid for 24 hours.
output.task_statusstringInitial status (typically PENDING).

Step 2: Query Task Status

Endpoint

GET /api/v1/tasks/{task_id}

Replace {task_id} with the value returned from Step 1.

Response (Succeeded)

{
  "request_id": "req-xxxxxxxxxxxx",
  "output": {
    "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "task_status": "SUCCEEDED",
    "video_url": "https://cdn.example.com/output-video.mp4"
  },
  "usage": {
    "duration": 10.5,
    "input_video_duration": 10.5,
    "output_video_duration": 10.5,
    "video_count": 1,
    "SR": 0
  }
}

Response (Failed)

{
  "request_id": "req-xxxxxxxxxxxx",
  "output": {
    "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "task_status": "FAILED",
    "message": "Description of the failure reason"
  }
}

Usage Fields

FieldTypeDescription
durationfloatTotal billed duration in seconds.
input_video_durationfloatDuration of the input video segment processed, in seconds.
output_video_durationfloatDuration of the generated output video, in seconds.
video_countintegerNumber of output videos (always 1).
SRintegerSuper-resolution flag.

Task Status Values

StatusDescription
PENDINGTask has been accepted and is queued for processing.
RUNNINGTask is actively being processed.
SUCCEEDEDTask completed successfully. Output video URL is available.
FAILEDTask failed. Check the message field for details.
CANCELEDTask was canceled.
UNKNOWNTask status could not be determined.

Python Example

import requests
import time

BASE_URL = "https://platform.dataeyes.ai/ali"
API_KEY = "sk-your-api-key"

HEADERS = {
    "Content-Type": "application/json",
    "Authorization": f"Bearer {API_KEY}",
    "X-DashScope-Async": "enable",
    "User-Agent": "dataeyes-python/1.0",
}

# Step 1: Create video editing task
payload = {
    "model": "happyhorse-1.0-video-edit",
    "input": {
        "prompt": "Convert to anime style with vibrant colors",
        "media": [
            {
                "type": "video",
                "url": "https://example.com/source-video.mp4",
            },
            {
                "type": "reference_image",
                "url": "https://example.com/anime-style-ref.jpg",
            },
        ],
    },
    "parameters": {
        "resolution": "1080P",
        "watermark": False,
        "audio_setting": "origin",
    },
}

response = requests.post(
    f"{BASE_URL}/api/v1/services/aigc/video-generation/video-synthesis",
    headers=HEADERS,
    json=payload,
)
response.raise_for_status()
result = response.json()

task_id = result["output"]["task_id"]
print(f"Task created: {task_id}")

# Step 2: Poll for results
while True:
    time.sleep(15)

    poll_response = requests.get(
        f"{BASE_URL}/api/v1/tasks/{task_id}",
        headers={
            "Authorization": f"Bearer {API_KEY}",
            "User-Agent": "dataeyes-python/1.0",
        },
    )
    poll_response.raise_for_status()
    status_result = poll_response.json()

    task_status = status_result["output"]["task_status"]
    print(f"Status: {task_status}")

    if task_status == "SUCCEEDED":
        video_url = status_result["output"]["video_url"]
        print(f"Output video: {video_url}")
        break
    elif task_status in ("FAILED", "CANCELED", "UNKNOWN"):
        message = status_result["output"].get("message", "No details provided")
        print(f"Task ended with status {task_status}: {message}")
        break

Notes

  1. Audio handling: Use audio_setting: "origin" to preserve the original audio track from the input video. The default value "auto" allows the model to decide how to handle audio, which may result in modified or removed audio.

  2. Duration truncation: Input videos longer than 15 seconds are automatically truncated to the first 15 seconds. The output video duration will be at most 15 seconds. Plan your input accordingly if precise segment selection is required.

  3. Polling cadence: Poll the task status endpoint approximately every 15 seconds. The query endpoint has a rate limit of 20 requests per second. Excessive polling may result in throttling.

  4. Asset expiration: Both task_id and the output video_url are valid for 24 hours after task creation. Download or persist the output video within this window.

  5. URL accessibility: Video URLs must be publicly accessible. The API does not support authenticated or signed URLs. For reference images, both public URLs and Base64-encoded data are accepted.

  6. No ratio or duration parameters: Unlike video generation endpoints, the video editing endpoint does not accept ratio or duration parameters. The output dimensions and duration are derived from the input video.


Error Codes

Error CodeHTTP StatusDescriptionResolution
InvalidApiKey401The API key is missing, malformed, or revoked.Verify the API key in the Authorization header.
InvalidParameter400One or more request parameters are invalid (e.g., unsupported format, missing required field, constraint violation).Review the request body against the field and constraint specifications above.
Throttling429Request rate limit exceeded.Reduce request frequency and implement exponential backoff.

DataEyes HappyHorse Video Editing API -- Reference Documentation

Previous
HappyHorse Reference-to-Video
Next
00-Overview.md