Model APIs / Video

# Video

Video generation is asynchronous: create a job, poll its status, then download the MP4.

`POST` `/v1/videos` `inference:invoke`[Browse video models →](https://yelno.ai/catalog?type=videos)

`GET` `/v1/videos/{id}` `inference:invoke`

`GET` `/v1/videos/{id}/content` `inference:invoke`

## Create a job

| Field | Required | Notes |
| --- | --- | --- |
| model | required | A video model's id. |
| prompt | required | What to generate. |
| duration · aspect_ratio · resolution | optional | Shape of the video, applied as the model defines them. |
| generate_audio · seed | optional | Generation settings, when the model supports them. |
| input_references | optional | Reference inputs for the video. |

The answer is `202` with the job: `id` (`vid_…`), `object: "video"`, `status: "pending"`, `model`, `created_at` and `yelno`.

Request

```
# 1 · create the job → 202 {"id": "vid_…", "status": "pending", …}
curl https://yelno.ai/v1/videos \
  -H "Authorization: Bearer $YELNO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "MODEL", "prompt": "A paper boat drifting down a rainy street", "aspect_ratio": "16:9"}'

# 2 · poll until status is completed, failed, cancelled or expired
curl https://yelno.ai/v1/videos/vid_… \
  -H "Authorization: Bearer $YELNO_API_KEY"

# 3 · download the video (video/mp4)
curl https://yelno.ai/v1/videos/vid_…/content \
  -H "Authorization: Bearer $YELNO_API_KEY" \
  --output boat.mp4
```

## Poll the job

`GET /v1/videos/{id}` refreshes the job from the provider and returns it; a background worker also refreshes pending jobs every minute, so a job you stop polling still completes.

| status | Meaning |
| --- | --- |
| pending | Accepted; not started. |
| in_progress | Generating. |
| completed | Done: `content_url` is set. |
| failed | Stopped with an error ({type, message}), in the platform's words. |
| cancelled | Cancelled. |
| expired | The result is no longer available. |

responses

```
# POST /v1/videos → 202
{ "id": "vid_…", "object": "video", "status": "pending", "model": "…", "created_at": …, "yelno": { … } }

# GET /v1/videos/{id} → 200
{
  "id": "vid_…",
  "status": "completed",
  "model": "…",
  "created_at": …,
  "completed_at": …,
  "content_url": "/v1/videos/vid_…/content",
  "usage": { … },
  "yelno": { … }
}
```

## Download

`GET /v1/videos/{id}/content` streams the video bytes as `video/mp4`. The provider's job id, polling URL and storage URLs are never returned, and only the organization that created a job can read it — anyone else gets `404`.

## Notes

Video continuation (`previous_job_id`) and `callback_url` webhooks are not offered; both are refused with `400` `code: "unsupported_parameter"`. A failed job's provider error is rewritten in the platform's words.

Pricing. You pay the model's listed final price — shown on its catalog page — and nothing on top. A model without a fixed unit price is billed per request: its exact charge comes back with every response in `yelno.cost`. A hold is placed before dispatch and released down to the final charge; when the charge is reported after the response, the request settles once — it is never charged a guess.

Source: https://yelno.ai/docs/videos
