Start here
List a published project's assets
/v1/community/publications/{id}/assetson https://api.auray.ai/v1A page of a published project's assets — all of them, or one folder's — in the project's order, each with its files, model, licence text and AI-generated mark, and its prompt only while its author …
A page of a published project's assets — all of them, or one folder's — in the project's order, each with its files, model, licence text and AI-generated mark, and its prompt only while its author shows prompts. Seen as its page is. Takes no key. A key that holds community:write reads as its account — its likes filled in, and its author told where it stands in mine — and any other key reads what a stranger reads; either way a request with a key is answered for itself alone and kept in no shared cache. An answer without a key is the same for every reader, its request_id included — which names the request that filled the edge's copy — and carries no RateLimit-* headers, since they would describe that request's sender. Cached at the edge for thirty seconds with two minutes of stale service.
#Authentication
No key needed — this document is public.
#Request
#Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
#Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
folder | string | no | all (the default), generations, uploads, or a folder's id from the page's folders. |
cursor | string | no | The next_cursor the previous page answered, unchanged, with the same filters. None for the first page. 0 to 200 characters. |
limit | integer | no | How many on a page. 1 to 60. |
#Example request
curl https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assetsimport { createClient } from "@auray/client";
const auray = createClient(); // this route needs no key
const answer = await auray.platform.community.projects.assets("photo_docs-mtpb1vnh");
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # this route needs no key
answer = auray.platform.community.projects.assets("photo_docs-mtpb1vnh")
print(answer)const res = await fetch("https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets", {
method: "GET",
});
console.log(await res.json());import requests
r = requests.get(
"https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets",
)
r.raise_for_status()
print(r.json())package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets", nil)
if err != nil {
panic(err)
}
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.Status, string(out))
}<?php
$ch = curl_init("https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
uri = URI("https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets")
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.code, res.bodyimport java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.auray.ai/v1/community/publications/photo_docs-mtpb1vnh/assets");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");#Responses
#200 OK
OK.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
object | string | yes | — | One of "list". |
data | object[] | yes | — | |
data[].id | string | yes | — | The asset's own public id. Report it as a publication: the report is about the project, with the asset named. |
data[].kind | string | yes | — | One of "image", "video", "audio", "model3d". |
data[].title | string | yes | — | May be null. |
data[].folder_id | string | yes | — | A member's folder of the page's folders, or null. May be null. |
data[].media | object[] | yes | — | |
data[].media[].role | string | yes | — | primary is the work as it was made; the rest are what the feeds draw: an image's thumbnail, a video's or a model's poster and thumbnail, a song's waveform (JSON: {version, peaks}). One of "primary", "poster", "preview", "thumbnail", "waveform". |
data[].media[].position | integer | yes | — | |
data[].media[].url | string | yes | — | Where to load it. Kept until its author unpublishes the work. A URL. |
data[].media[].content_type | string | yes | — | |
data[].media[].width | integer | yes | — | May be null. |
data[].media[].height | integer | yes | — | May be null. |
data[].media[].duration_ms | integer | yes | — | May be null. |
data[].media[].supplied | boolean | yes | — | True for a poster, or its thumbnail, that the work's author supplied rather than one our services made: it is not what the model made, and the work's ai_generated does not describe it. |
data[].prompt | string | yes | — | Only while its author shows prompts; a hidden prompt exists nowhere in the answer. May be null. |
data[].model | object | yes | — | |
data[].model.address | string | yes | — | The model address it was made with, as GET /v1/models lists it: the path a job is submitted to, such as auray-ai/krea-2-turbo/text-to-image. May be null. |
data[].model.id | string | yes | — | The same model's id, as GET /v1/models lists it: the catalogue slug, such as krea2. May be null. |
data[].model.label | string | yes | — | The model's name, as a person reads it. May be null. |
data[].attribution | string | yes | — | The licence text the model's output travels with. Show it wherever the asset is. May be null. |
data[].ai_generated | boolean | yes | — | A model made it; false for a picture or a clip its author uploaded. |
data[].created_at | string | yes | — | |
next_cursor | string | yes | — | May be null. |
request_id | string | no | — |
Headers:
| Header | Description |
|---|---|
Cache-Control | public, s-maxage=30, stale-while-revalidate=120 with no key; private, no-store with one. |
Vary | Authorization. |
RateLimit-Limit | Burst capacity, per key, on an answer to a key. An answer without one is cached at the edge and carries none of the RateLimit-* headers; a refusal without one, which is never cached, carries its address's. |
RateLimit-Remaining | |
RateLimit-Reset | Seconds until refill. |
X-Request-Id |
#400 Bad Request
#401 Unauthorized
#403 Forbidden
#404 Not Found
#429 Too Many Requests
#503 Service Unavailable
#Status codes
| Status | Meaning |
|---|---|
200 | OK. |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
429 | Too Many Requests |
503 | Service Unavailable |
Every refusal names its code, and every code is explained at Errors.