Skip to main content
GET
/
api
/
ai
/
generations
List past generations
curl --request GET \
  --url https://hub.oxen.ai/api/ai/generations
import 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",
      "model_name": "<string>",
      "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

namespace
string
model
string
media_type
enum<string>
Available options:
image,
video
status
enum<string>
Available options:
queued,
processing,
succeeded,
failed,
cancelled
repo
string
folder
string
page
integer
default:1
Required range: x >= 1
page_size
integer
default:50
Required range: 1 <= x <= 1000

Response

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.

count
integer
required

Number of entries in this response (<= page_size)

generations
object[]
required
page_number
integer
required

Current page number (1-indexed)

page_size
integer
required
total_cost
string | null
required

Sum of charged amounts across the filter set (decimal as string). Null when nothing in the set has been charged.

total_entries
integer
required
total_pages
integer
required