Generation History
curl --request GET \
--url https://api.example.com/api/v2/user/historyimport requests
url = "https://api.example.com/api/v2/user/history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/user/history', 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.example.com/api/v2/user/history",
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://api.example.com/api/v2/user/history"
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://api.example.com/api/v2/user/history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/user/history")
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_bodyGenerations (results)
Generation History
Retrieve past generations and check status of async jobs
GET
/
api
/
v2
/
user
/
history
Generation History
curl --request GET \
--url https://api.example.com/api/v2/user/historyimport requests
url = "https://api.example.com/api/v2/user/history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v2/user/history', 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.example.com/api/v2/user/history",
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://api.example.com/api/v2/user/history"
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://api.example.com/api/v2/user/history")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/user/history")
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_bodyList Generation History
Returns a paginated list of your past generations.Query Parameters
integer
default:"1"
Page number.
integer
default:"20"
Items per page. Max
100.string
Filter by generation type:
text, image, video, tts, stt, audio, toolstring
Filter by model slug (e.g.
gpt-5, dall-e-3).string
Filter by status:
completed, pending, failedRequest
curl "https://elumenta.ru/api/v2/user/history?type=image&limit=10" \
-H "Authorization: Bearer nb_YOUR_API_KEY"
Response
{
"items": [
{
"id": "gen_01j9x2img789",
"type": "image",
"model": "flux-1.1-pro",
"status": "completed",
"prompt": "Portrait of a CEO in a modern office",
"url": "https://storage.elumenta.ru/generations/gen_01j9x2img789.webp",
"tokens_used": 8,
"created_at": "2026-03-08T12:02:30Z"
},
{
"id": "gen_01j9x2img788",
"type": "image",
"model": "dall-e-3",
"status": "completed",
"prompt": "Minimalist product shot, white background",
"url": "https://storage.elumenta.ru/generations/gen_01j9x2img788.webp",
"tokens_used": 7,
"created_at": "2026-03-08T11:50:00Z"
}
],
"total": 142,
"page": 1,
"limit": 10,
"pages": 15
}
Check Generation Status
Poll the status of an async generation (video, slower image models).Path Parameters
string
required
The generation ID returned from the initial request.
Request
curl "https://elumenta.ru/api/v2/generate/status/gen_01j9x2vid001" \
-H "Authorization: Bearer nb_YOUR_API_KEY"
Response: Pending
{
"id": "gen_01j9x2vid001",
"status": "pending",
"model": "kling-v2.1-pro",
"progress": 45,
"eta_seconds": 32,
"created_at": "2026-03-08T12:05:00Z"
}
Response: Completed
{
"id": "gen_01j9x2vid001",
"status": "completed",
"model": "kling-v2.1-pro",
"url": "https://storage.elumenta.ru/generations/gen_01j9x2vid001.mp4",
"duration": 5,
"width": 1920,
"height": 1080,
"tokens_used": 60,
"balance_remaining": 229,
"created_at": "2026-03-08T12:05:00Z",
"completed_at": "2026-03-08T12:06:02Z"
}
Response: Failed
{
"id": "gen_01j9x2vid002",
"status": "failed",
"model": "kling-v2.1-pro",
"error": "Provider error: content policy violation",
"tokens_used": 0,
"created_at": "2026-03-08T12:10:00Z"
}
When a generation fails, no tokens are charged.
Recommended Polling Strategy
import requests
import time
def wait_for_generation(gen_id: str, api_key: str, timeout: int = 300):
"""Poll until generation completes or times out."""
headers = {"Authorization": f"Bearer {api_key}"}
deadline = time.time() + timeout
while time.time() < deadline:
res = requests.get(
f"https://elumenta.ru/api/v2/generate/status/{gen_id}",
headers=headers
)
data = res.json()
if data["status"] == "completed":
return data
elif data["status"] == "failed":
raise Exception(f"Generation failed: {data.get('error')}")
# Use eta_seconds hint if available
wait = min(data.get("eta_seconds", 10), 10)
time.sleep(wait)
raise TimeoutError(f"Generation {gen_id} timed out after {timeout}s")
Storage Retention
Generated files are stored based on your plan:| Plan | Retention |
|---|---|
| Starter | 7 days |
| Basic | 30 days |
| Pro | 90 days |
| VIP | 90 days |
| Elite | Unlimited |
⌘I

