Read a work
One work as its page draws it: its files, its model and licence text, its words, its prompt and settings only while its author shows them, the work it was made from, and its author. A work is shown once published, whether or not our team approved it for the feeds; one that is hidden, withdrawn or removed answers 404 — except to its author, who reads where it stands in mine. Takes no key. A key that holds community:write reads as its account — its likes and follows filled in — 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.
curl https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1dimport { createClient } from "@auray/client";
const auray = createClient(); // this route needs no key
const answer = await auray.platform.community.publications.get("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # this route needs no key
answer = auray.platform.community.publications.get("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
print(answer)const res = await fetch("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", {
method: "GET",
});
console.log(await res.json());import requests
r = requests.get(
"https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
)
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", 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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d"))
.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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"object": "<string>",
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"model": {
"address": "<string>",
"id": "<string>",
"label": "<string>"
},
"attribution": "<string>",
"ai_generated": true,
"media": [
{
"role": "<string>",
"position": 123,
"url": "<string>",
"content_type": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123,
"supplied": true
}
],
"author": {},
"counts": {
"likes": 123,
"views": 123,
"comments": 123,
"remixes": 123
},
"made_at": "<string>",
"published_at": "<string>",
"featured": true,
"pinned": true,
"original": true,
"remixed": true,
"liked": true,
"url": "<string>",
"description": "<string>",
"show_prompt": true,
"prompt": "<string>",
"params": {},
"remix_kind": "<string>",
"remix_of": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"author": {},
"url": "<string>"
},
"mine": {
"state": "<string>",
"state_reason": "<string>",
"approval": "<string>",
"approval_reason": "<string>",
"discoverable": true,
"profile_pinned": true,
"held": true,
"licence_version": "<string>",
"created_at": "<string>"
},
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}Authorizations
No key needed. A key that holds community:write is read as its account — its likes and follows filled in — and is answered private, no-store. Paced per address, and cached at the edge for thirty seconds.
Path Parameters
OK.
"publication"."image", "video", "audio", "model3d", "project".Show child attributes
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.GET /v1/models lists it: the catalogue slug, such as krea2. May be null.true.Show child attributes
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".ai_generated does not describe it.Show child attributes
community:write was sent. May be null."recreate", "animate", "upscale", "edit", null. May be null.Show child attributes
"image", "video", "audio", "model3d", "project".Show child attributes
published is shown on the profile and at its link; hidden while a severe report is reviewed; withdrawn unpublished while a report held it; removed taken down by our team; staging while its files are copied. One of "staging", "published", "hidden", "withdrawn", "removed"."pending", "approved", "rejected".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 |
Was this page helpful?
curl https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1dimport { createClient } from "@auray/client";
const auray = createClient(); // this route needs no key
const answer = await auray.platform.community.publications.get("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # this route needs no key
answer = auray.platform.community.publications.get("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
print(answer)const res = await fetch("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", {
method: "GET",
});
console.log(await res.json());import requests
r = requests.get(
"https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
)
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", 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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d"))
.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/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");{
"object": "<string>",
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"model": {
"address": "<string>",
"id": "<string>",
"label": "<string>"
},
"attribution": "<string>",
"ai_generated": true,
"media": [
{
"role": "<string>",
"position": 123,
"url": "<string>",
"content_type": "<string>",
"width": 123,
"height": 123,
"duration_ms": 123,
"supplied": true
}
],
"author": {},
"counts": {
"likes": 123,
"views": 123,
"comments": 123,
"remixes": 123
},
"made_at": "<string>",
"published_at": "<string>",
"featured": true,
"pinned": true,
"original": true,
"remixed": true,
"liked": true,
"url": "<string>",
"description": "<string>",
"show_prompt": true,
"prompt": "<string>",
"params": {},
"remix_kind": "<string>",
"remix_of": {
"id": "<string>",
"kind": "<string>",
"title": "<string>",
"author": {},
"url": "<string>"
},
"mine": {
"state": "<string>",
"state_reason": "<string>",
"approval": "<string>",
"approval_reason": "<string>",
"discoverable": true,
"profile_pinned": true,
"held": true,
"licence_version": "<string>",
"created_at": "<string>"
},
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}