Start here
Read a feed
/v1/community/feedon https://api.auray.ai/v1A page of a public feed — trending (what happened to a work in seven days, against its age), new, top over a window, or the reader's own following — or, with featured, the shelf our team featured.
A page of a public feed — trending (what happened to a work in seven days, against its age), new, top over a window, or the reader's own following — or, with featured, the shelf our team featured. Only works published, approved by our team and discoverable by their author are in a public feed; following is the discoverable works of the profiles the reader follows that our team did not decline. Our team's pins come first, in pinned, on a public feed's first page only. 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. While our team has paused the feeds it answers 503 feeds_paused, with our sentence for the pause when we wrote one; a work at its own link and its author's profile still answer.
#Authentication
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.
#Request
#Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
sort | string | no | following needs a key that holds community:write. One of "trending", "new", "top", "following". |
kind | string | no | Only works of this kind. One of "image", "video", "audio", "model3d", "project". |
model | string | no | Only works made with this model: its address or its id, as GET /v1/models lists them. Either finds the same works; case does not matter. 0 to 200 characters. |
window | string | no | What top counts over. One of "day", "week", "month", "year", "all". |
featured | boolean | no | The featured shelf, newest first, whatever sort says. |
original | boolean | no | Only Originals: works our own team made. |
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/feedimport { createClient } from "@auray/client";
const auray = createClient(); // this route needs no key
const answer = await auray.platform.community.feed();
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # this route needs no key
answer = auray.platform.community.feed()
print(answer)const res = await fetch("https://api.auray.ai/v1/community/feed", {
method: "GET",
});
console.log(await res.json());import requests
r = requests.get(
"https://api.auray.ai/v1/community/feed",
)
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/feed", 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/feed");
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/feed")
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/feed"))
.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/feed");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");#Responses
#200 OK
OK. One page, and the cursor of the next.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
object | string | yes | — | One of "list". |
sort | string | no | — | One of "trending", "new", "top", "following", "featured". |
pinned | object[] | no | — | Our team's pins, on a public feed's first page. |
pinned[].id | string | yes | — | The work's public id. |
pinned[].kind | string | yes | — | One of "image", "video", "audio", "model3d", "project". |
pinned[].title | string | yes | — | May be null. |
pinned[].model | object | yes | — | |
pinned[].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. |
pinned[].model.id | string | yes | — | The same model's id, as GET /v1/models lists it: the catalogue slug, such as krea2. May be null. |
pinned[].model.label | string | yes | — | The model's name, as a person reads it. May be null. |
pinned[].attribution | string | yes | — | The licence text the model's output travels with. Show it wherever the work is shown. May be null. |
pinned[].ai_generated | boolean | yes | — | Every work here is a generation's result. Label it so wherever it is shown. One of true. |
pinned[].media | object[] | yes | — | |
pinned[].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". |
pinned[].media[].position | integer | yes | — | |
pinned[].media[].url | string | yes | — | Where to load it. Kept until its author unpublishes the work. A URL. |
pinned[].media[].content_type | string | yes | — | |
pinned[].media[].width | integer | yes | — | May be null. |
pinned[].media[].height | integer | yes | — | May be null. |
pinned[].media[].duration_ms | integer | yes | — | May be null. |
pinned[].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. |
pinned[].author | object or null | yes | — | |
pinned[].counts | object | yes | — | |
pinned[].counts.likes | integer | yes | — | |
pinned[].counts.views | integer | yes | — | Counted once a day per visitor. |
pinned[].counts.comments | integer | yes | — | |
pinned[].counts.remixes | integer | yes | — | |
pinned[].made_at | string | yes | — | When the result was made. May be null. |
pinned[].published_at | string | yes | — | May be null. |
pinned[].featured | boolean | yes | — | Featured by our team. |
pinned[].pinned | boolean | yes | — | Pinned by our team to the top of the public feeds. |
pinned[].original | boolean | yes | — | An Original: made by our own team. |
pinned[].remixed | boolean | yes | — | Made from another work. |
pinned[].liked | boolean | yes | — | The reader's own like; null when no key that holds community:write was sent. May be null. |
pinned[].url | string | yes | — | The work's page. A URL. |
pinned[].project | object | no | — | Only on a project's card: its address, category, how many assets it shows, and the three largest bands of its Stack. |
pinned[].project.slug | string | yes | — | |
pinned[].project.category | string | yes | — | One of "film", "short", "series", "trailer", "commercial", "music_video", "animation", "documentary", "fashion", "game", "worldbuilding", "experimental", "other". |
pinned[].project.items | integer | yes | — | 0 to …. |
pinned[].project.stack | object[] | yes | — | |
pinned[].project.stack[].model | object | yes | — | |
pinned[].project.stack[].tenths | integer | yes | — | Its share in tenths of a percent; the bands of one Stack add up to exactly 1000. 0 to 1000. |
pinned[].project.stack[].percent | number | yes | — | tenths / 10, for display only. |
pinned[].project.stack[].count | integer | yes | — | 0 to …. |
pinned[].project.stack[].color | string | yes | — | |
pinned[].project.stack[].other | boolean | yes | — | The band that gathers every model past the top ones. |
data | object[] | yes | — | |
data[].id | string | yes | — | The work's public id. |
data[].kind | string | yes | — | One of "image", "video", "audio", "model3d", "project". |
data[].title | string | yes | — | 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 work is shown. May be null. |
data[].ai_generated | boolean | yes | — | Every work here is a generation's result. Label it so wherever it is shown. One of true. |
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[].author | object or null | yes | — | |
data[].counts | object | yes | — | |
data[].counts.likes | integer | yes | — | |
data[].counts.views | integer | yes | — | Counted once a day per visitor. |
data[].counts.comments | integer | yes | — | |
data[].counts.remixes | integer | yes | — | |
data[].made_at | string | yes | — | When the result was made. May be null. |
data[].published_at | string | yes | — | May be null. |
data[].featured | boolean | yes | — | Featured by our team. |
data[].pinned | boolean | yes | — | Pinned by our team to the top of the public feeds. |
data[].original | boolean | yes | — | An Original: made by our own team. |
data[].remixed | boolean | yes | — | Made from another work. |
data[].liked | boolean | yes | — | The reader's own like; null when no key that holds community:write was sent. May be null. |
data[].url | string | yes | — | The work's page. A URL. |
data[].project | object | no | — | Only on a project's card: its address, category, how many assets it shows, and the three largest bands of its Stack. |
data[].project.slug | string | yes | — | |
data[].project.category | string | yes | — | One of "film", "short", "series", "trailer", "commercial", "music_video", "animation", "documentary", "fashion", "game", "worldbuilding", "experimental", "other". |
data[].project.items | integer | yes | — | 0 to …. |
data[].project.stack | object[] | yes | — | |
data[].project.stack[].model | object | yes | — | |
data[].project.stack[].tenths | integer | yes | — | Its share in tenths of a percent; the bands of one Stack add up to exactly 1000. 0 to 1000. |
data[].project.stack[].percent | number | yes | — | tenths / 10, for display only. |
data[].project.stack[].count | integer | yes | — | 0 to …. |
data[].project.stack[].color | string | yes | — | |
data[].project.stack[].other | boolean | yes | — | The band that gathers every model past the top ones. |
next_cursor | string | yes | — | The cursor of the next page; null on the last. May be null. |
request_id | string | no | — | Mirrored in the X-Request-Id header. On an answer without a key it names the request that filled the edge's copy, so readers served from that copy are handed the same one. |
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
#429 Too Many Requests
#503 Service Unavailable
#Status codes
| Status | Meaning |
|---|---|
200 | OK. One page, and the cursor of the next. |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
429 | Too Many Requests |
503 | Service Unavailable |
Every refusal names its code, and every code is explained at Errors.