- Business reports from a conversation.
- Presentations created dynamically from data.
Working with Artifacts
The workflow has three main steps: 1. Generate: You start by sending a prompt to the dedicated Artifacts API endpoint. This initial call creates the content based on your prompt, data and/or system instructions you provide. 2. Rendering and streaming: The generated artifact is then rendered on your frontend using the C1Component<C1Component>. The content can be streamed in real-time, allowing users to see the report or presentation appear as it’s being created.
3. Edit:
To modify an existing artifact, you send its current content back to the same API endpoint along with a new prompt describing the changes. This enables an iterative editing workflow.
Guides in This Section
- Generating Artifacts: Learn how to call the Artifact API, structure your metadata, and write effective prompts to create new reports and presentations.
-
Rendering & Streaming Artifacts:
A guide on fetching and displaying artifacts on your frontend with
<C1Component>, including how to handle the live stream. - Editing Artifacts: Learn how to send existing artifact content back to the API to make modifications.
- Artifacts in Chat: Learn how to integrate artifacts into your conversational application using tool calls. You can find the complete example code in our GitHub repository.