Skip to content
FLORA DocsGo to app

List project canvas nodes

client.Projects.ListNodes(ctx, projectID, query) (*CanvasNodesCursorPage[ProjectListNodesResponse], error)
GET/projects/{projectId}/nodes

Returns sanitized visible media nodes on a project canvas. The response omits raw graph documents, Liveblocks internals, raw Convex IDs, and unbounded node data blobs.

ParametersExpand Collapse
projectID string

Project identifier

query ProjectListNodesParams
Cursor param.Field[string]Optional

Opaque cursor for fetching the next page

Limit param.Field[int64]Optional

Maximum number of results to return

minimum1
maximum100
ReturnsExpand Collapse
type ProjectListNodesResponse struct{…}
NodeID string

Canvas node identifier

minLength1
Type ProjectListNodesResponseType

Canvas node media type

One of the following:
const ProjectListNodesResponseTypeImage ProjectListNodesResponseType = "image"
const ProjectListNodesResponseTypeVideo ProjectListNodesResponseType = "video"
const ProjectListNodesResponseTypeAudio ProjectListNodesResponseType = "audio"
const ProjectListNodesResponseTypeText ProjectListNodesResponseType = "text"
AssetID stringOptional

Asset identifier

Height int64Optional
Label stringOptional

Canvas node label

URL stringOptional

Canvas node output URL or text content

minLength1
Width int64Optional

List project canvas nodes

package main

import (
  "context"
  "fmt"

  "github.com/florafauna-ai/flora-go"
  "github.com/florafauna-ai/flora-go/option"
)

func main() {
  client := flora.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Projects.ListNodes(
    context.TODO(),
    "prj_abc123",
    flora.ProjectListNodesParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "canvas_url": "https://example.com",
  "meta": {
    "next_cursor": "eyJvZmZzZXQiOjIwfQ",
    "total_estimate": 0
  },
  "nodes": [
    {
      "node_id": "node_abc123",
      "type": "image",
      "asset_id": "asset_abc123",
      "height": 0,
      "label": "Logo",
      "url": "https://media.flora.ai/output.png",
      "width": 0
    }
  ],
  "project_id": "prj_abc123"
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}
Returns Examples
{
  "canvas_url": "https://example.com",
  "meta": {
    "next_cursor": "eyJvZmZzZXQiOjIwfQ",
    "total_estimate": 0
  },
  "nodes": [
    {
      "node_id": "node_abc123",
      "type": "image",
      "asset_id": "asset_abc123",
      "height": 0,
      "label": "Logo",
      "url": "https://media.flora.ai/output.png",
      "width": 0
    }
  ],
  "project_id": "prj_abc123"
}
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key."
  }
}
{
  "error": {
    "code": "insufficient_credits",
    "message": "Insufficient credits."
  }
}
{
  "error": {
    "code": "forbidden",
    "message": "Forbidden."
  }
}
{
  "error": {
    "code": "not_found",
    "message": "Not found."
  }
}
{
  "error": {
    "code": "idempotency_duplicate",
    "message": "Duplicate idempotency key."
  }
}
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "unknown_error",
    "message": "An unknown error occurred."
  }
}