---
title: "OpenAI video generation"
method: POST
path: "/v1/videos"
---

# OpenAI video generation

`POST /v1/videos`

## Request

- Base URL: `https://api.agentlab.cresclab.com`
- URL: `https://api.agentlab.cresclab.com/v1/videos`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/cresclab/apis/agent-lab-ai-gateway/docs/v1/videos/post.ts> (a function with typed inputs; its response is checked against the schema)

Starts a video job on a video model, relayed as sent apart from model. The job keeps its reservation until a read of it sees it complete, which settles it at the seconds the provider reports.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `model` string, required: A model of this kind enabled for the workspace; auto is refused.
  - `prompt` string, required
  - `seconds` unknown
  - `size` string
  - `input_reference` object: The reference image as an https URL or a data:image URL. A file_id is refused: it would name a file in the provider account every workspace shares.
    - `image_url` string, required

## Response `200`

The video job.

- object

## Other responses

- `400`: Refused request. See the error catalog.
- `401`: Missing or not accepted key.
- `403`: Not allowed for this key or workspace.
- `429`: Rate limited or out of allowance. Retry-After and X-Should-Retry say whether to retry.
- `502`: The provider failed to answer.
- `503`: Gateway unavailable or settlement pending.

---

[API](https://skmtc.dev/cresclab/apis/agent-lab-ai-gateway.md) - [All operations](https://skmtc.dev/cresclab/apis/agent-lab-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/cresclab/apis/agent-lab-ai-gateway/revisions/5dc08011cbe9?raw)
