Workflow
Image to Video
Turn any real-estate photo into a cinematic 8-second walkthrough video. The camera smoothly zooms and pans through the scene with warm, golden-hour lighting.
How it works
- Upload assets —
POST /v1/assets/uploadwith each image file. Returns asha256:...hash. - Run the workflow —
POST /v1/workflows/image-to-video/runwith asset hashes and parameters. Returns ajobId. - Get results — Poll
GET /v1/jobs/:jobIdor stream viaGET /v1/jobs/:jobId/events(SSE). - Download outputs —
GET /v1/assets/:hash/rawto download each output file.
Code examples
import { bkbnlab } from '@bkbnlab/api'
import { readFile } from 'node:fs/promises'
// export BKBNLAB_API_KEY=sk-...
const result = await bkbnlab.subscribe('image-to-video', {
input: {
image: await readFile('image.jpg'),
},
})
// Download output video
await bkbnlab.download(result.outputs.video, 'result.mp4')Endpoint
POST
/v1/workflows/image-to-video/run Requires X-API-Key header. See Authentication.
Inputs
| Field | Type | Required | Description |
|---|---|---|---|
image | asset:image | Source image to animate |
Outputs
Each output is a sha256:... asset hash. Download via GET /v1/assets/:hash/raw.
| Field | Type | Description |
|---|---|---|
video | asset:video | Cinematic walkthrough video |
Request
{
"inputs": {
"image": "sha256:<hash_image>"
}
}Response — queued
{
"jobId": "job_abc123",
"status": "queued"
}Response — completed
{
"jobId": "job_abc123",
"status": "completed",
"outputs": {
"video": "sha256:..."
}
}Download an output
curl -o result.mp4 \
-H "X-API-Key: $BKBNLAB_API_KEY" \
https://api.bkbnlab.ai/v1/assets/$VIDEO_HASH/raw