Text-to-Video

Text-to-Video generates short video clips directly from text prompts with motion and stylization. The API returns a video URL and a task ID to track processing.

post

Endpoint for requesting text2video 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
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/txt2video
POST /api/v1/client/txt2video HTTP/1.1
Host: api.deapi.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: application/json
Content-Type: multipart/form-data
Content-Length: 209

{
  "prompt": "A beautiful sunset over mountains",
  "negative_prompt": "blur, darkness, noise",
  "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 text2video 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 txt2video inference.

application/json
post
/api/v1/client/txt2video/price-calculation
POST /api/v1/client/txt2video/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