# Omnilottie

> Convert your assets into lottie using Omnilottie.


## Overview

- **Endpoint**: `https://fal.run/fal-ai/omnilottie`
- **Model ID**: `fal-ai/omnilottie`
- **Category**: json
- **Kind**: inference
**Tags**: lottie



## Pricing

- **Price**: $0.05 per images

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 description of the Lottie animation to generate.
  - Examples: "A red ball bouncing up and down"

- **`max_tokens`** (`integer`, _optional_):
  Maximum number of Lottie tokens to generate. Default value: `4096`
  - Default: `4096`
  - Range: `256` to `8192`

- **`temperature`** (`float`, _optional_):
  Sampling temperature for generation. Default value: `0.9`
  - Default: `0.9`
  - Range: `0` to `2`

- **`top_p`** (`float`, _optional_):
  Nucleus sampling probability threshold. Default value: `0.25`
  - Default: `0.25`
  - Range: `0` to `1`

- **`top_k`** (`integer`, _optional_):
  Top-k sampling parameter. Default value: `5`
  - Default: `5`
  - Range: `1` to `100`



**Required Parameters Example**:

```json
{
  "prompt": "A red ball bouncing up and down"
}
```

**Full Example**:

```json
{
  "prompt": "A red ball bouncing up and down",
  "max_tokens": 4096,
  "temperature": 0.9,
  "top_p": 0.25,
  "top_k": 5
}
```


### Output Schema

The API returns the following output format:

- **`lottie_file`** (`File`, _required_):
  The generated Lottie animation as a JSON file.



**Example Response**:

```json
{
  "lottie_file": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  }
}
```


## Usage Examples

### cURL

```bash
curl --request POST \
  --url https://fal.run/fal-ai/omnilottie \
  --header "Authorization: Key $FAL_KEY" \
  --header "Content-Type: application/json" \
  --data '{
     "prompt": "A red ball bouncing up and down"
   }'
```

### 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/omnilottie",
    arguments={
        "prompt": "A red ball bouncing up and down"
    },
    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/omnilottie", {
  input: {
    prompt: "A red ball bouncing up and down"
  },
  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/omnilottie)
- [API Documentation](https://fal.ai/models/fal-ai/omnilottie/api)
- [OpenAPI Schema](https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=fal-ai/omnilottie)

### fal.ai Platform

- [Platform Documentation](https://fal.ai/docs/documentation)
- [Python Client](https://fal.ai/docs/api-reference/client-libraries/python)
- [JavaScript Client](https://fal.ai/docs/api-reference/client-libraries/javascript)

### Other agent-readable surfaces

This file covers one model. To find anything else:

- [Platform overview](https://fal.ai/llms.txt): Entry points and representative endpoint IDs
- [Documentation index](https://fal.ai/docs/llms.txt): Every documentation page
- [Full documentation text](https://fal.ai/docs/llms-full.txt): The whole documentation inlined
- Any other model: `https://fal.ai/models/<endpoint-id>/llms.txt`
