cURL
curl --request GET \
--url https://api.haiper.ai/v1/creation/{creation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.haiper.ai/v1/creation/{creation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.haiper.ai/v1/creation/{creation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.haiper.ai/v1/creation/{creation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.haiper.ai/v1/creation/{creation_id}"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://api.haiper.ai/v1/creation/{creation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.haiper.ai/v1/creation/{creation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"value": {
"creation_id": "<string>",
"user_id": "<string>",
"username": "<string>",
"avatar": "<string>",
"type": "<string>",
"input_type": "<string>",
"prompt": "<string>",
"negative_prompt": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"status": "<string>",
"video_url": "<string>",
"thumbnail_url": "<string>",
"settings": {
"fps": 123,
"width": 123,
"height": 123
},
"commits": {
"like_count": 123,
"is_like": true,
"collects_count": 123,
"is_collect": true
},
"output_type": "<string>",
"outputs": [
{
"id": "<string>",
"media_url": "<string>",
"thumbnail_url": "<string>"
}
]
}
}{
"message": "<string>",
"code": 123,
"details": "<array>"
}General Functions
Get Creation Detail
You need to call the Get Creation Status API to check the status of the creation first. If the status is ‘succeed’, you can then call this API to retrieve the details of the creation.
GET
/
v1
/
creation
/
{creation_id}
cURL
curl --request GET \
--url https://api.haiper.ai/v1/creation/{creation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.haiper.ai/v1/creation/{creation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.haiper.ai/v1/creation/{creation_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.haiper.ai/v1/creation/{creation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.haiper.ai/v1/creation/{creation_id}"
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(string(body))
}HttpResponse<String> response = Unirest.get("https://api.haiper.ai/v1/creation/{creation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.haiper.ai/v1/creation/{creation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "<string>",
"value": {
"creation_id": "<string>",
"user_id": "<string>",
"username": "<string>",
"avatar": "<string>",
"type": "<string>",
"input_type": "<string>",
"prompt": "<string>",
"negative_prompt": "<string>",
"create_time": "<string>",
"update_time": "<string>",
"status": "<string>",
"video_url": "<string>",
"thumbnail_url": "<string>",
"settings": {
"fps": 123,
"width": 123,
"height": 123
},
"commits": {
"like_count": 123,
"is_like": true,
"collects_count": 123,
"is_collect": true
},
"output_type": "<string>",
"outputs": [
{
"id": "<string>",
"media_url": "<string>",
"thumbnail_url": "<string>"
}
]
}
}{
"message": "<string>",
"code": 123,
"details": "<array>"
}⌘I