Source: https://ailoot.ai/models/en/happyhorse-1-1-i2v/
Canonical: https://ailoot.ai/models/en/happyhorse-1-1-i2v/
Language: en

# happyhorse-1.1-i2v

[Markdown](https://ailoot.ai/models/en/happyhorse-1-1-i2v/index.md) · [JSON](https://ailoot.ai/models/en/happyhorse-1-1-i2v/facts.json)

## [happyhorse-1.1-i2v](https://ailoot.ai/models/en/happyhorse-1-1-i2v/)

An image-to-video model: the source image provides the first frame, and the prompt guides the subsequent motion. Creates a short video with optional accompanying audio.

- [**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-1.1-i2v`](https://ailoot.ai/models/en/happyhorse-1-1-i2v/#method-0)
- [**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-i2v`](https://ailoot.ai/models/en/happyhorse-1-1-i2v/#method-1)
- [**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-i2v-latest`](https://ailoot.ai/models/en/happyhorse-1-1-i2v/#method-2)

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

HappyHorse-1.1-I2V is an Alibaba model that starts a video scene from an existing image. The image becomes the first frame, while text can specify what happens next: a character's movement, changes in the scene and the camera's direction. It is suited to animating an illustration, a product photograph or a prepared visual concept.

A text prompt is optional. Without one, the model infers possible motion from the initial image. When a prompt is supplied, the source image determines the composition and the appearance of objects, while the words guide how the scene develops over time.

#### From the first frame to motion

Alibaba highlights preservation of character appearance, visual consistency, smooth movement and the combination of visuals with audio. Its stated aims also include stable text and textures. These properties describe the model's intended capabilities; they do not mean that every pixel is literally preserved in every generated frame.

This mode uses one initial image. It defines the starting scene rather than providing a set of independent references for a new composition. The ability to specify a separate final frame is not stated for this particular version.

JPEG, JPG, PNG and WEBP are accepted. Each dimension of the input image must be at least 300 pixels; the permitted aspect ratio ranges from 1:2.5 to 2.5:1, and the file size limit is 20 MB. The output video's aspect ratio follows the first frame.

#### Video parameters

The duration is selected as an integer from 3 to 15 seconds. Available resolution levels are 480P, 720P and 1080P; the output format is MP4 at 24 frames per second. Audio can be generated alongside the video.

The prompt may be in any language and contain up to 5000 non-Chinese or 2500 Chinese characters. Any excess is truncated, so important actions and motion details should fit within that limit. The same random seed may produce similar videos, but does not guarantee a frame-by-frame match.

**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-1.1-i2v`

[`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos)

Alibaba /`happyhorse-1.1-i2v`

Model ID

- `happyhorse-1.1-i2v`
- `happyhorse-i2v`
- `happyhorse-i2v-latest`

### Overview

An image-to-video model: the source image provides the first frame, and the prompt guides the subsequent motion. Creates a short video with optional accompanying audio.

Accepted inputs

Text · Images

Results

Video

### Available in Ailoot · inputs & methods

**Ailoot · Video** `POST /v1/videos/generations`

Input types

`text`, `image`

Output types

`video`

Output format

mp4

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits happyhorse-1.1-i2v | Default— |
| Field`prompt` | Type`string` | RequirementOptional | Values & limits Minimum length: 1 | Default— |
| Field`duration` | Type`integer` | RequirementOptional | Values & limits Minimum: 3 Maximum: 15 Unit: seconds | Default5 |
| Field`resolution` | Type`string` | RequirementOptional | Values & limits 480P, 720P, 1080P | Default720P |
| Field`ratio` | Type`string` | RequirementNot supported | Values & limits | Default— |
| Field`image_urls` | Type`https_url\|data_image_url[]` | RequirementRequired | Values & limits Minimum items: 1 Maximum items: 1 Maximum decoded bytes: 20,971,520 MIME types: image/jpeg, image/png, image/webp | Default— |

Input material combinations

**first\_frame\_to\_video** · Required: image\_urls

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`content_type` | Contractapplication/json |
| Parameter`required` | Contractmodel, image\_urls |
| Parameter`material_types` | Contracttext, image |
| Parameter`optional` | Contractduration, resolution, ratio, prompt |
| Parameter`duration_integer_range` | Contract3, 15 |
| Parameter`default_duration` | Contract5 |
| Parameter`resolution` | Contract480P, 720P, 1080P |
| Parameter`default_resolution` | Contract720P |
| Parameter`ratio` | Contract |
| Parameter`ratio_must_omit` | Contracttrue |
| Parameter`image_urls` | Contract{"min\_count":1,"max\_count":1,"schemes":\["https","data raster base64"\],"max\_data\_image\_bytes":20971520} |

Lifecycle: `submit_once_poll_original`

`GET /v1/videos/{request_id}`

`GET /v1/videos/generations/{request_id}`

`GET /v1/videos/{request_id}/content`

`GET /v1/videos/generations/{request_id}/content`

Method shapes and IDs are exact; supplier capability is separate from admission.

### Pricing

#### Ailoot method rates

Output

$0.18 *per second at 1080p*

Output

$0.07 *per second at 480p*

Output

$0.14 *per second at 720p*

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot · Video

Image reference

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-1.1-i2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT
```

### Receive and save results

#### Ailoot · Video

mp4

- `GET /v1/videos/{request_id}`
- `GET /v1/videos/generations/{request_id}`
- `GET /v1/videos/{request_id}/content`
- `GET /v1/videos/generations/{request_id}/content`

##### Check job status

GET status

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
```

##### Save all completed assets

GET all completed assets

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
```

Other content reads

GET content

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
```

##### Keep all completed results

Save every completed video or returned file; retrieve every actual returned asset URL.

Preserve every returned data item/output index. content\_url is first only; fetch every actual content path/asset. GETcontentwithoutindex isnotalloutputs.

##### If the original response needs checking

Read existing original job; never resubmit unknown send.

Response fields

| Field | Type |
| --- | --- |
| Field`id` | Typestring |
| Field`object` | Typestring |
| Field`model` | Typestring |
| Field`status` | Typestring |
| Field`content_url` | Typesigned URL |
| Field`data[]` | Typesigned URL |
| Field`usage` | Typeobject |
| Field`result_pending_check` | Typeboolean |

Errors and next steps

| Response | Condition | Next step |
| --- | --- | --- |
| Response400 · `invalid_request_error` | ConditionInvalid required fields, material representation or parameter value | Next stepCorrect the indicated fields before a new creation request. |
| Response409 · `video_not_ready` | ConditionOriginal result content is not yet available | Next stepPoll the original returned ID and respect Retry-After. |
| Response`server_error` | ConditionThe returned response says the operation or result requires a check | Next stepKeep the original returned operation/task ID, request headers and response; continue supported reads of that original operation. Do not resubmit the creation request. |

### Aliases

#### Model aliases

**Ailoot** [`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

#### Method path aliases

Use the method paths shown above.

#### Related caller IDs

[`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-i2v`

[`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos)

Alibaba /`happyhorse-i2v`

Model ID

- `happyhorse-1.1-i2v`
- `happyhorse-i2v`
- `happyhorse-i2v-latest`

### Overview

An image-to-video model: the source image provides the first frame, and the prompt guides the subsequent motion. Creates a short video with optional accompanying audio.

Accepted inputs

Text · Images

Results

Video

### Available in Ailoot · inputs & methods

**Ailoot · Video** `POST /v1/videos/generations`

Input types

`text`, `image`

Output types

`video`

Output format

mp4

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits happyhorse-i2v | Default— |
| Field`prompt` | Type`string` | RequirementOptional | Values & limits Minimum length: 1 | Default— |
| Field`duration` | Type`integer` | RequirementOptional | Values & limits Minimum: 3 Maximum: 15 Unit: seconds | Default5 |
| Field`resolution` | Type`string` | RequirementOptional | Values & limits 480P, 720P, 1080P | Default720P |
| Field`ratio` | Type`string` | RequirementNot supported | Values & limits | Default— |
| Field`image_urls` | Type`https_url\|data_image_url[]` | RequirementRequired | Values & limits Minimum items: 1 Maximum items: 1 Maximum decoded bytes: 20,971,520 MIME types: image/jpeg, image/png, image/webp | Default— |

Input material combinations

**first\_frame\_to\_video** · Required: image\_urls

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`material_types` | Contracttext, image |
| Parameter`required` | Contractnull |
| Parameter`optional_controls` | Contractnull |

Lifecycle: `submit_once_poll_original`

`GET /v1/videos/{request_id}`

`GET /v1/videos/generations/{request_id}`

`GET /v1/videos/{request_id}/content`

`GET /v1/videos/generations/{request_id}/content`

Method shapes and IDs are exact; supplier capability is separate from admission.

### Pricing

#### Ailoot method rates

Output

$0.18 *per second at 1080p*

Output

$0.07 *per second at 480p*

Output

$0.14 *per second at 720p*

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot · Video

Image reference

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-i2v", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT
```

### Receive and save results

#### Ailoot · Video

mp4

- `GET /v1/videos/{request_id}`
- `GET /v1/videos/generations/{request_id}`
- `GET /v1/videos/{request_id}/content`
- `GET /v1/videos/generations/{request_id}/content`

##### Check job status

GET status

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
```

##### Save all completed assets

GET all completed assets

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
```

Other content reads

GET content

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
```

##### Keep all completed results

Save every completed video or returned file; retrieve every actual returned asset URL.

Preserve every returned data item/output index. content\_url is first only; fetch every actual content path/asset. GETcontentwithoutindex isnotalloutputs.

##### If the original response needs checking

Read existing original job; never resubmit unknown send.

Response fields

| Field | Type |
| --- | --- |
| Field`id` | Typestring |
| Field`object` | Typestring |
| Field`model` | Typestring |
| Field`status` | Typestring |
| Field`content_url` | Typesigned URL |
| Field`data[]` | Typesigned URL |
| Field`usage` | Typeobject |
| Field`result_pending_check` | Typeboolean |

Errors and next steps

| Response | Condition | Next step |
| --- | --- | --- |
| Response400 · `invalid_request_error` | ConditionInvalid required fields, material representation or parameter value | Next stepCorrect the indicated fields before a new creation request. |
| Response409 · `video_not_ready` | ConditionOriginal result content is not yet available | Next stepPoll the original returned ID and respect Retry-After. |
| Response`server_error` | ConditionThe returned response says the operation or result requires a check | Next stepKeep the original returned operation/task ID, request headers and response; continue supported reads of that original operation. Do not resubmit the creation request. |

### Aliases

#### Model aliases

**Ailoot** [`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

#### Method path aliases

Use the method paths shown above.

#### Related caller IDs

[`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

**Ailoot · Video** `POST /v1/videos/generations` `happyhorse-i2v-latest`

[`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

Alibaba /`happyhorse-i2v-latest`

Model ID

- `happyhorse-1.1-i2v`
- `happyhorse-i2v`
- `happyhorse-i2v-latest`

### Overview

An image-to-video model: the source image provides the first frame, and the prompt guides the subsequent motion. Creates a short video with optional accompanying audio.

Accepted inputs

Text · Images

Results

Video

### Available in Ailoot · inputs & methods

**Ailoot · Video** `POST /v1/videos/generations`

Input types

`text`, `image`

Output types

`video`

Output format

mp4

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits happyhorse-i2v-latest | Default— |
| Field`prompt` | Type`string` | RequirementOptional | Values & limits Minimum length: 1 | Default— |
| Field`duration` | Type`integer` | RequirementOptional | Values & limits Minimum: 3 Maximum: 15 Unit: seconds | Default5 |
| Field`resolution` | Type`string` | RequirementOptional | Values & limits 480P, 720P, 1080P | Default720P |
| Field`ratio` | Type`string` | RequirementNot supported | Values & limits | Default— |
| Field`image_urls` | Type`https_url\|data_image_url[]` | RequirementRequired | Values & limits Minimum items: 1 Maximum items: 1 Maximum decoded bytes: 20,971,520 MIME types: image/jpeg, image/png, image/webp | Default— |

Input material combinations

**first\_frame\_to\_video** · Required: image\_urls

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`material_types` | Contracttext, image |
| Parameter`required` | Contractnull |
| Parameter`optional_controls` | Contractnull |

Lifecycle: `submit_once_poll_original`

`GET /v1/videos/{request_id}`

`GET /v1/videos/generations/{request_id}`

`GET /v1/videos/{request_id}/content`

`GET /v1/videos/generations/{request_id}/content`

Method shapes and IDs are exact; supplier capability is separate from admission.

### Pricing

#### Ailoot method rates

Output

$0.18 *per second at 1080p*

Output

$0.07 *per second at 480p*

Output

$0.14 *per second at 720p*

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot · Video

Image reference

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_URL:?Set the HTTPS URL of your actual first-frame image}"
export AILOOT_IMAGE_URL
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "happyhorse-i2v-latest", "prompt": "The subject walks slowly toward the camera.", "duration": 5, "resolution": "720P"}')
from urllib.parse import urlsplit
u=os.environ["AILOOT_IMAGE_URL"]
z=urlsplit(u)
if z.scheme!="https" or not z.netloc or z.username or z.password:raise SystemExit("Set the actual HTTPS image URL")
p["image_urls"]=[u]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/videos/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
print(json.dumps(r))
PY_RESULT
```

### Receive and save results

#### Ailoot · Video

mp4

- `GET /v1/videos/{request_id}`
- `GET /v1/videos/generations/{request_id}`
- `GET /v1/videos/{request_id}/content`
- `GET /v1/videos/generations/{request_id}/content`

##### Check job status

GET status

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o status.json
python3 - <<'PY_STATUS'
import json
from pathlib import Path
r=json.loads(Path("status.json").read_text())
print(json.dumps(r))
if r.get("status")=="completed":
    for x in r.get("data",[]):print(x)
PY_STATUS
```

##### Save all completed assets

GET all completed assets

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_STATUS_FILE:?Set the actual completed status JSON file}"
export AILOOT_STATUS_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
from urllib.parse import urlsplit,urljoin
f=Path(os.environ["AILOOT_STATUS_FILE"])
if not f.is_file():raise SystemExit("Choose the actual completed status file")
r=json.loads(f.read_text())
if r.get("status")!="completed" or not isinstance(r.get("data"),list) or not r["data"]:raise SystemExit("Wait for a completed status with asset paths")
urls=[]
for x in r["data"]:
    if not isinstance(x,str) or "\n" in x or "\r" in x:raise SystemExit("Invalid asset path")
    u=urljoin("https://api.ailoot.ai",x)
    z=urlsplit(u)
    if z.scheme!="https" or z.netloc!="api.ailoot.ai" or z.username or z.password:raise SystemExit("Use the actual Ailoot asset paths from status")
    urls.append(u)
Path("asset-urls.txt").write_text("\n".join(urls)+"\n")
PY_REQUEST
index=0
while IFS= read -r asset_url; do
  curl --fail-with-body --silent --show-error "$asset_url" \
    -H "Authorization: Bearer $AILOOT_API_KEY" -o "video-${index}.mp4"
  index=$((index + 1))
done < asset-urls.txt
```

Other content reads

GET content

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_OPERATION_ID:?Set the actual Ailoot operation ID returned by creation}"
export AILOOT_OPERATION_ID
operation_id=$(python3 -c 'import os,urllib.parse;print(urllib.parse.quote(os.environ["AILOOT_OPERATION_ID"],safe=""))')
curl --fail-with-body --silent --show-error "https://api.ailoot.ai/v1/videos/generations/$operation_id/content" \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o video.mp4
```

##### Keep all completed results

Save every completed video or returned file; retrieve every actual returned asset URL.

Preserve every returned data item/output index. content\_url is first only; fetch every actual content path/asset. GETcontentwithoutindex isnotalloutputs.

##### If the original response needs checking

Read existing original job; never resubmit unknown send.

Response fields

| Field | Type |
| --- | --- |
| Field`id` | Typestring |
| Field`object` | Typestring |
| Field`model` | Typestring |
| Field`status` | Typestring |
| Field`content_url` | Typesigned URL |
| Field`data[]` | Typesigned URL |
| Field`usage` | Typeobject |
| Field`result_pending_check` | Typeboolean |

Errors and next steps

| Response | Condition | Next step |
| --- | --- | --- |
| Response400 · `invalid_request_error` | ConditionInvalid required fields, material representation or parameter value | Next stepCorrect the indicated fields before a new creation request. |
| Response409 · `video_not_ready` | ConditionOriginal result content is not yet available | Next stepPoll the original returned ID and respect Retry-After. |
| Response`server_error` | ConditionThe returned response says the operation or result requires a check | Next stepKeep the original returned operation/task ID, request headers and response; continue supported reads of that original operation. Do not resubmit the creation request. |

### Aliases

#### Model aliases

**Ailoot** [`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

#### Method path aliases

Use the method paths shown above.

#### Related caller IDs

[`happyhorse-1.1-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-1.1-i2v&fmt=videos), [`happyhorse-i2v`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v&fmt=videos), [`happyhorse-i2v-latest`](https://ailoot.ai/models/en/#m=happyhorse-1.1-i2v&route=Core&caller=happyhorse-i2v-latest&fmt=videos)

FAQ · happyhorse-1.1-i2v

What inputs and results are available?

`POST /v1/videos/generations` · `happyhorse-1.1-i2v`: `text`, `image` → `video` `POST /v1/videos/generations` · `happyhorse-i2v`: `text`, `image` → `video` `POST /v1/videos/generations` · `happyhorse-i2v-latest`: `text`, `image` → `video`

Which fields does the request use?

`POST /v1/videos/generations` · `happyhorse-1.1-i2v`: `model`, `prompt`, `duration`, `resolution`, `image_urls` `POST /v1/videos/generations` · `happyhorse-i2v`: `model`, `prompt`, `duration`, `resolution`, `image_urls` `POST /v1/videos/generations` · `happyhorse-i2v-latest`: `model`, `prompt`, `duration`, `resolution`, `image_urls`

What limits apply?

`POST /v1/videos/generations` · `happyhorse-1.1-i2v`: `duration.minimum`: `3`; `duration.maximum`: `15` `POST /v1/videos/generations` · `happyhorse-i2v`: `duration.minimum`: `3`; `duration.maximum`: `15` `POST /v1/videos/generations` · `happyhorse-i2v-latest`: `duration.minimum`: `3`; `duration.maximum`: `15`

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

## The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

## Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription

Choose a discounted plan for your regular requests.

Promo code: up to 50% off

Enter your code at checkout. The price updates to reflect the current promotion.

Spending in your history

The model, tokens and amount are recorded for each request.

[Choose a subscription](https://ailoot.ai/docs/en/billing/subscriptions/) · [View model prices](https://ailoot.ai/models/en/)

## Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application

Add text, image, video and audio generation to paid features in your service.

Reseller licence

Send a description of your project and how you provide access. Request written terms for use and resale.

Documents on the website

The service offer, licence agreement and data processing policy are available before you connect.

[Request a reseller licence](mailto:support@ailoot.ai) · [Service offer and licence agreement](https://ailoot.ai/legal/offer?lang=en)

## Ailoot · The company and its project portfolio





Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.





The company and its project portfolio: millions of customers; monthly sales in the billions.





Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
