# Hunyuan Motion [1B]

> Generate 3D human motions via text-to-generation interface of Hunyuan Motion!


## Overview

- **Endpoint**: `https://fal.run/fal-ai/hunyuan-motion`
- **Model ID**: `fal-ai/hunyuan-motion`
- **Category**: text-to-3d
- **Kind**: inference
**Tags**: text-to-3d, motion, 



## Pricing

- **Price**: $0.08 per generations

For more details, see [fal.ai pricing](https://fal.ai/pricing).

## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:


- **`prompt`** (`string`, _required_):
  Text prompt describing the motion to generate.
  - Examples: "A person is running then takes a big leap.", "Someone waves hello with their right hand.", "A dancer performs a spinning pirouette."

- **`seed`** (`integer`, _optional_):
  Random seed for reproducible generation.
  - Examples: 42, 12345

- **`duration`** (`float`, _optional_):
  Motion duration in seconds (0.5-12.0). Default value: `5`
  - Default: `5`
  - Range: `0.5` to `12`
  - Examples: 3, 5, 10

- **`guidance_scale`** (`float`, _optional_):
  Classifier-free guidance scale. Higher = more faithful to prompt. Default value: `5`
  - Default: `5`
  - Range: `1` to `10`
  - Examples: 3, 5, 7.5

- **`output_format`** (`OutputFormatEnum`, _optional_):
  Output format: 'fbx' for animation files, 'dict' for raw JSON. Default value: `"fbx"`
  - Default: `"fbx"`
  - Options: `"fbx"`, `"dict"`



**Required Parameters Example**:

```json
{
  "prompt": "A person is running then takes a big leap."
}
```

**Full Example**:

```json
{
  "prompt": "A person is running then takes a big leap.",
  "seed": 42,
  "duration": 3,
  "guidance_scale": 3,
  "output_format": "fbx"
}
```


### Output Schema

The API returns the following output format:

- **`fbx_file`** (`File`, _optional_):
  Generated FBX animation file.
  - Examples: {"url":"https://v3b.fal.media/files/b/0a885f1e/JytCv1tbq28iJmvXLrpbQ_20251230_112744828_2a84e993_000.fbx"}

- **`motion_json`** (`File`, _optional_):
  Generated motion data as JSON.

- **`seed`** (`integer`, _required_):
  Seed used for generation.
  - Examples: 42



**Example Response**:

```json
{
  "fbx_file": {
    "url": "https://v3b.fal.media/files/b/0a885f1e/JytCv1tbq28iJmvXLrpbQ_20251230_112744828_2a84e993_000.fbx"
  },
  "seed": 42
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/hunyuan-motion \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A person is running then takes a big leap."
   }'
```

### Python

Ensure you have the Python client installed:

```bash
pip install fal-client
```

Then use the API client to make requests:

```python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/hunyuan-motion",
    arguments={
        "prompt": "A person is running then takes a big leap."
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

### JavaScript

Ensure you have the JavaScript client installed:

```bash
npm install --save @fal-ai/client
```

Then use the API client to make requests:

```javascript
import { fal } from "@fal-ai/client";

const result = await fal.subscribe("fal-ai/hunyuan-motion", {
  input: {
    prompt: "A person is running then takes a big leap."
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});
console.log(result.data);
console.log(result.requestId);
```


## Additional Resources

### Documentation

- [Model Playground](https://fal.ai/models/fal-ai/hunyuan-motion)
- [API Documentation](https://fal.ai/models/fal-ai/hunyuan-motion/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/hunyuan-motion)

### fal.ai Platform

- [Platform Documentation](https://docs.fal.ai)
- [Python Client](https://docs.fal.ai/clients/python)
- [JavaScript Client](https://docs.fal.ai/clients/javascript)
