Get generation
curl --request GET \
--url https://fanifyai.com/api/v1/hub/generations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://fanifyai.com/api/v1/hub/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fanifyai.com/api/v1/hub/generations/{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{
"id": "0192f3a4-8c1e-7b2a-9f10-2b6d4e0c9a11",
"model": "nano-banana-2",
"is_llm": false,
"status": "succeeded",
"input": {
"prompt": "a cat",
"aspect_ratio": "16:9",
"resolution": "2K",
"image_input": [
"https://host/cdn/a.png"
]
},
"estimated_cost": 0.04,
"billed_cost": 0.04,
"currency": "EUR",
"outputs": [
{
"index": 0,
"media_type": "image/png",
"url": "https://fanifyai.com/api/v1/hub/files/8Jd2kQ7pR1sT4uV6wX9yZ0aB2cD4eF6gH8iJ0kL2mN4",
"size": 812345,
"expires_at": "2026-09-14T10:00:31Z"
}
],
"error": null,
"missing": [],
"created_at": "2026-09-07T10:00:00Z",
"started_at": "2026-09-07T10:00:01Z",
"completed_at": "2026-09-07T10:00:31Z"
}{
"type": "https://fanifyai.com/docs/hub/errors#unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized"
}{
"type": "https://fanifyai.com/docs/hub/errors#generation_not_found",
"title": "Generation not found",
"status": 404,
"code": "generation_not_found"
}{
"type": "https://fanifyai.com/docs/hub/errors#rate_limited",
"title": "Rate limit reached",
"status": 429,
"code": "rate_limited"
}Generations
Get generation
Retrieves one generation and its current status.
GET
/
api
/
v1
/
hub
/
generations
/
{id}
Get generation
curl --request GET \
--url https://fanifyai.com/api/v1/hub/generations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://fanifyai.com/api/v1/hub/generations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{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://fanifyai.com/api/v1/hub/generations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://fanifyai.com/api/v1/hub/generations/{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{
"id": "0192f3a4-8c1e-7b2a-9f10-2b6d4e0c9a11",
"model": "nano-banana-2",
"is_llm": false,
"status": "succeeded",
"input": {
"prompt": "a cat",
"aspect_ratio": "16:9",
"resolution": "2K",
"image_input": [
"https://host/cdn/a.png"
]
},
"estimated_cost": 0.04,
"billed_cost": 0.04,
"currency": "EUR",
"outputs": [
{
"index": 0,
"media_type": "image/png",
"url": "https://fanifyai.com/api/v1/hub/files/8Jd2kQ7pR1sT4uV6wX9yZ0aB2cD4eF6gH8iJ0kL2mN4",
"size": 812345,
"expires_at": "2026-09-14T10:00:31Z"
}
],
"error": null,
"missing": [],
"created_at": "2026-09-07T10:00:00Z",
"started_at": "2026-09-07T10:00:01Z",
"completed_at": "2026-09-07T10:00:31Z"
}{
"type": "https://fanifyai.com/docs/hub/errors#unauthorized",
"title": "Unauthorized",
"status": 401,
"code": "unauthorized"
}{
"type": "https://fanifyai.com/docs/hub/errors#generation_not_found",
"title": "Generation not found",
"status": 404,
"code": "generation_not_found"
}{
"type": "https://fanifyai.com/docs/hub/errors#rate_limited",
"title": "Rate limit reached",
"status": 429,
"code": "rate_limited"
}Authorizations
Fanify API key.
Path Parameters
Response
Generation details.
Available options:
queued, running, succeeded, failed, canceled, awaiting_supply Available options:
EUR Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
