Skip to content

Get project canvas

GET
/projects/{projectId}/canvas
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const canva = await client.projects.canvas.retrieve({
projectId: '<projectId>',
});
console.log(canva);

Returns the current project canvas topology as a Mermaid flowchart using the same serializer as the Fauna agent.

Error responses use the standard error body.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

Project canvas returned.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
canvas_url
required

Project canvas URL

string format: uri
diagram
required

Mermaid flowchart diagram

string
>= 1 characters
summary
required
object
node_count
required
integer
edge_count
required
integer
workflow_count
required
integer
isolated_node_count
required
integer
group_count
required
integer
Example
{
"project_id": "prj_abc123",
"diagram": "graph LR\n n1[\"Prompt (text)\"]\n n2[\"Result (image)\"]\n n1 -->|text| n2"
}