Image-to-Video

Image-to-Video transforms static images into short video clips with motion and stylization. The API returns a video URL and a task ID to track processing.

post

Endpoint for requesting image2video inference

Authorizations
Header parameters
Acceptstring · enumRequiredPossible values:
Body
promptstringRequired

The main prompt for video generation

Example: A beautiful sunset over mountains
negative_promptstring | nullableOptional

Elements to avoid in the generated video

Example: blur, darkness, noise
first_frame_imagestring · binaryRequired

Image for the first frame of video

last_frame_imagestring · binary | nullableOptional

Image for the last frame of video

widthintegerRequired

Width of the generated video in pixels

Example: 512
heightintegerRequired

Height of the generated video in pixels

Example: 512
guidancenumberRequired

Guidance scale for the generation

Example: 7.5
stepsintegerRequired

Number of inference steps

Example: 20
framesintegerRequired

Number of video frames to generate

Example: 20
fpsintegerOptional

FPS of generated video

Example: 30
seedintegerRequired

Random seed for generation

Example: 42
modelstringRequired

The model to use for video generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example: Ltxv_13B_0_9_8_Distilled_FP8
Responses
200

ID of the inference request.

application/json
post
/api/v1/client/img2video
POST /api/v1/client/img2video HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: multipart/form-data
Content-Length: 266

{
  "prompt": "A beautiful sunset over mountains",
  "negative_prompt": "blur, darkness, noise",
  "first_frame_image": "binary",
  "last_frame_image": "binary",
  "width": 512,
  "height": 512,
  "guidance": 7.5,
  "steps": 20,
  "frames": 20,
  "fps": 30,
  "seed": 42,
  "model": "Ltxv_13B_0_9_8_Distilled_FP8"
}
{
  "data": {
    "request_id": 1
  }
}
post

Endpoint for calculating price for image2video inference

Authorizations
Header parameters
Acceptstring · enumRequiredPossible values:
Body
widthintegerRequired

Width of the generated video in pixels

Example: 512
heightintegerRequired

Height of the generated video in pixels

Example: 512
stepsintegerRequired

Number of inference steps

Example: 20
framesintegerRequired

Number of video frames to generate

Example: 20
fpsintegerOptional

FPS of generated video

Example: 30
modelstringRequired

The model to use for video generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example: Ltxv_13B_0_9_8_Distilled_FP8
Responses
200

Calculated price for img2video inference.

application/json
post
/api/v1/client/img2video/price-calculation
POST /api/v1/client/img2video/price-calculation HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: multipart/form-data
Content-Length: 97

{
  "width": 512,
  "height": 512,
  "steps": 20,
  "frames": 20,
  "fps": 30,
  "model": "Ltxv_13B_0_9_8_Distilled_FP8"
}
{
  "data": {
    "price": 0.15
  }
}

Last updated