List Artifacts
curl --request GET \
--url https://genui.sh/api/artifactsimport requests
url = "https://genui.sh/api/artifacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://genui.sh/api/artifacts', 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://genui.sh/api/artifacts",
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://genui.sh/api/artifacts"
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://genui.sh/api/artifacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://genui.sh/api/artifacts")
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{
"data": [
{
"id": "art_abc123",
"template": "markdown",
"title": "My Document",
"status": "active",
"createdAt": "2024-01-15T12:00:00Z"
},
{
"id": "art_def456",
"template": "chart",
"title": "Sales Report",
"status": "active",
"createdAt": "2024-01-14T10:00:00Z"
}
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
Artifacts
List Artifacts
GET
/
api
/
artifacts
List Artifacts
curl --request GET \
--url https://genui.sh/api/artifactsimport requests
url = "https://genui.sh/api/artifacts"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://genui.sh/api/artifacts', 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://genui.sh/api/artifacts",
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://genui.sh/api/artifacts"
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://genui.sh/api/artifacts")
.asString();require 'uri'
require 'net/http'
url = URI("https://genui.sh/api/artifacts")
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{
"data": [
{
"id": "art_abc123",
"template": "markdown",
"title": "My Document",
"status": "active",
"createdAt": "2024-01-15T12:00:00Z"
},
{
"id": "art_def456",
"template": "chart",
"title": "Sales Report",
"status": "active",
"createdAt": "2024-01-14T10:00:00Z"
}
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
Retrieve a list of artifacts for your account.
Request
Number of artifacts to return (default: 20, max: 100)
Number of artifacts to skip for pagination
Filter by template type:
markdown, chart, table, pdfFilter by status:
active, expired, deletedSort order:
createdAt, -createdAt (default: -createdAt)Response
Array of artifact objects
Pagination metadata with
total, limit, offset, hasMore{
"data": [
{
"id": "art_abc123",
"template": "markdown",
"title": "My Document",
"status": "active",
"createdAt": "2024-01-15T12:00:00Z"
},
{
"id": "art_def456",
"template": "chart",
"title": "Sales Report",
"status": "active",
"createdAt": "2024-01-14T10:00:00Z"
}
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
Code Examples
curl -X GET "https://genui.sh/api/artifacts?limit=10&template=markdown" \
-H "Authorization: Bearer $GENUI_API_KEY"
import requests
import os
response = requests.get(
"https://genui.sh/api/artifacts",
headers={"Authorization": f"Bearer {os.environ['GENUI_API_KEY']}"},
params={"limit": 10, "template": "markdown"}
)
data = response.json()
for artifact in data["data"]:
print(f"{artifact['id']}: {artifact['title']}")
const params = new URLSearchParams({ limit: '10', template: 'markdown' });
const response = await fetch(`https://genui.sh/api/artifacts?${params}`, {
headers: {
'Authorization': `Bearer ${process.env.GENUI_API_KEY}`
}
});
const { data, pagination } = await response.json();
data.forEach(artifact => console.log(`${artifact.id}: ${artifact.title}`));
req, _ := http.NewRequest("GET", "https://genui.sh/api/artifacts?limit=10&template=markdown", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("GENUI_API_KEY"))
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
uri = URI('https://genui.sh/api/artifacts')
uri.query = URI.encode_www_form(limit: 10, template: 'markdown')
request = Net::HTTP::Get.new(uri)
request['Authorization'] = "Bearer #{ENV['GENUI_API_KEY']}"
response = http.request(request)
data = JSON.parse(response.body)
data['data'].each { |artifact| puts "#{artifact['id']}: #{artifact['title']}" }
let response = client
.get("https://genui.sh/api/artifacts")
.header("Authorization", format!("Bearer {}", api_key))
.query(&[("limit", "10"), ("template", "markdown")])
.send()
.await?;
let data: serde_json::Value = response.json().await?;
var response = await client.GetAsync("https://genui.sh/api/artifacts?limit=10&template=markdown");
var data = await response.Content.ReadFromJsonAsync<JsonElement>();
foreach (var artifact in data.GetProperty("data").EnumerateArray())
{
Console.WriteLine($"{artifact.GetProperty("id")}: {artifact.GetProperty("title")}");
}
⌘I