List past generations
curl --request GET \
--url https://hub.oxen.ai/api/ai/generationsimport requests
url = "https://hub.oxen.ai/api/ai/generations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://hub.oxen.ai/api/ai/generations', 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://hub.oxen.ai/api/ai/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://hub.oxen.ai/api/ai/generations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://hub.oxen.ai/api/ai/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/ai/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"count": 123,
"generations": [
{
"enqueued_at": 123,
"generation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_type": "image",
"model_name": "<string>",
"status": "queued",
"completed_at": 123,
"cost": "<string>",
"error_message": "<string>",
"result_url": "<string>",
"started_at": 123,
"target_directory": "<string>",
"target_namespace": "<string>",
"target_repo": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_image": "<string>",
"username": "<string>"
}
],
"page_number": 123,
"page_size": 123,
"total_cost": "<string>",
"total_entries": 123,
"total_pages": 123
}API Reference
List past generations
Paginated browse view of completed and in-flight generations for a namespace. Use /api/ai/queue for the lean polling view of in-flight rows.
GET
/
api
/
ai
/
generations
List past generations
curl --request GET \
--url https://hub.oxen.ai/api/ai/generationsimport requests
url = "https://hub.oxen.ai/api/ai/generations"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://hub.oxen.ai/api/ai/generations', 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://hub.oxen.ai/api/ai/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://hub.oxen.ai/api/ai/generations"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://hub.oxen.ai/api/ai/generations")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.oxen.ai/api/ai/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"count": 123,
"generations": [
{
"enqueued_at": 123,
"generation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_type": "image",
"model_name": "<string>",
"status": "queued",
"completed_at": 123,
"cost": "<string>",
"error_message": "<string>",
"result_url": "<string>",
"started_at": 123,
"target_directory": "<string>",
"target_namespace": "<string>",
"target_repo": "<string>",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_image": "<string>",
"username": "<string>"
}
],
"page_number": 123,
"page_size": 123,
"total_cost": "<string>",
"total_entries": 123,
"total_pages": 123
}Query Parameters
Available options:
image, video Available options:
queued, processing, succeeded, failed, cancelled Required range:
x >= 1Required range:
1 <= x <= 1000Response
200 - application/json
Generation list
Paginated browse view of past generations for a namespace. Includes the per-filter cost aggregate. Each row carries any additional request params (prompt, duration, etc.) merged in at the top level.
Number of entries in this response (<= page_size)
Show child attributes
Show child attributes
Current page number (1-indexed)
Sum of charged amounts across the filter set (decimal as string). Null when nothing in the set has been charged.