# Text to Video

API Overview

To simplify the integration of different video generation models, Infron AI provides a unified videos API.

## **API Specification**

{% tabs %}
{% tab title="Curl" %}

<pre class="language-sh"><code class="lang-sh">curl https://video.onerouter.pro/v1/videos/generations \
<strong>    -H "Content-Type: application/json" \
</strong>    -H "Authorization: &#x3C;API_KEY>" \
    -d '{
    "model": "veo3-fast",
    "prompt": "A cute baby sea otter",
    "output_format": "url"
  }'
</code></pre>

{% endtab %}
{% endtabs %}

* `https://video.onerouter.pro/v1/videos/generations` is the base URL
* `<API_KEY>` is your API Key generated in [API page](https://app.onerouter.pro/apiKeys).
* `model` is the model name, such as `veo3-fast`, available model list can be access in [Model page](https://app.onerouter.pro/models).
* `prompt`  is the prompt.
* `output_format` indicate the output format, default value is `url`.
  * `url`

***

## **Example response**

{% tabs %}
{% tab title="200" %}

```json
{
    "data": [
        {
            "url": "https://resource.trustai.sg/video/generated%2Fonerouter_1f529cbd-f675-40a6-89aa-00b16de35cfe.mp4",
            "revised_prompt": ""
        }
    ],
    "created": 1760347750
}
```

{% endtab %}

{% tab title="Error" %}

```json
{
    "error": {
        "message": "error msg.",
        "type": "error type (such as content_policy_violation)",
        "param": "",
        "code": 422
    }
}
```

{% endtab %}
{% endtabs %}

{% embed url="<https://resource.trustai.sg/video/generated%2Fonerouter_914245c2-a89b-4fe3-a2f1-b0233b8ef812.mp4>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infronai.gitbook.io/docs/api-reference/generative-model-api/text-to-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
