Frontend Artifacts
An artifact is a small web frontend - a page, a presentation, a mini game - made of HTML, JavaScript, CSS and assets. Every save is a new immutable version, and one version is live. Artifacts are private until you share them: by link, publicly, or by inviting people by name to view or edit. Anyone you share the sources with can clone the artifact into their own copy.
A page runs sandboxed on its own origin: it has no cookies, no browser storage and no FlyMyAI key, and a file that contains a platform key is refused at publish.
Artifacts are on for every account. GET /api/v1/artifacts/status/ (or
client.artifacts.status() in the Python SDK) lists your limits. Each
artifact is also a project, artifact:<id>, and its files live in that
project's storage.
Create an artifact
From your AI assistant (the Agents MCP):
Make a one-page landing for my bakery and publish it as a FlyMyAI artifact.
The assistant calls create_artifact with the files. Version 1 goes live at once
and stays private until you share it.
From Python:
from flymyai import AgentClient
from flymyai.agents import artifact_files_from_directory
client = AgentClient(api_key="fly-...")
made = client.artifacts.create(
name="Pod racer",
files=artifact_files_from_directory("./pod-racer"), # index.html and its assets
idempotency_key="pod-racer-create-1",
)
print(made.artifact.owner_url)
In the app: open Artifacts > New artifact, then write the HTML or upload
files or a whole folder. The entry page is index.html, or the only .html file.
Publish new versions
A new version starts from the latest one (base_version). Files you send add or
replace paths, delete removes paths, and every other file is kept. If someone
published in the meantime, the call is refused with stale_base_version and the
latest version number: apply your change there and publish again.
- In the app: New version edits the entry page in place, or takes uploaded files.
- From your assistant:
publish_artifact_version. Withpublish: falsethe version is saved as a draft, andupdate_artifactmakes it live later. - Roll back by making an earlier version live (
live_version). Earlier versions stay.
Share by link
Share sets who can open the artifact:
| Visibility | Who opens it |
|---|---|
private | You and the people you shared it with by name |
link | Anyone with the link |
public | Anyone with the link, like link today; public artifacts may be listed in a gallery later |
With sources also gives link viewers every version, the files and Make your own version (a clone). Reset link draws a new link: the old one and every frame opened through it stop working.
Share with people to view or edit
Under People, enter someone's email or FlyMyAI username and pick a role:
- Can view - every version, its files, and a clone.
- Can edit - also publish versions, choose the live version and rename. An editor's versions are stored as yours.
This sends an invitation, and the person must accept it. They get an email and accept or decline on their Artifacts page, or from their assistant. Until they accept, nothing is shared with them: the artifact is not in their lists, and its files and pages stay closed to them. An invitation to an email waits for whoever verifies that email on FlyMyAI.
Nobody learns who an email or a username belongs to. Inviting an email answers the same whether an account has it or not; you see each person exactly as you typed them, with their status (pending or accepted); a member sees only which entry is theirs. The artifact's history names people the same way.
Sharing settings, the list of people and deleting the artifact stay yours. Someone who accepted finds the artifact under Artifacts > Shared with me and can Leave it. Removing a person, invited or accepted, stops their access and any page they have open at once. You can share an artifact with up to 20 people.
From your assistant: add_artifact_member invites, list_artifact_members shows
who is in and who has not accepted yet, and remove_artifact_member takes the
member's id. The invited person answers with list_artifact_invitations,
accept_artifact_invitation and decline_artifact_invitation, and
list_artifacts with scope: "shared" lists what they accepted.
Clone
Clone (or clone_artifact) makes a new private artifact that you own, starting
from any version you may open. The copy is independent: changes to it never touch
the original. It records where it came from (forked from: name and version),
and the original counts its clones (get_artifact_lineage). A clone's name, author and link
show in the original's lineage only when its owner made the clone public.
Bring a page from elsewhere
To bring in a Claude artifact, a CodePen or a folder on your disk, your assistant
reads the page's files and calls create_artifact with them. Text files go in
content and binary files in content_base64. A single-file page is just
index.html.
Copy my Claude artifact "Q3 launch deck" into FlyMyAI and share it by link.
Claude reads the HTML of Claude artifacts you own. For a page someone else
published, give your assistant the files, or let it fetch the page it serves. From
Python, artifact_files_from_directory() turns a folder into the files to send.
Games
A game is an artifact like any page. Canvas, WebGL, the gamepad, fullscreen and sound work in the frame. Share it to edit with a friend to build it together, or share it with sources and let people clone it and make their own version. A page has no browser storage, so saving progress to a server is not part of this version.
In Projects
Each artifact you own, or that is shared with you and you accepted, also appears in
Projects as a project of kind artifact. Its card shows the live version, its sharing and the
people, and opens the artifact page.
Tools, SDK and REST
The same operations are available on every surface:
| What | Agents MCP tool | Python SDK (client.artifacts) | REST (/api/v1/artifacts/) |
|---|---|---|---|
| List yours or shared with you | list_artifacts | list(scope=...) | GET / (?scope=shared) |
| Open one | get_artifact | get(id) / get(share_link=...) | GET /<id>/, GET /shared/<handle>/ |
| Create | create_artifact | create(...) | POST / |
| New version | publish_artifact_version | publish(...) | POST /<id>/versions/ |
| Read the files | read_artifact_files | files(...), read_file(...) | GET /<id>/versions/<n>/files/ |
| Rename or set the live version | update_artifact | update(...) | PATCH /<id>/ |
| Share by link | share_artifact | share(...) | PATCH /<id>/share/ |
| Clone | clone_artifact | clone(...) | POST /<id>/clone/, POST /shared/<handle>/clone/ |
| Lineage | get_artifact_lineage | lineage(...) | GET /<id>/lineage/ |
| People | list_artifact_members, add_artifact_member, remove_artifact_member | members, add_member, remove_member | GET/POST /<id>/members/, DELETE /<id>/members/<member id>/ |
| Invitations to you | list_artifact_invitations, accept_artifact_invitation, decline_artifact_invitation | invitations(), accept_invitation(id), decline_invitation(id) | GET /invitations/, POST /invitations/<id>/accept/, POST /invitations/<id>/decline/ |
| Delete | delete_artifact | delete(id) | DELETE /<id>/ |
REST also has GET /<id>/versions/ (versions), GET /<id>/history/ (what happened,
and who did it) and GET /<id>/versions/<n>/view/ (a sandboxed frame URL that is
valid for 8 hours).
Calls use your API key (X-API-KEY) or an OAuth token. A write that creates
something (create, publish, share, clone) takes a caller-owned Idempotency-Key:
reuse it only to retry the identical request.
API versions
This is version 1 of the artifacts API: the routes under /api/v1/artifacts/, the
payload schema flymy.artifact.v1, the tool names above and the SDK methods.
Version 1 stays for as long as anything uses it, so an agent frozen with these
calls keeps working. New fields, routes and tools may be added to it. A breaking
change would arrive as version 2 next to version 1, never in its place.