# OmniHuman 1.5 API

> OmniHuman 1.5 — high-quality AI video generation.

- **Provider**: ByteDance
- **Model id**: `omnihuman-1-5`
- **Modality**: video
- **Price**: 15.22 credits /sec

## Overview

OmniHuman 1.5 is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `omnihuman-1-5` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| image_url | string | Yes | Portrait image URL, supports any aspect ratio with subjects including people/pets/anime, etc. (image URL) |
| mask_url | string | No | To have a specific subject in the image speak, use 'Subject Detection' to get the corresponding mask image and pass it as input. |
| audio_url | string | Yes | Audio URL. Duration must be < 60 seconds (recommended ≤15 seconds; exceeding this will cause degradation). (image URL) |
| prompt | string | No | Prompt text, limited to Chinese/English/Japanese/Korean/Spanish/Indonesian, recommended ≤300 characters. (default: Make the person in the photo speak the audio naturally with warm, friendly gestures.) |
| output_resolution | string | No | Output video resolution, default 1080. (options: 720 | 1080) (default: 1080) |
| pe_fast_mode | boolean | No | Fast mode, sacrifices some quality to speed up generation. (true/false) (default: false) |
| seed | number | No | Random seed. Default is -1 (random). When using the same positive integer and keeping all other parameters identical, the result will be highly consistent (with very high probability). (default: -1) |

### Request example

```json
{
  "modelId": "omnihuman-1-5",
  "input": {
    "image_url": "https://example.com/input.jpg",
    "mask_url": "example",
    "audio_url": "https://example.com/input.jpg",
    "prompt": "A cinematic aerial shot of a coastal town at golden hour, gentle waves rolling onto the shore, warm light, slow camera push-in.",
    "output_resolution": "1080",
    "pe_fast_mode": false,
    "seed": "-1"
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 24
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=omnihuman-1-5`

When `state` is `success`, the output is in `resultUrls`: `{ "state": "success", "resultUrls": [ ... ] }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
