Create a NEW artifact in Agent Grid; never edits an existing one.
Two independent axes, easy to confuse: **type** (below) is where the files come from, and **artifactType** is what the artifact IS. artifactType defaults to app — a live web application that renders and runs at the returned URL as soon as it is ready, which is what every type below produces unless you say otherwise. Pass artifactType markdown for a readable document, or asset for a stored file: neither is a running app, so do not promise a live URL for them.
Generation types (p2c/l2c/f2c) run ASYNCHRONOUSLY: this returns IMMEDIATELY with { status: 'generating', sessionId, artifactUrl, previewUrl, playgroundUrl } while the app is still being built. The preview link shows a live loading screen that swaps in the finished app.
Most of the time, you need a single call to artifact-status with { sessionId, wait: true }, BEFORE you reply to the user because it blocks until the app is ready or failed, so you report a finished app rather than a promise (if it returns still 'generating', call it again).
This artifact-create tool is NOT meant to be called multiple times for the same generation request. While a matching job is active, the same stable request identity may reuse that job for the team instead of creating another.
The own-code types (empty/import) return immediately.
**Do NOT use for:** editing an existing artifact (artifact-explore + artifact-edit, or the git flow via artifact-get_git_token); rename/visibility (artifact-update_metadata); deploying live (artifact-publish).
**type:**
Anima GENERATES (async — poll artifact-status):
- p2c: text prompt (requires prompt; optional guidelines)
- l2c: website (requires url)
- f2c: Figma frames (requires fileKey + nodesId + X-Figma-Token header)
YOU supply (ready immediately):
- empty: empty git repo you push to (requires framework)
- import: your code is the first commit; EXACTLY ONE of files (inline text, up to roughly 100 KB) or zipUploadId (binaries or larger)
**framework:** only html and react exist. Required for empty; optional for import (detected from package.json) and generation types (default html).
**Returns:** generation types (p2c/l2c/f2c) → { success, status: 'generating', sessionId, artifactUrl, playgroundUrl, previewUrl }; poll artifact-status for completion. Own-code types (empty/import) → sessionId, revision, artifactUrl, name, gitRemoteUrl, access, expiresAt, nextSteps (plus fileCount, skippedFiles for import), and a read-write git token in the same response — so do NOT call artifact-get_git_token after creating. playgroundUrl comes only when artifactType is app; previewUrl renders those plus markdown artifacts, while asset artifacts expose only artifactUrl. A markdown inline-files import also returns documentPreview plus documentPreviewTruncated, so the preview card can render the bounded document text without a follow-up read. `revision` is the first commit: pass it straight to artifact-edit as baseRevision if you edit without git. These are ready immediately (no 'generating' status): previewUrl renders the committed files right away for import, and the seed README for empty.