# An admin API for AI web artifact creation and editing

**URL:** https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297
**Category:** Feature
**Tags:** rest-api, completed, ai, ai-artifacts
**Created:** [June 23, 2025, 7:35am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297 "2025-06-23T07:35:42Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![MachineScholar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/machinescholar/32/424719_2.png) [@MachineScholar](https://meta.discourse.org/u/MachineScholar)
#### Post date: [June 23, 2025, 7:35am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/1 "2025-06-23T07:35:42Z")

</div>

As per this discussion, it seems like many admins would be ecstatic to have an interface or an admin API which allows them to manually create and edit artifacts.

> [@AI Artifact User storage](https://meta.discourse.org/t/ai-artifact-user-storage/369822/10):
>
> I am not against having a mechanism, but it is a rather large piece of work, there is lots of UI, an interim thing I could probably do is provide an admin API for artifact creation / editing and so on. Worth tracking in a separate #Feature topic if you want.

Currently the only way to create/edit any artifacts is through the Web Artifact Creator persona, however this inherently has some limitations:

- **:money_bag: Costs** : Making LLM calls for trivial changes such as changing some text or button placement, etc. gets quite expensive if one really wants to work out all of the kinks and progressively add new stuff to it, etc.
- **:warning: Risks** : An admin could in principle (I think, as I haven’t tried it yet) write a function to SSH tunnel into the database (or use a GUI like pgAdmin 4), copy the relevant rows from the relevant tables, auto increments the artifact ID, alter the code for a different artifact or make changes, etc. etc. But this is obviously risky and potentially destructive (that’s why [Data Explorer](https://meta.discourse.org/t/32566?silent=true) is read-only, after all). Not to mention that it is time-consuming.

What would this feature enable? A LOT. Here are just a few things I could think of which are relevant to my community:

- **:nerd_face: A “base quiz” artifact** : We could have one base quiz artifact, then simply copy it and alter the JSON storage to create an entirely new quiz. This pathway has the potential to totally bypass [H5P content for educational communities](https://meta.discourse.org/t/could-ai-artifacts-be-a-blueprint-how-to-enable-h5p-content-in-discourse/341083/2).
- **:wrench: A “copy/customize artifact” LLM tool** : Since this hypothetical feature would be part of Discourse’s rich REST API, admins could make a tool which allows personas to copy a given artifact then personalize the JSON storage for a particular user or group.
- **:microscope: Personalized artifacts** : Closely related to both of the previous points, instead of having to rely on an LLM to copy/paste an artifact without messing anything up, we could have just one artifact which actually works then use this API to copy it for a specific user or group, then personalize it to them however needed via the JSON storage. One use-case I have for this is making individual knowledge graphs for some of my users. It’d be nice to have a graph visualizer artifact which works well, then each user just builds their own knowledge graph which is stored as persistent JSON.
- **:computer_disk: Fetching JSON data** : I suspect that such an API would also more easily enable retrieving the persistent JSON data associated with any given artifact. This could be massively beneficial for many reasons. For example, feeding it to an LLM for context (via a “read artifact data” tool), etc.

---

<div class="post-metadata">

### Author: ![MachineScholar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/machinescholar/32/424719_2.png) [@MachineScholar](https://meta.discourse.org/u/MachineScholar)
#### Post date: [June 24, 2025, 10:01am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/2 "2025-06-24T10:01:56Z")

</div>

I’ve just attempted to manually add a new artifact to the `ai_artifacts` database table using pgAdmin4. I copy/pasted the row of an already existing artifact then changed the values for the `id`,`user_id`, and `post_id` columns. Did the same process for the `ai_artifact_key_values` table.

And it still didn’t work for some unknown reason. The new artifact which I manually added was not visible to the user which it should be visible to. So I fear the only way to get this done is via a dedicated admin API endpoint :pensive_face:

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [June 26, 2025, 7:23am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/3 "2025-06-26T07:23:07Z")

</div>

Even if we don’t get a Codepen style editor with this, I think something like baking in VSCode would be satisfactory.

---

<div class="post-metadata">

### Author: ![varli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/varli/32/487601_2.png) [@varli](https://meta.discourse.org/u/varli)
#### Post date: [June 26, 2025, 9:41am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/4 "2025-06-26T09:41:10Z")

</div>

Gets my vote! I think my company could totally use this, as we’ve just moved to Discourse. I’m going to have a chat with them and get their two cents. May I ask a few questions?

1. Which LLM do you use for artifacts?
2. How else you have tried to share the artifact?

And

> [@darkpixlz](#):
>
> something like baking in VSCode would be satisfactory

Could you maybe explain on how you see this working? It sound rather intensive.

---

<div class="post-metadata">

### Author: ![MachineScholar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/machinescholar/32/424719_2.png) [@MachineScholar](https://meta.discourse.org/u/MachineScholar)
#### Post date: [June 26, 2025, 9:32pm UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/5 "2025-06-26T21:32:55Z")

</div>

> [@varli](#):
>
> Which LLM do you use for artifacts?

I find that Claude Sonnet 4 behaves quite well, and all of the testimonies saying Claude Code is amazing just banks this up. However I haven’t tested o3 pro yet

> [@varli](#):
>
> How else you have tried to share the artifact?

I’ve tried: group message, sharing in private category, manually copying the artifact in the database, etc. Seems like the only way to share is to share it publicly (no way to control access granularly)

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [June 27, 2025, 4:28am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/6 "2025-06-27T04:28:31Z")

</div>

> [@varli](#):
>
> Could you maybe explain on how you see this working? It sound rather intensive.

Cloudflare does it nicely, there’s just an edit code button in the Workers UI which will take you to embedded VSC where you just simple edit the code and deploy right to the worker. Something like that could work for creating and editing artifacts in the browser.

---

<div class="post-metadata">

### Author: ![MachineScholar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/machinescholar/32/424719_2.png) [@MachineScholar](https://meta.discourse.org/u/MachineScholar)
#### Post date: [August 9, 2025, 8:24am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/7 "2025-08-09T08:24:17Z")

</div>

> [@AI Artifact User storage](https://meta.discourse.org/t/ai-artifact-user-storage/369822/10):
>
> an interim thing I could probably do is provide an admin API for artifact creation / editing and so on.
> 
> Worth tracking in a separate #feature::category topic if you want.

Is there possibly any update or ETA regarding this? Not intending to create any pressure nor annoyance! I’m just inquiring since I’m setting some things up for a community and which path we will take depends on whether or not this will be implemented :face_with_peeking_eye:

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 14, 2025, 1:15am UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/8 "2025-08-14T01:15:36Z")

</div>

I have this PR up

[https://github.com/discourse/discourse/pull/34193](https://github.com/discourse/discourse/pull/34193)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 17, 2025, 10:00pm UTC](https://meta.discourse.org/t/an-admin-api-for-ai-web-artifact-creation-and-editing/371297/9 "2025-08-17T22:00:17Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
