DataEyesAI
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models API
Official SiteConsoleDocs Home
Getting StartedDeveloper ToolsAI Models API
  1. HappyHorse
  • Getting Started
    • Overview
    • Console (Getting Started)
    • API Key
    • Base URL
  • Developer Tool Integration
    • OpenClaw
    • Claude Code
    • Codex
    • Gemini CLI
    • Grok CLI
    • Other Tools
  • AI Models API
    • 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
  • Search / Reader Product
    • Web Reader API​​
      • Web Reader API
      • Web Reader API(HK)
    • Web Search API​​
      • Modal Card API
        • Weather
          • All City ID
          • Weather Query API
      • Web Search API
      • Video Search api
      • Trending Search API
    • Document OCR Parsing API
      • fiel upload
      • URL Parsing
  • Advanced & System API
    • Data Updates
    • System interface
      • API Key & Quota Query API
      • API Key Management API
    • API Reference​​
      • Error Codes
      • HTTP Notes
    • List models
      • Models
  1. HappyHorse

HappyHorse Image-to-Video (First Frame)

DataEyes HappyHorse Image-to-Video (First Frame) API Reference#

Overview#

The DataEyes HappyHorse Image-to-Video (First Frame) API generates video clips from a single input image used as the first frame. An optional text prompt can guide the video content. The API operates asynchronously: you submit a generation task and then poll for the result.
Available Models:
Model IDDescription
happyhorse-1.1-i2vHappyHorse v1.1 Image-to-Video
happyhorse-1.0-i2vHappyHorse v1.0 Image-to-Video

Base URL#

https://platform.dataeyes.ai/ali

Authentication#

All requests require a valid API key passed in the Authorization header using the Bearer scheme.
Authorization: Bearer sk-xxxx
Test Key (for development only):
sk-your-api-key

Asynchronous Workflow#

The API follows a two-step asynchronous pattern:
1.
Submit a video generation task via POST. The response returns a task_id.
2.
Poll the task status via GET using the task_id until the status is SUCCEEDED or FAILED.
Recommended polling interval: every 15 seconds. Query rate limit: 20 requests per second.
Task IDs and generated video URLs are valid for 24 hours after creation.

Step 1: Create a Video Generation Task#

Endpoint#

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

Required Headers#

HeaderValue
Content-Typeapplication/json
AuthorizationBearer sk-xxxx
X-DashScope-Asyncenable

Request Body#

FieldTypeRequiredDescription
modelstringYesModel identifier. One of happyhorse-1.1-i2v or happyhorse-1.0-i2v.
inputobjectYesInput specification containing the prompt and media.
input.promptstringNoText prompt describing desired video content. Maximum 5,000 non-Chinese characters or 2,500 Chinese characters. Unlike the text-to-video API, this field is optional for image-to-video.
input.mediaarrayYesArray containing exactly 1 media element specifying the first frame image.
input.media[].typestringYesFixed value: "first_frame".
input.media[].urlstringYesPublic URL (HTTP or HTTPS) to the image, or a Base64-encoded data URI in the format data:{MIME};base64,{data}.
parametersobjectNoGeneration parameters (see below).

Parameters Object#

FieldTypeRequiredDefaultDescription
resolutionstringNo"1080P"Output resolution. Accepted values: 720P, 1080P. The model auto-scales total pixel count to match the target resolution. Output aspect ratio follows the input first frame image.
durationintegerNo5Video duration in seconds. Range: [3, 15].
watermarkbooleanNotrueWhether to include a watermark on the generated video.
seedintegerNo(random)Random seed for reproducibility. Range: [0, 2147483647].
Note: The ratio parameter is not supported for image-to-video generation. The output aspect ratio is determined automatically by the input first frame image.

Image Constraints#

ConstraintRequirement
Supported formatsJPEG, JPG, PNG, WEBP
Minimum dimensionsWidth >= 300 px, Height >= 300 px
Aspect ratioBetween 1:2.5 and 2.5:1
Maximum file size20 MB
MIME Types for Base64 Data URIs:
FormatMIME Type
JPEG / JPGimage/jpeg
PNGimage/png
WEBPimage/webp

Example Request#

Example Response#

{
  "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "output": {
    "task_id": "ab123456-cd78-ef90-1234-567890abcdef",
    "task_status": "PENDING"
  }
}

Step 2: Query Task Status#

Endpoint#

GET /api/v1/tasks/{task_id}

Required Headers#

HeaderValue
AuthorizationBearer sk-xxxx

Path Parameters#

ParameterTypeDescription
task_idstringThe task ID returned from Step 1.

Example Request#

Example Response (SUCCEEDED)#

{
  "request_id": "f0e1d2c3-b4a5-6789-0abc-def123456789",
  "output": {
    "task_id": "ab123456-cd78-ef90-1234-567890abcdef",
    "task_status": "SUCCEEDED",
    "video_url": "https://cdn.example.com/generated-video.mp4"
  },
  "usage": {
    "duration": 5,
    "input_video_duration": 0,
    "output_video_duration": 5,
    "video_count": 1,
    "SR": 0
  }
}
Video output format: MP4, H.264 codec, 24 fps.

Usage Fields#

FieldTypeDescription
durationintegerRequested video duration in seconds.
input_video_durationintegerInput video duration. Fixed 0 for image-to-video tasks.
output_video_durationintegerActual output video duration in seconds.
video_countintegerNumber of videos generated. Fixed 1.
SRintegerSuper-resolution flag.

Task Status Reference#

StatusDescription
PENDINGTask has been accepted and is queued for processing.
RUNNINGTask is actively generating the video.
SUCCEEDEDVideo generation completed successfully. The video_url field is populated.
FAILEDTask failed. Check the error message in the response for details.
CANCELEDTask was canceled before completion.
UNKNOWNTask status could not be determined.

Python Example#


FAQ#

How is the output aspect ratio determined?#

For image-to-video (first frame) generation, the output aspect ratio is determined automatically by the input first frame image. The ratio parameter is not supported for i2v tasks (unlike text-to-video). The model reads the dimensions of the provided image and generates a video matching that aspect ratio. The resolution parameter controls the total pixel count (720P or 1080P), but the aspect ratio always follows the input image.

Is the prompt required for image-to-video?#

No. Unlike the text-to-video API, the input.prompt field is optional for image-to-video generation. If omitted, the model will infer motion and content from the first frame image alone. Providing a prompt can help guide the generated motion and scene evolution.

How long are task IDs and video URLs valid?#

Both task IDs and generated video URLs expire 24 hours after creation. Download or consume the video within this window.

What polling interval should I use?#

Poll every 15 seconds. The query endpoint has a rate limit of 20 requests per second.

Notes#

The X-DashScope-Async: enable header is required on the creation request. Omitting it will result in an error.
The input.media array must contain exactly one element with type set to "first_frame".
When using Base64 data URIs, the format must be data:{MIME};base64,{data} with the correct MIME type for the image format.
The ratio parameter (used in text-to-video) is not applicable to image-to-video and will be ignored or cause an error if provided.
Video output is encoded as MP4 with H.264 codec at 24 fps.

Error Codes#

Error CodeHTTP StatusDescription
InvalidApiKey401The API key is missing, malformed, or invalid. Verify the Authorization header value.
InvalidParameter400One or more request parameters are invalid. Check field values, image constraints, and required fields.
Throttling429Request rate limit exceeded. Reduce request frequency and retry after a brief delay.
Previous
HappyHorse Text-to-Video
Next
HappyHorse Reference-to-Video