Change a work
Change a published work of yours. New words pass the automatic check and send the work back to our team for review; show_prompt: false hides its prompt and settings for good (a hidden prompt is deleted, so it cannot be shown again); discoverable lets it into or out of the public feeds; profile_pinned pins it to your profile, three at most. Fields left out stay as they are. Takes a key holding community:write — Account offers it unticked — or the desktop's own session key. Spends nothing. While our team has paused publishing, a new title or description waits — 503 publishing_paused — and every other change here still goes through.
curl -X POST https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d \
-H "Authorization: Bearer $AURAY_API_KEY" \
-H "content-type: application/json" \
-d '{
"title": "Lighthouse, morning fog",
"discoverable": true
}'import { createClient } from "@auray/client";
const auray = createClient(); // reads AURAY_API_KEY
const answer = await auray.platform.community.publications.update("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", { title: "Lighthouse, morning fog", discoverable: true });
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # reads AURAY_API_KEY
answer = auray.platform.community.publications.update("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", title="Lighthouse, morning fog", discoverable=True)
print(answer)const res = await fetch("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AURAY_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
"title": "Lighthouse, morning fog",
"discoverable": true
}),
});
console.log(await res.json());import os, requests
r = requests.post(
"https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
headers={"Authorization": f"Bearer {os.environ['AURAY_API_KEY']}"},
json={
"title": "Lighthouse, morning fog",
"discoverable": True
},
)
r.raise_for_status()
print(r.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"title": "Lighthouse, morning fog",
"discoverable": true
}`)
req, err := http.NewRequest("POST", "https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AURAY_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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 => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AURAY_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"title" => "Lighthouse, morning fog",
"discoverable" => true,
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
require "json"
uri = URI("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("AURAY_API_KEY")}"
req["Content-Type"] = "application/json"
req.body = {
"title" => "Lighthouse, morning fog",
"discoverable" => true
}.to_json
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 {
String body = """
{
"title": "Lighthouse, morning fog",
"discoverable": true
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d"))
.header("Authorization", "Bearer " + System.getenv("AURAY_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AURAY_API_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
var body = """
{
"title": "Lighthouse, morning fog",
"discoverable": true
}
""";
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
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>"
}{
"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>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}Authorizations
Bearer auray_sk_… — community:write — Account offers it unticked; the desktop's session key holds it.
Path Parameters
false.OK: the work as it stands now.
"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 |
|---|---|
RateLimit-Limit | Burst capacity. |
RateLimit-Remaining | |
RateLimit-Reset | Seconds until refill. |
X-RateLimit-Limit | |
X-RateLimit-Remaining | |
X-RateLimit-Reset | Unix seconds. The X- spelling is what client libraries read. |
X-Request-Id |
Was this page helpful?
curl -X POST https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d \
-H "Authorization: Bearer $AURAY_API_KEY" \
-H "content-type: application/json" \
-d '{
"title": "Lighthouse, morning fog",
"discoverable": true
}'import { createClient } from "@auray/client";
const auray = createClient(); // reads AURAY_API_KEY
const answer = await auray.platform.community.publications.update("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", { title: "Lighthouse, morning fog", discoverable: true });
console.dir(answer, { depth: null });from auray_client import Client
auray = Client() # reads AURAY_API_KEY
answer = auray.platform.community.publications.update("3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", title="Lighthouse, morning fog", discoverable=True)
print(answer)const res = await fetch("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AURAY_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
"title": "Lighthouse, morning fog",
"discoverable": true
}),
});
console.log(await res.json());import os, requests
r = requests.post(
"https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d",
headers={"Authorization": f"Bearer {os.environ['AURAY_API_KEY']}"},
json={
"title": "Lighthouse, morning fog",
"discoverable": True
},
)
r.raise_for_status()
print(r.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"title": "Lighthouse, morning fog",
"discoverable": true
}`)
req, err := http.NewRequest("POST", "https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("AURAY_API_KEY"))
req.Header.Set("Content-Type", "application/json")
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 => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("AURAY_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"title" => "Lighthouse, morning fog",
"discoverable" => true,
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE),
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), " ", $response, PHP_EOL;require "net/http"
require "json"
uri = URI("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer #{ENV.fetch("AURAY_API_KEY")}"
req["Content-Type"] = "application/json"
req.body = {
"title" => "Lighthouse, morning fog",
"discoverable" => true
}.to_json
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 {
String body = """
{
"title": "Lighthouse, morning fog",
"discoverable": true
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d"))
.header("Authorization", "Bearer " + System.getenv("AURAY_API_KEY"))
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("AURAY_API_KEY"));
using var request = new HttpRequestMessage(HttpMethod.Post, "https://api.auray.ai/v1/community/publications/3f0c8a52-6a1d-4e8b-9c2d-7e5f4a3b2c1d");
var body = """
{
"title": "Lighthouse, morning fog",
"discoverable": true
}
""";
request.Content = new StringContent(body, Encoding.UTF8, "application/json");
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>"
}{
"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>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}{
"error": "<string>",
"message": "<string>",
"docs": "<string>",
"request_id": "<string>"
}