Skip to main content
POST
/
v1
/
predictions
curl --request POST \
  --url https://api.shuyou.ai/v1/predictions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "happyhorse-1.0-video-edit",
  "function": "video",
  "input": {
    "prompt": "Replace the background with a snowy mountain landscape while keeping the subject unchanged",
    "reference_video_urls": [
      "https://example.com/source-video.mp4"
    ]
  }
}
'
{
  "data": {
    "task_id": "2c4d50261173430290971a2395a3b607",
    "task_status": "processing"
  }
}

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
enum<string>
default:happyhorse-1.0-video-edit
required

Model ID. Use happyhorse-1.0-video-edit for this endpoint.

Available options:
happyhorse-1.0-video-edit
Example:

"happyhorse-1.0-video-edit"

function
enum<string>
required

Task type. Must be video for video generation.

Available options:
video
Example:

"video"

input
object
required
webhook
string<uri>

Optional HTTPS callback URL when the task completes, fails, or is cancelled (Predictions API).

Response

Async task created

data
object
required