POST
/
videos
/
create
JavaScript
import Weights from '@weights-ai/sdk';

const client = new Weights({
  bearerToken: 'My Bearer Token',
});

const video = await client.videos.create({
  inputImageUrl: 'https://storage.example.com/input/river.jpg',
  prompt: 'A flowing river with leaves floating downstream',
});

console.log(video.id);
{
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Returns the ID of the created video generation job.

The response is of type object.