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 Reference-to-Video

DataEyes HappyHorse Reference-to-Video API Reference#

Overview#

The DataEyes HappyHorse Reference-to-Video API generates videos by fusing subjects extracted from one or more reference images into a coherent video clip, guided by a text prompt. The API supports up to nine reference images per request, enabling multi-subject composition within a single generated video.
Available Models:
ModelDescription
happyhorse-1.1-r2vLatest generation, improved subject fidelity and motion quality
happyhorse-1.0-r2vFirst-generation reference-to-video model

Endpoint#

Base URL: https://platform.dataeyes.ai/ali
MethodPathPurpose
POST/api/v1/services/aigc/video-generation/video-synthesisCreate a video generation task
GET/api/v1/tasks/{task_id}Query task status and retrieve results

Authentication#

All requests must include the following headers:
HeaderValueRequired
Content-Typeapplication/jsonYes
AuthorizationBearer sk-xxxxYes
X-DashScope-AsyncenableYes
Test Key: sk-your-api-key
The X-DashScope-Async header is mandatory. All video generation requests are processed asynchronously.

Workflow#

The API follows an asynchronous task workflow:
1. POST  /video-synthesis       -->  Receive task_id
2. GET   /tasks/{task_id}       -->  Poll until SUCCEEDED or FAILED
3. Extract video URL from response
Poll every 15 seconds. Do not exceed 20 queries per second (RPS).
The returned task_id and video download URL are valid for 24 hours.

Step 1: Create a Video Generation Task#

Request#

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

Request Body#

{
  "model": "happyhorse-1.1-r2v",
  "input": {
    "prompt": "[Image 1] the woman in a red cheongsam walks along the Great Wall at sunset",
    "media": [
      {
        "type": "reference_image",
        "url": "https://example.com/reference-photo.jpg"
      }
    ]
  },
  "parameters": {
    "resolution": "1080P",
    "ratio": "16:9",
    "duration": 5,
    "watermark": true,
    "seed": 42
  }
}

Field Reference#

Top-Level#

FieldTypeRequiredDescription
modelstringYesModel identifier. One of happyhorse-1.1-r2v, happyhorse-1.0-r2v.

input#

FieldTypeRequiredDescription
input.promptstringYesText prompt describing the desired video. Use [Image N] placeholders to reference items in the media array by position (1-indexed). See Prompt Referencing below.
input.mediaarrayYesArray of 1 to 9 reference image objects.

input.media[]#

FieldTypeRequiredDescription
typestringYesFixed value: "reference_image".
urlstringYesPublic URL or Base64-encoded image data.

parameters#

FieldTypeRequiredDefaultDescription
resolutionstringNo"1080P"Output resolution. Values: 720P, 1080P.
ratiostringNo"16:9"Aspect ratio. Values: 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9.
durationintegerNo5Video duration in seconds. Range: 3 to 15.
watermarkbooleanNotrueWhether to apply a watermark to the output video.
seedintegerNoRandomRandom seed for reproducibility. Range: 0 to 2,147,483,647.

Prompt Referencing#

The prompt field uses positional placeholders to bind reference images to subjects described in the text. Each placeholder takes the form [Image N], where N corresponds to the 1-based index of an element in the media array.
Rules:
Every [Image N] placeholder must be followed by a concrete description of the subject in that image (e.g., person, object, animal).
N must be within the range [1, len(media)].
You may reference the same image multiple times.
Examples:
Media CountPrompt
1 image"[Image 1] the woman in a red cheongsam walks along the Great Wall at sunset"
2 images"[Image 1] the golden retriever and [Image 2] the young boy play fetch in a park"
3 images"[Image 1] the sports car drifts around [Image 2] the racetrack while [Image 3] the crowd cheers"

Image Constraints#

ConstraintValue
Supported formatsJPEG, JPG, PNG, WEBP
Minimum short edge400 px
Recommended quality720P or higher, clear images
Maximum file size20 MB
MIME Types:
FormatMIME Type
JPEG / JPGimage/jpeg
PNGimage/png
WEBPimage/webp

Response#

{
  "request_id": "req-xxxxxxxx",
  "output": {
    "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "task_status": "PENDING"
  }
}

Step 2: Query Task Status#

Request#

GET /api/v1/tasks/{task_id}
Replace {task_id} with the value returned in Step 1.

Response (Succeeded)#

{
  "request_id": "req-xxxxxxxx",
  "output": {
    "task_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "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,
    "ratio": "16:9"
  }
}

Usage Fields#

FieldTypeDescription
durationintegerRequested duration in seconds.
input_video_durationintegerInput video duration. Fixed 0 for reference-to-video (no input video).
output_video_durationintegerActual output video duration in seconds.
video_countintegerNumber of generated videos. Fixed 1.
SRintegerSuper-resolution indicator.
ratiostringAspect ratio of the generated video.

Task Status#

StatusDescription
PENDINGTask has been accepted and is queued for processing.
RUNNINGVideo generation is in progress.
SUCCEEDEDGeneration completed successfully. Video URL is available.
FAILEDGeneration failed. Check the error message in the response.
CANCELEDTask was canceled.
UNKNOWNStatus could not be determined.

Python Example#


Notes#

1.
Asynchronous only. The X-DashScope-Async: enable header is mandatory. There is no synchronous generation endpoint.
2.
Polling interval. Poll no more frequently than every 15 seconds. The query endpoint enforces a rate limit of 20 RPS.
3.
URL expiry. Both the task_id and the returned video URL expire after 24 hours. Download the video promptly.
4.
Image quality. For best results, use clear reference images at 720P resolution or higher. The short edge of every image must be at least 400 pixels.
5.
Prompt specificity. Always describe the concrete subject in each referenced image. Generic prompts such as "[Image 1] generates a video" will produce poor results. Instead, specify what the subject is: "[Image 1] the woman in a red cheongsam".
6.
Multi-subject composition. When using multiple reference images, each [Image N] placeholder should identify a distinct subject. The model fuses all referenced subjects into a single coherent video.
7.
Seed reproducibility. Setting the seed parameter to a fixed value enables approximate reproducibility across runs with the same inputs and parameters.
8.
Base64 input. When providing Base64-encoded image data in the url field, supply the raw Base64 string without a data: URI prefix.

Error Codes#

Error CodeHTTP StatusDescriptionResolution
InvalidApiKey401The API key is missing, malformed, or revoked.Verify the Authorization header contains a valid Bearer token.
InvalidParameter400One or more request parameters are invalid.Check the error message for the specific field. Common causes: unsupported ratio, duration out of range, missing prompt, image too small, or media array empty/exceeding 9 elements.
Throttling429Request rate limit exceeded.Reduce request frequency. Implement exponential backoff and retry after the period indicated in the response.
Previous
HappyHorse Image-to-Video (First Frame)
Next
HappyHorse Video Editing