Get a generation
curl --request GET \
--url https://api.ekly.ai/v1/generations/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ekly.ai/v1/generations/{generation_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{
"created_at": "2023-11-07T05:31:56Z",
"id": "6f1c2d3e-9a0b-4c7d-8e1f-2a3b4c5d6e7f",
"model": "seedance-2-5-fal",
"prompt": "<string>",
"status": "pending",
"type": "image",
"completed_at": "2023-11-07T05:31:56Z",
"credits_charged": 123,
"error": {
"code": "<string>",
"message": "<string>"
},
"idempotency_key": "<string>",
"outputs": [
{
"url": "<string>",
"asset_id": "<string>",
"content_type": "video/mp4",
"duration_seconds": 123,
"height": 123,
"width": 123
}
]
}{
"error": {
"code": "unauthenticated",
"message": "This API key is not valid. Create a new one in Settings → Team.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"error": {
"code": "forbidden",
"message": "API keys can only call the /v1 API.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"error": {
"code": "not_found",
"message": "No generation with that id for this key.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded; retry after 12s.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}v1
Get a generation
The current state of one generation. Poll every 2–5 seconds with backoff; images usually finish in under a minute, video in a few minutes. Output URLs appear when status is completed.
GET
/
v1
/
generations
/
{generation_id}
Get a generation
curl --request GET \
--url https://api.ekly.ai/v1/generations/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_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.ekly.ai/v1/generations/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ekly.ai/v1/generations/{generation_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{
"created_at": "2023-11-07T05:31:56Z",
"id": "6f1c2d3e-9a0b-4c7d-8e1f-2a3b4c5d6e7f",
"model": "seedance-2-5-fal",
"prompt": "<string>",
"status": "pending",
"type": "image",
"completed_at": "2023-11-07T05:31:56Z",
"credits_charged": 123,
"error": {
"code": "<string>",
"message": "<string>"
},
"idempotency_key": "<string>",
"outputs": [
{
"url": "<string>",
"asset_id": "<string>",
"content_type": "video/mp4",
"duration_seconds": 123,
"height": 123,
"width": 123
}
]
}{
"error": {
"code": "unauthenticated",
"message": "This API key is not valid. Create a new one in Settings → Team.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"error": {
"code": "forbidden",
"message": "API keys can only call the /v1 API.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"error": {
"code": "not_found",
"message": "No generation with that id for this key.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded; retry after 12s.",
"trace_id": "c3746d5302dc4be6b2e8fa99fa762a8c"
}
}Authorizations
An organization API key created in Settings → Team, sent as Authorization: Bearer <key>.
Path Parameters
The id returned when you created the generation.
Response
Successful Response
One generation. Poll GET /v1/generations/{id} until status is completed or failed.
Example:
"6f1c2d3e-9a0b-4c7d-8e1f-2a3b4c5d6e7f"
Example:
"seedance-2-5-fal"
Available options:
pending, completed, failed Available options:
image, video, audio Credits actually charged; null while pending.
Show child attributes
Show child attributes
Show child attributes
Show child attributes