Framepack is an efficient Image-to-video model that autoregressively generates videos.
Framepack is an efficient Image-to-video model that autoregressively generates videos.
Average response time < 200ms
99.9% uptime guarantee
End-to-end encrypted
You're viewing documentation for version v1 of the API. Please ensure you're using the correct endpoint in your requests.
All API calls must be authenticated using your API key. Include your API key in the
Authorization
header as a Bearer token.
curl -X POST "https://api.lannetech.com/v1/generate-video" \
-H "Authorization: Bearer 0b330639d131c6b7c0f0b553ff6857d16edc0ebcd6ee571d34eb0a101f64005b" \
-H "Content-Type: application/json"
Keep your API key secure and never share it in public repositories or client-side code. You can regenerate your API key from the dashboard if needed.
All API requests should be made to this base URL followed by the endpoint path.
All API requests must use HTTPS. Requests over plain HTTP will fail.
Send data as JSON in the request body with Content-Type: application/json.
Send the following parameters in the request body as JSON.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model identifier to use for this request |
prompt | string | Yes | Text description for generation |
negative_prompt | string | Yes | Parameter negative_prompt |
image_url | string | Yes | URL of the image to analyze |
aspect_ratio | string | Yes | Parameter aspect_ratio |
resolution | string | Yes | Parameter resolution |
cfg_scale | integer | Yes | Parameter cfg_scale |
guidance_scale | integer | Yes | Parameter guidance_scale |
num_frames | integer | Yes | Parameter num_frames |
enable_safety_checker | boolean | Yes | Parameter enable_safety_checker |
{
"model": "framepack",
"prompt": "A mesmerising video of a deep sea jellyfish moving through an inky-black ocean. The jellyfish glows softly with an amber bioluminescence. The overall scene is lifelike.",
"negative_prompt": "Ugly, blurry distorted, bad quality",
"image_url": "https:\/\/storage.googleapis.com\/falserverless\/framepack\/framepack.jpg",
"aspect_ratio": "16:9",
"resolution": "720p",
"cfg_scale": 1,
"guidance_scale": 10,
"num_frames": 180,
"enable_safety_checker": true
}
This API uses an asynchronous generation process. This means the generation happens in two steps:
First, make a POST request with your generation parameters. You'll receive a request_id in response.
// Response from initial request
{
"text": "your prompt",
"model": "riffusion",
"request_id": "11aeb1db-1860-4550-b221-7cbfa1169732",
"status": "pending",
"created": 1745023903
}
Then, use the request_id to check the generation status until it's complete.
// Response from status check
{
"model": "riffusion",
"request_id": "11aeb1db-1860-4550-b221-7cbfa1169732",
"status": "success",
"audio_url": "https://storage.googleapis.com/...",
"created": 1745023903
}
To check the status of your generation, make a POST request to the same endpoint with only the request_id:
curl -X POST "https://api.lannetech.com/v1/generate-video" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "11aeb1db-1860-4550-b221-7cbfa1169732"
}'
For audio models like Riffusion, you can use the wait_for_result parameter to automatically wait until the generation is complete:
curl -X POST "https://api.lannetech.com/v1/generate-video" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A calm and relaxing piano track with soft melodies",
"model": "riffusion",
"wait_for_result": true
}'
wait_for_result is set to true, the API waits up to 60 seconds for the generation to complete{
"model": "riffusion",
"request_id": "c9d0596caafdef1a72fa596b464eb1b7",
"status": "complete",
"audio_url": "https://kieaifiles.erweima.ai/ZmE3ZjEyNWUtNzEwMS00YjFiLTlmYWQtMzkzMmMyYzZiMDU4.mp3",
"data": {
"task_id": "c9d0596caafdef1a72fa596b464eb1b7",
"status": "complete",
"callback_type": "first",
"data": [
{
"id": "8551****662c",
"audio_url": "https://kieaifiles.erweima.ai/ZmE3ZjEyNWUtNzEwMS00YjFiLTlmYWQtMzkzMmMyYzZiMDU4.mp3",
"stream_audio_url": "https://example.cn/****",
"prompt": "A calm and relaxing piano track with soft melodies",
"model_name": "chirp-v3-5",
"duration": 198.44
}
],
"received_at": "2025-01-01 00:00:00"
},
"created": 1746291951
}
| Status | Description |
|---|---|
pending |
The generation is still in progress |
success |
Generation completed successfully, result is available |
complete |
Generation completed successfully (equivalent to success), result is available |
failed |
Generation failed, check error message |
request_id if you need to check the status laterBelow are examples showing how to use this API in different programming languages.
curl -X POST "https://api.lannetech.com/v1/generate-video" \
-H "Authorization: Bearer 0b330639d131c6b7c0f0b553ff6857d16edc0ebcd6ee571d34eb0a101f64005b" \
-H "Content-Type: application/json" \
-d '{
"model": "framepack",
"prompt": "A mesmerising video of a deep sea jellyfish moving through an inky-black ocean. The jellyfish glows softly with an amber bioluminescence. The overall scene is lifelike.",
"negative_prompt": "Ugly, blurry distorted, bad quality",
"image_url": "https:\/\/storage.googleapis.com\/falserverless\/framepack\/framepack.jpg",
"aspect_ratio": "16:9",
"resolution": "720p",
"cfg_scale": 1,
"guidance_scale": 10,
"num_frames": 180,
"enable_safety_checker": true
}'
The API returns responses in JSON format. Below is an example of a successful response.
{
"video": {
"url": "https:\/\/storage.googleapis.com\/falserverless\/framepack\/TfJPbwm6_D60dcWEv9LVX_output_video.mp4"
}
}
video - Response fieldThe API uses standard HTTP status codes to indicate the success or failure of requests.
| Code | Status | Description |
|---|---|---|
| 200 | OK | The request was successful. The response contains the requested data. |
| 400 | Bad Request | The request was invalid. Check the request parameters and format. |
| 401 | Unauthorized | Authentication failed. Check your API key. |
| 402 | Payment Required | Insufficient credits for this operation. Please add more credits to your account. |
| 429 | Too Many Requests | Rate limit exceeded. Slow down your request rate. |
| 500 | Server Error | An error occurred on the server. Try again later or contact support if the issue persists. |
| 504 | Gateway Timeout | The operation took too long to complete. Try again with simplified parameters. |
To ensure fair usage and service stability, API requests are subject to rate limiting.
API responses include headers to help you track your rate limit usage:
X-RateLimit-Limit: Maximum requests allowed in the current periodX-RateLimit-Remaining: Number of requests remaining in the current periodX-RateLimit-Reset: Time (in seconds) until the limit resetsIf you have questions or run into issues, our developer support team is ready to help.