GET
/
api
/
v1
/
modify
/
record-info
Get Luma Modify Details
curl --request GET \
  --url https://api.kie.ai/api/v1/modify/record-info \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "774d9a7dd608a0e49293903095e45a4c",
    "paramJson": "{\"callBackUrl\":\"https://example.com/callback\",\"prompt\":\"A futuristic cityscape\",\"videoUrl\":\"https://example.com/video.mp4\",\"waterMark\":\"\"}",
    "completeTime": 1755078480000,
    "response": {
      "taskId": "774d9a7dd608a0e49293903095e45a4c",
      "originUrls": [
        "https://tempfile.aiquickdraw.com/kieai/file/veo3-video/1755074605154fqb0m8ge.mp4"
      ],
      "resultUrls": [
        "https://tempfile.aiquickdraw.com/l/f782018c-6be4-4990-96ba-7231cd5a39e7.mp4"
      ]
    },
    "successFlag": 1,
    "createTime": 1755078171000,
    "errorCode": null,
    "errorMessage": null
  }
}

Status Descriptions

  • 0: GENERATING - Task is currently being processed
  • 1: SUCCESS - Task completed successfully
  • 2: CREATE_TASK_FAILED - Failed to create the task
  • 3: GENERATE_FAILED - Task creation succeeded but generation failed
  • 4: CALLBACK_FAILED - Generation succeeded but callback failed

Important Notes

  • Generated videos are stored temporarily and may expire
  • Check the response object for generated video URLs when status is SUCCESS
  • Use polling with reasonable intervals (recommended: 30 seconds) to avoid rate limiting

Usage Examples

async function pollTaskStatus(taskId, maxWaitTime = 900000) { // 15 minutes
  const startTime = Date.now();
  
  while (Date.now() - startTime < maxWaitTime) {
    try {
      const response = await fetch(`https://api.kie.ai/api/v1/modify/record-info?taskId=${taskId}`, {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        }
      });
      
      const result = await response.json();
      const status = result.data;
      
      console.log(`Task ${taskId} status: ${status.successFlag}`);
      
      if (status.successFlag === 1) {
        // Success
        console.log('Video generation completed!');
        console.log('Result URLs:', status.response.resultUrls);
        return status;
      } else if (status.successFlag === 2 || status.successFlag === 3) {
        // Failed
        throw new Error(`Generation failed: ${status.errorMessage || 'Unknown error'}`);
      }
      
      // Still processing, wait before next check
      await new Promise(resolve => setTimeout(resolve, 30000)); // 30 seconds
      
    } catch (error) {
      console.error('Error checking status:', error);
      break;
    }
  }
  
  throw new Error('Polling timeout');
}

Response Field Details

successFlag
integer
required
Current status of the video generation task:
ValueStatusDescription
0GENERATINGTask is being processed
1SUCCESSCompleted successfully
2CREATE_TASK_FAILEDFailed to create task
3GENERATE_FAILEDGeneration failed
4CALLBACK_FAILEDCallback delivery failed
response
object
Generation results (only present when successFlag = 1):
paramJson
string
Original request parameters in JSON string format, useful for debugging and audit trails
createTime
integer
Task creation timestamp (Unix milliseconds)
completeTime
integer
Task completion timestamp (Unix milliseconds), only present when task is finished
errorCode
integer
Error code when task fails (successFlag = 2 or 3)
errorMessage
string
Detailed error message when task fails

Authorizations

Authorization
string
header
required

All APIs require authentication via Bearer Token.

Get API Key:

  1. Visit API Key Management Page to get your API Key

Usage: Add to request header: Authorization: Bearer YOUR_API_KEY

Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately in the management page

Query Parameters

taskId
string
required

Unique identifier of the video generation task

Response

200
application/json

Request successful

The response is of type object.