Create and Share
Artifacts
Create and Share
POST
Create and Share
Create an artifact and immediately generate a share URL in a single request. This is the most efficient way to create shareable content.
Request
Template type:
markdown, chart, table, pdfDisplay title for the artifact
Template-specific content object
Expiration for both artifact and share link. Default:
7dAllow viewers to download (PDF only). Default:
falseCustom metadata key-value pairs
Response
The artifact ID
The shareable URL (ready to use immediately)
ISO 8601 expiration timestamp
Code Examples
Use Cases
This endpoint is ideal for:- AI agents that need to share results immediately
- Automation workflows that generate and distribute content
- One-off sharing without needing to manage artifact IDs
- Ephemeral content that should auto-expire
Comparison with Separate Calls
| Approach | API Calls | Use Case |
|---|---|---|
| Create + Share | 2 | Need artifact ID for future updates |
| Create and Share | 1 | One-shot content sharing |