Lucy Edit Fast API Documentation
Check Status - Request Code
POST https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result Content-Type: application/json Cache-Control: no-cache Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY { "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" } import requests url = "https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result" headers = { "Content-Type": "application/json", "Cache-Control": "no-cache", "Ocp-Apim-Subscription-Key": "YOUR_SUBSCRIPTION_KEY" } data = { "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" } response = requests.post(url, json=data, headers=headers) print(response.json()) const url = 'https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result'; const data = { request_id: 'd8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1' }; fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Cache-Control': 'no-cache', 'Ocp-Apim-Subscription-Key': 'YOUR_SUBSCRIPTION_KEY' }, body: JSON.stringify(data) }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); curl -X POST "https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result" \ -H "Content-Type: application/json" \ -H "Cache-Control: no-cache" \ -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \ --data-raw '{ "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" }' import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; public class ApiExample { public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newBuilder() .connectTimeout(Duration.ofSeconds(10)) .build(); String json = """ { "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" } """; HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result")) .header("Content-Type", "application/json") .header("Cache-Control", "no-cache") .header("Ocp-Apim-Subscription-Key", "YOUR_SUBSCRIPTION_KEY") .POST(HttpRequest.BodyPublishers.ofString(json)) .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } <?php $url = 'https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result'; $data = json_encode([ 'request_id' => 'd8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1' ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Cache-Control: no-cache', 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' ]); $response = curl_exec($ch); curl_close($ch); echo $response; ?> Output
Successful API response:
{ "status": "COMPLETED", "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1", "video_url": "https://storage.pixazo.ai/edited-videos/..." } Request Body - Check Status
Parameters for /decart-lucy-edit-video-fast-request-result:
| Parameter | Required | Type | Description |
|---|---|---|---|
| request_id | Yes | string | The unique identifier returned from the initial request. Used to poll for the editing status. |
Example Request - Check Status
JSON
{ "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" } Response - Check Status
JSON
{ "status": "COMPLETED", "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1", "video_url": "https://storage.pixazo.ai/edited-videos/d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1.mp4", "duration_seconds": 8.3, "original_video_duration": 15.2, "metadata": { "edited_elements": [ "coat" ], "prompt_enhanced": true } } Request Headers
| Header | Description |
|---|---|
| Content-Type | Must be set to application/json |
| Cache-Control | Must be set to no-cache |
| Ocp-Apim-Subscription-Key | Your API subscription key for authentication |
Response Handling
The Decart Lucy Edit video fast returns specific HTTP status codes and response bodies to indicate the success or failure of a request. Developers should implement error handling in their applications to manage these responses effectively.
Common Status Codes and Responses
| Status Code | Description | Response Body |
|---|---|---|
| 200 | Success - The request was successfully processed. | { "success": true, ... } |
| 400 | Bad Request - The request contains invalid parameters or missing fields. | { "error": "Invalid request parameters" } |
| 401 | Unauthorized - The provided subscription key is missing or invalid. | { "error": "Invalid or missing authentication" } |
| 403 | Forbidden - The subscription does not have access to this API or action. | { "error": "Access denied for this operation" } |
| 404 | Not Found - The requested resource or endpoint could not be found. | { "error": "Endpoint not found" } |
| 429 | Too Many Requests - The request rate limit has been exceeded. | { "error": "Rate limit exceeded, please retry later" } |
| 500 | Internal Server Error - An unexpected error occurred on the server. | { "error": "An unexpected error occurred, please try again later" } |
Example Error Response
{ "error": "Invalid parameters" } Retrieving Results
After submitting your request, use this endpoint to check status and retrieve results.
Endpoint
POST https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result
Request Body
{ "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" } Example Polling Request
curl -X POST "https://gateway.pixazo.ai/decart-lucy-edit-video-fast-142/v1/decart-lucy-edit-video-fast-request-result" \ -H "Content-Type: application/json" \ -H "Cache-Control: no-cache" \ -H "Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY" \ --data-raw '{ "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1" }' Response States
- IN_QUEUE - Request has been received and is waiting in the processing queue.
- IN_PROGRESS - The video is being edited. This stage typically lasts a few seconds to under 10 seconds.
- COMPLETED - The video edit has completed successfully. The result URL is provided in the
video_urlfield. - FAILED - The request failed due to invalid input, unsupported video format, or server error. Check the
error_messagefield for details.
Example Success Response
{ "status": "COMPLETED", "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1", "video_url": "https://storage.pixazo.ai/edited-videos/d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1.mp4", "duration_seconds": 8.3, "original_video_duration": 15.2, "metadata": { "edited_elements": ["coat"], "prompt_enhanced": true } } Example In-Progress Response
{ "status": "IN_PROGRESS", "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1", "progress_percent": 67, "estimated_remaining_seconds": 3 } Example Failed Response
{ "status": "FAILED", "request_id": "d8b3e1f2-4c5a-4e1b-9a6d-76f2e4c8b9d1", "error_message": "Invalid video URL: Access denied or unreachable", "error_code": "INVALID_VIDEO_URL" } Lucy Edit Fast API Pricing
| Resolution | Price (USD) |
|---|---|
| All Resolution | $0.2 |
