POST
/
v1
/
video
/
generations
Keyframe Video Generation
curl --request POST \
  --url https://api.example.com/v1/video/generations

Keyframe Video Generation

Generate video using first and last frame keyframes with the Doubao seedance model.

Endpoint

POST /v1/video/generations

Authentication

All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
modelstringYesModel ID, e.g., doubao-seedance-1-0-lite-i2v-250428
contentarrayYesArray of content objects with text, first frame, and last frame images

Content Object

FieldTypeDescription
typestringContent type: text or image_url
textstringText prompt with optional parameters like --rs 720p --dur 5
image_urlobjectImage URL object with url field
rolestringImage role: first_frame or last_frame

Request Example

curl -X POST "https://www.anyfast.ai/v1/video/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-1-0-lite-i2v-250428",
    "content": [
      {
        "type": "text",
        "text": "A smooth transition between scenes --rs 720p --dur 5"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://example.com/first-frame.png"
        },
        "role": "first_frame"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://example.com/last-frame.png"
        },
        "role": "last_frame"
      }
    ]
  }'

Response Example

{
  "id": "doubao_task_123456",
  "status": "submitted",
  "created_at": "2024-01-01T00:00:00Z"
}

Response Fields

FieldTypeDescription
idstringTask ID for querying status
statusstringTask status
created_atstringCreation timestamp