Get Kling text-to-video task status
GET
/kling/v1/videos/text2video/{task_id}
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.mirapi.ai/kling/v1/videos/text2video/task-abc123"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.mirapi.ai/kling/v1/videos/text2video/task-abc123';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.mirapi.ai/kling/v1/videos/text2video/task-abc123 \ --header 'Authorization: Bearer <token>'Returns the status and result of a Kling text-to-video task.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”task_id
required
string
Task ID
Example
task-abc123Responses
Section titled “Responses”Task status returned
Media typeapplication/json
Video task status response
object
task_id
Task ID
string
status
Task status
string
url
Video URL (on success)
string
format
Video format
string
metadata
Video task metadata
object
duration
Actual duration of the generated video
number
fps
Actual frame rate
integer
width
Actual width
integer
height
Actual height
integer
seed
Random seed used
integer
error
Video task error
object
code
Error code
integer
message
Error message
string
Example
{ "task_id": "abcd1234efgh", "status": "queued", "url": "https://example.com/video.mp4", "format": "mp4", "metadata": { "duration": 5, "fps": 30, "width": 1280, "height": 720, "seed": 20231234 }}Task not found
Media typeapplication/json
object
error
object
message
Error message
string
type
Error type
string
param
Related parameter
string
code
Error code
string
Examplegenerated
{ "error": { "message": "example", "type": "example", "param": "example", "code": "example" }}