Create video
Start a video generation job and return it right away; poll GET /v1/videos/{id} until status is completed, then download it from GET /v1/videos/{id}/content. The price is fixed when the job is created, from seconds and size. Cancelled and failed jobs are not charged, except a job a provider's content policy blocks where that provider charges for it. seconds takes the values in the model's limits.video.seconds; size takes the sizes its pricing lists. A repeated Idempotency-Key returns the job it first created.
ApiKeyAuthAuthorization<token>Idempotency-Key*stringAny unique string per job, such as a UUID. Retrying with the same key returns the same job instead of starting a second one.
length <= 255application/json- body
Other top-level fields go to the model unchanged; they cannot set the duration, size or media, which have the fields below.
media?array<>Frames and references for image-to-video and reference-to-video models.
model*stringA video model ID from GET /v1/models
prompt*stringseconds?integerThe video length; one of the model's limits.video.seconds, the first of them by default.
size?stringWidth by height, such as 848x480; one of the sizes in the model's pricing.
"1280x720"[key: string]?anyThe created job, or the job this Idempotency-Key created before
application/json- response
created_at*stringdate-timeerror?Why the job failed
finished_at?stringdate-timeid*stringmodel*stringobject*"video""video"progress*integerPercent done, as far as the provider reports it
0 <= value <= 100result_available*booleanWhether GET /v1/videos/{id}/content can download the video now
result_url_expires_at?stringWhen the download stops being available
date-timeseconds*integersize*stringstatus*stringcreating until the provider accepts the job; completed, failed and cancelled are final.
"creating""queued""in_progress""completed""failed""cancelled"updated_at*stringdate-timecurl -X POST 'https://api.ohmygpt.com/v1/videos' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "prompt": "string"}'{ "created_at": "2019-08-24T14:15:22Z", "error": { "code": "string", "message": "string" }, "finished_at": "2019-08-24T14:15:22Z", "id": "string", "model": "string", "object": "video", "progress": 0, "result_available": true, "result_url_expires_at": "2019-08-24T14:15:22Z", "seconds": 0, "size": "string", "status": "creating", "updated_at": "2019-08-24T14:15:22Z"}Cancel video POST
Cancel a job that is still queued; a cancelled job is not charged. Models whose provider cannot cancel answer `501`, and a job already being generated answers `409`.
Delete video DELETE
Clear the job's stored result once its download has expired; until then this answers `409`. A job without a result succeeds right away. The job stays in your list.