GET
/
api
/
v1
/
aleph
/
record-info
Get Aleph Video Details
curl --request GET \
  --url https://api.kie.ai/api/v1/aleph/record-info \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
    "paramJson": "{\"prompt\":\"A majestic eagle soaring through mountain clouds at sunset\",\"imageUrl\":\"https://example.com/eagle-image.jpg\"}",
    "response": {
      "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
      "resultVideoUrl": "https://file.com/k/xxxxxxx.mp4",
      "resultImageUrl": "https://file.com/m/xxxxxxxx.png"
    },
    "completeTime": "2023-08-15T14:30:45Z",
    "createTime": "2023-08-15T14:25:00Z",
    "successFlag": 1,
    "errorCode": 0,
    "errorMessage": ""
  }
}

Overview

Retrieve detailed information about your Runway Alpeh video generation tasks, including current status, generation parameters, video URLs, and error details. This endpoint is essential for monitoring task progress and accessing completed videos.
Use this endpoint to poll task status if you’re not using callbacks, or to retrieve detailed information about completed tasks.

Authentication

Authorization
string
required
Bearer token for API authentication. Get your API key from the API Key Management Page.Format: Bearer YOUR_API_KEY

Query Parameters

taskId
string
required
Unique identifier of the Alpeh video generation task. This is the taskId returned when you create a video generation request.Example: ee603959-debb-48d1-98c4-a6d1c717eba6

Code Examples

curl -X GET "https://api.kie.ai/api/v1/aleph/record-info?taskId=ee603959-debb-48d1-98c4-a6d1c717eba6" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Format

Success Response

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
    "paramJson": "{\"prompt\":\"A majestic eagle soaring through mountain clouds at sunset\",\"imageUrl\":\"https://example.com/eagle-image.jpg\"}",
    "response": {
      "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
      "resultVideoUrl": "https://file.com/k/xxxxxxx.mp4",
      "resultImageUrl": "https://file.com/m/xxxxxxxx.png"
    },
    "completeTime": "2023-08-15T14:30:45Z",
    "createTime": "2023-08-15T14:25:00Z",
    "successFlag": 1,
    "errorCode": 0,
    "errorMessage": ""
  }
}
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
    "paramJson": "{\"prompt\":\"A majestic eagle soaring through mountain clouds at sunset\",\"imageUrl\":\"https://example.com/eagle-image.jpg\"}",
    "response": null,
    "completeTime": null,
    "createTime": "2023-08-15T14:25:00Z",
    "successFlag": 0,
    "errorCode": 0,
    "errorMessage": ""
  }
}
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "ee603959-debb-48d1-98c4-a6d1c717eba6",
    "paramJson": "{\"prompt\":\"A majestic eagle soaring through mountain clouds at sunset\",\"imageUrl\":\"https://example.com/eagle-image.jpg\"}",
    "response": null,
    "completeTime": null,
    "createTime": "2023-08-15T14:25:00Z",
    "successFlag": 0,
    "errorCode": 400,
    "errorMessage": "Your prompt was caught by our AI moderator. Please adjust it and try again!"
  }
}

Response Fields

code
integer
HTTP status code
  • 200: Request successful
  • 401: Unauthorized - Invalid API key
  • 404: Task not found
  • 422: Invalid task ID format
  • 500: Server error
msg
string
Human-readable response message
data
object
Task details and status information

Task Status Understanding

Understanding the task status helps you handle various scenarios in your application:
Status: successFlag: 0 and no errorMessageWhat to do: Continue polling, generation is in progressTypical duration: 2-15 minutes depending on complexity and system load

Error Handling

Polling Best Practices

Integration Examples

React Hook for Video Generation

import { useState, useEffect } from 'react';

export function useAlephVideoGeneration(apiKey) {
  const [tasks, setTasks] = useState(new Map());
  
  const generateVideo = async (prompt, imageUrl, options = {}) => {
    // Start generation
    const response = await fetch('https://api.kie.ai/api/v1/aleph/generate', {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${apiKey}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ prompt, imageUrl, ...options })
    });
    
    const result = await response.json();
    const taskId = result.data.taskId;
    
    // Add to tracking
    setTasks(prev => new Map(prev).set(taskId, {
      id: taskId,
      state: 'wait',
      prompt,
      imageUrl,
      startTime: Date.now()
    }));
    
    return taskId;
  };
  
  const checkTask = async (taskId) => {
    const response = await fetch(
      `https://api.kie.ai/api/v1/aleph/record-info?taskId=${taskId}`,
      {
        headers: { 'Authorization': `Bearer ${apiKey}` }
      }
    );
    
    const details = await response.json();
    
    setTasks(prev => {
      const updated = new Map(prev);
      const existing = updated.get(taskId);
      if (existing) {
        updated.set(taskId, {
          ...existing,
          ...details.data,
          lastChecked: Date.now()
        });
      }
      return updated;
    });
    
    return details.data;
  };
  
  // Auto-polling for active tasks
  useEffect(() => {
    const activeTasks = Array.from(tasks.values())
      .filter(task => ['wait', 'queueing', 'generating'].includes(task.state));
    
    if (activeTasks.length === 0) return;
    
    const interval = setInterval(async () => {
      for (const task of activeTasks) {
        try {
          await checkTask(task.id);
        } catch (error) {
          console.error(`Error checking task ${task.id}:`, error);
        }
      }
    }, 30000);
    
    return () => clearInterval(interval);
  }, [tasks]);
  
  return {
    tasks: Array.from(tasks.values()),
    generateVideo,
    checkTask
  };
}

Need Help? Contact our support team at support@kie.ai for assistance with the Runway Alpeh API.

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 Aleph video generation task. This is the taskId returned when creating an Aleph video.

Response

200
application/json

Request successful

The response is of type object.