# OmniHuman 2.0

> OmniHuman 2.0 by ByteDance on FlyMy.AI: one picture and a voice track become a video of it talking, singing or performing, 4 seconds to 5 minutes, 720p, priced per second.

OmniHuman 2.0 is ByteDance's avatar video model. Give it one picture and an
audio track: the person, cartoon character or animal in the picture speaks,
sings or performs in time with the sound, with matching lips, facial
expressions, gestures and body movement. The video is as long as the audio,
from 4 seconds up to 5 minutes, in 720p.

| Endpoint id | Model page |
| --- | --- |
| `flymyai/bytedance-omnihuman-2_0` | https://app.flymy.ai/models/flymyai/bytedance-omnihuman-2_0 |

## Make a talking video

A video takes a few minutes, so use the async route: submit, then poll the
result. Inputs are form fields: upload the files, or pass public URLs.

```bash
curl -X POST https://api.flymy.ai/api/v1/flymyai/bytedance-omnihuman-2_0/predict/async/ \
  -H "X-API-KEY: fly-***" \
  -F 'image=@presenter.jpg' \
  -F 'audio=@voice.mp3' \
  -F 'prompt=He talks warmly to the camera, smiles and gestures with his hands'
# {"prediction_id": "02ecd473..."}

curl "https://api.flymy.ai/api/v1/flymyai/bytedance-omnihuman-2_0/predict/async/result/?request_id=02ecd473..." \
  -H "X-API-KEY: fly-***"
```

The result route answers `425` while the video is being made. When it is
ready, it returns:

```json
{
  "inference_responses": [
    {
      "response": {
        "video": [{"url": "https://storage.googleapis.com/...", "content_type": "video/mp4"}],
        "calculated_price": "0.700000"
      },
      "infer_details": {"status": 200, "request_id": "02ecd473-..."}
    }
  ]
}
```

`url` is a signed link valid for 24 hours; download the file to keep it.
`calculated_price` is what the run cost.

## Inputs

| Field | Required | What it takes |
| --- | --- | --- |
| `image` | yes | One picture of a person, character or animal: JPEG, PNG, WEBP, BMP, TIFF, GIF, HEIC or HEIF, under 30 MB, each side 300-6000 px, width to height between 0.4 and 2.5 |
| `audio` | yes | The voice or song that drives the video: WAV or MP3, 4 to 300 seconds, under 15 MB |
| `prompt` | no | Directs the scene, the movements and the camera, in Chinese, English, Japanese, Korean, Spanish or Indonesian |

The model does not write or voice the speech: bring the audio, recorded or made
with a text-to-speech model. The result has no watermark.

An audio track that is not WAV or MP3, or is shorter than 4 seconds or longer
than 300 seconds, is refused before the video is started, so it costs nothing.
So is a picture or sound the provider's content check does not accept.

## From an AI assistant

An assistant connected to FlyMy.AI finds the model with `recommend_model`,
quotes it with `get_pricing` and makes the video with `run_model`, passing
`image` and `audio` as public URLs. The result is a link to the video file.

## Pricing

$0.07 per second of video, counted in whole seconds: a 10-second clip costs
$0.70, a 30-second clip $2.10. A refused or failed run costs nothing.
