Skip to main content
POST
/
api
/
v1
/
client
/
videos
/
replace
cURL
curl --request POST \
  --url https://api.deapi.ai/api/v1/client/videos/replace \
  --header 'Accept: <accept>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form video='@example-file' \
  --form ref_image='@example-file' \
  --form 'model=<string>' \
  --form 'prompt=<string>' \
  --form width=123 \
  --form height=123 \
  --form steps=4 \
  --form seed=-1 \
  --form 'webhook_url=<string>'
{
  "data": {
    "request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
  }
}
Prerequisite: To ensure a successful request, you must first consult the Model Selection endpoint to identify a valid model slug, check specific limits and features.

Authorizations

Authorization
string
header
required

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

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Body

multipart/form-data

Video replace parameters

video
file
required

Input video file. Supported formats: MP4, MPEG, QuickTime, AVI, WMV, OGG.

ref_image
file
required

Reference character image. Supported formats: JPG, JPEG, PNG, GIF, BMP, WebP. Maximum file size: 10 MB.

model
string
required

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

prompt
string | null

Optional text prompt to guide the replacement

width
integer | null

Output video width in pixels. If omitted, uses input video width. Must be provided together with height.

height
integer | null

Output video height in pixels. If omitted, uses input video height. Must be provided together with width.

steps
integer

Number of inference steps (default: 4)

Example:

4

seed
integer

Random seed for generation (default: -1 for random)

Example:

-1

webhook_url
string<uri> | null

Optional HTTPS URL to receive webhook notifications for job status changes. Must be HTTPS. Max 2048 characters.

Maximum string length: 2048

Response

ID of the inference request.

data
object

Information from success endpoint