> For the complete documentation index, see [llms.txt](https://docs.flora.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flora.ai/api/reference.md).

# FLORA API reference

Every FLORA API endpoint, with its parameters, request and response fields, errors and a curl and TypeScript example.

This reference lists all 72 public FLORA API endpoints, grouped by resource. Each page gives the method and path, a curl and TypeScript SDK example, then the parameters, request and response fields, and errors. For concepts and walkthroughs, start with the [FLORA API documentation](https://docs.flora.ai/api.md).

## Base URL

```
https://app.flora.ai/api/v1
```

## Authentication

Send a FLORA API key as a bearer token on every request:

```http
Authorization: Bearer $FLORA_API_KEY
```

See [Create a key](https://docs.flora.ai/api/platform/authentication.md#create-a-key) to get one.

## TypeScript SDK

Every endpoint has a method in the `@flora-ai/flora` package, named on its page.

```typescript
import { FloraClient } from '@flora-ai/flora';

const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
```

## Errors

Every error response has the same body. `fields` appears on `input_validation_error` (one entry per rejected field) and `revision_conflict` (the stale revision).

```json
{
  "error": {
    "code": "input_validation_error",
    "message": "prompt: Required",
    "fields": [
      {
        "field": "prompt",
        "message": "Required"
      }
    ]
  }
}
```

| Status | Code                                         | Meaning                                                                             |
| ------ | -------------------------------------------- | ----------------------------------------------------------------------------------- |
| 400    | `invalid_json`, `input_validation_error`     | The body isn't valid JSON, or an input failed validation (`fields` lists each one). |
| 401    | `unauthorized`, `invalid_api_key`            | The API key is missing, invalid or revoked.                                         |
| 402    | `insufficient_credits`                       | The workspace balance is too low for this request.                                  |
| 403    | `forbidden`, `paid_plan_required`            | The key can't do this, or the workspace plan doesn't include it.                    |
| 404    | `not_found`                                  | The resource doesn't exist or isn't visible to this key.                            |
| 409    | `idempotency_duplicate`, `revision_conflict` | Duplicate `Idempotency-Key` or a stale `base_revision`.                             |
| 429    | `rate_limited`                               | Too many requests. Back off and retry.                                              |
| 500    | `unknown_error`, `internal_error`            | Something failed on FLORA's side. Retry with backoff.                               |
| 503    | `temporarily_unavailable`                    | Authorization is temporarily unavailable. Retry later.                              |

See [Errors](https://docs.flora.ai/api/platform/errors.md) for how to recover from each code.

## Pagination

Paginated list endpoints return one page at a time. Set the page size with `limit` (1 to 100). Each response carries `meta.next_cursor`: pass it back as `cursor` to get the next page. It is `null` on the last page. The TypeScript SDK iterates pages for you.

Paginated endpoints: [List workspace members](https://docs.flora.ai/api/reference/workspaces/listworkspacemembers.md), [List workspace projects](https://docs.flora.ai/api/reference/projects/listprojects.md), [List project comment threads](https://docs.flora.ai/api/reference/comments/listcommentthreads.md), [List techniques](https://docs.flora.ai/api/reference/techniques/listtechniques.md), [List assets](https://docs.flora.ai/api/reference/assets/listassets.md), [List workspace skills](https://docs.flora.ai/api/reference/skills/listworkspaceskills.md), [List your skills](https://docs.flora.ai/api/reference/skills/listuserskills.md), [List project canvas nodes](https://docs.flora.ai/api/reference/canvas/listcanvasnodes.md), [List generation history](https://docs.flora.ai/api/reference/generations/listgenerations.md), [List technique run history](https://docs.flora.ai/api/reference/technique-runs/listtechniqueruns.md).

## Idempotency

28 write endpoints accept an optional `Idempotency-Key` header, so a retry after a timeout doesn't run twice; their pages say so under **Idempotency**. Reusing a key within two hours returns `409 idempotency_duplicate`. See [Idempotency](https://docs.flora.ai/api/platform/idempotency.md).

## Endpoints

### Actions

Prebuilt action catalog endpoints. [All Actions endpoints](https://docs.flora.ai/api/reference/actions.md).

| Method | Path                  | Endpoint                                                                   |
| ------ | --------------------- | -------------------------------------------------------------------------- |
| `GET`  | `/actions`            | [List actions](https://docs.flora.ai/api/reference/actions/listactions.md) |
| `GET`  | `/actions/{actionId}` | [Get an action](https://docs.flora.ai/api/reference/actions/getaction.md)  |

### Workspaces

Workspace discovery endpoints. [All Workspaces endpoints](https://docs.flora.ai/api/reference/workspaces.md).

| Method | Path                                | Endpoint                                                                                               |
| ------ | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `GET`  | `/workspaces`                       | [List accessible workspaces](https://docs.flora.ai/api/reference/workspaces/listworkspaces.md)         |
| `GET`  | `/workspaces/{workspaceId}/members` | [List workspace members](https://docs.flora.ai/api/reference/workspaces/listworkspacemembers.md)       |
| `GET`  | `/workspaces/{workspaceId}/usage`   | [Get workspace balance and usage](https://docs.flora.ai/api/reference/workspaces/getworkspaceusage.md) |

### Organizations

Organization usage reporting endpoints. [All Organizations endpoints](https://docs.flora.ai/api/reference/organizations.md).

| Method | Path                                                       | Endpoint                                                                                                                     |
| ------ | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/organizations/{organizationId}/usage`                    | [Get organization usage](https://docs.flora.ai/api/reference/organizations/getorganizationusage.md)                          |
| `POST` | `/organizations/{organizationId}/usage-exports`            | [Start an organization usage CSV export](https://docs.flora.ai/api/reference/organizations/createorganizationusageexport.md) |
| `GET`  | `/organizations/{organizationId}/usage-exports/{exportId}` | [Get an organization usage export](https://docs.flora.ai/api/reference/organizations/getorganizationusageexport.md)          |

### Projects

Project management endpoints. [All Projects endpoints](https://docs.flora.ai/api/reference/projects.md).

| Method  | Path                                                    | Endpoint                                                                                                                   |
| ------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `GET`   | `/projects`                                             | [List workspace projects](https://docs.flora.ai/api/reference/projects/listprojects.md)                                    |
| `POST`  | `/projects`                                             | [Create a project](https://docs.flora.ai/api/reference/projects/createproject.md)                                          |
| `POST`  | `/workspaces/{workspaceId}/projects`                    | [Create a project in a workspace](https://docs.flora.ai/api/reference/projects/createworkspaceproject.md)                  |
| `GET`   | `/workspaces/{workspaceId}/folders`                     | [List project folders](https://docs.flora.ai/api/reference/projects/listworkspacefolders.md)                               |
| `POST`  | `/workspaces/{workspaceId}/folders`                     | [Get or create a project folder](https://docs.flora.ai/api/reference/projects/getorcreateworkspacefolder.md)               |
| `POST`  | `/workspaces/{workspaceId}/folders/{folderId}/projects` | [Create a project in a project folder](https://docs.flora.ai/api/reference/projects/createworkspacefolderproject.md)       |
| `GET`   | `/projects/{projectId}`                                 | [Get a project](https://docs.flora.ai/api/reference/projects/getproject.md)                                                |
| `PATCH` | `/projects/{projectId}`                                 | [Rename a project](https://docs.flora.ai/api/reference/projects/updateproject.md)                                          |
| `POST`  | `/projects/{projectId}/agent-session`                   | [Create an agent browser session for a project](https://docs.flora.ai/api/reference/projects/createprojectagentsession.md) |
| `GET`   | `/projects/{projectId}/sharing`                         | [Get project sharing](https://docs.flora.ai/api/reference/projects/getprojectsharing.md)                                   |
| `PATCH` | `/projects/{projectId}/sharing`                         | [Update project sharing](https://docs.flora.ai/api/reference/projects/updateprojectsharing.md)                             |
| `POST`  | `/projects/{projectId}/share`                           | [Share a project by link](https://docs.flora.ai/api/reference/projects/shareproject.md)                                    |

### Comments

Project comment thread endpoints. [All Comments endpoints](https://docs.flora.ai/api/reference/comments.md).

| Method   | Path                                                                    | Endpoint                                                                                              |
| -------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `GET`    | `/projects/{projectId}/comment-threads`                                 | [List project comment threads](https://docs.flora.ai/api/reference/comments/listcommentthreads.md)    |
| `POST`   | `/projects/{projectId}/comment-threads`                                 | [Create a canvas comment thread](https://docs.flora.ai/api/reference/comments/createcommentthread.md) |
| `GET`    | `/projects/{projectId}/comment-threads/{threadId}`                      | [Get a comment thread](https://docs.flora.ai/api/reference/comments/getcommentthread.md)              |
| `POST`   | `/projects/{projectId}/comment-threads/{threadId}/replies`              | [Reply to a comment thread](https://docs.flora.ai/api/reference/comments/replytocommentthread.md)     |
| `POST`   | `/projects/{projectId}/comment-threads/{threadId}/resolve`              | [Resolve a comment thread](https://docs.flora.ai/api/reference/comments/resolvecommentthread.md)      |
| `POST`   | `/projects/{projectId}/comment-threads/{threadId}/reopen`               | [Reopen a comment thread](https://docs.flora.ai/api/reference/comments/reopencommentthread.md)        |
| `DELETE` | `/projects/{projectId}/comment-threads/{threadId}/comments/{commentId}` | [Delete a comment](https://docs.flora.ai/api/reference/comments/deletecomment.md)                     |

### Skills

Workspace-skill and user-skill management endpoints. [All Skills endpoints](https://docs.flora.ai/api/reference/skills.md).

| Method | Path                                         | Endpoint                                                                                       |
| ------ | -------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `GET`  | `/workspaces/{workspaceId}/skills`           | [List workspace skills](https://docs.flora.ai/api/reference/skills/listworkspaceskills.md)     |
| `POST` | `/workspaces/{workspaceId}/skills`           | [Create a workspace skill](https://docs.flora.ai/api/reference/skills/createworkspaceskill.md) |
| `GET`  | `/workspaces/{workspaceId}/skills/{skillId}` | [Get a workspace skill](https://docs.flora.ai/api/reference/skills/getworkspaceskill.md)       |
| `GET`  | `/skills`                                    | [List your skills](https://docs.flora.ai/api/reference/skills/listuserskills.md)               |
| `GET`  | `/skills/{skillId}`                          | [Get a skill](https://docs.flora.ai/api/reference/skills/getuserskill.md)                      |

### Models

Model catalog endpoints. [All Models endpoints](https://docs.flora.ai/api/reference/models.md).

| Method | Path      | Endpoint                                                                          |
| ------ | --------- | --------------------------------------------------------------------------------- |
| `GET`  | `/models` | [List available models](https://docs.flora.ai/api/reference/models/listmodels.md) |

### Techniques

Technique catalog endpoints. [All Techniques endpoints](https://docs.flora.ai/api/reference/techniques.md).

| Method | Path                        | Endpoint                                                                            |
| ------ | --------------------------- | ----------------------------------------------------------------------------------- |
| `GET`  | `/techniques`               | [List techniques](https://docs.flora.ai/api/reference/techniques/listtechniques.md) |
| `GET`  | `/techniques/{techniqueId}` | [Get a technique](https://docs.flora.ai/api/reference/techniques/gettechnique.md)   |

### Technique Runs

Nested technique run endpoints. [All Technique Runs endpoints](https://docs.flora.ai/api/reference/technique-runs.md).

| Method | Path                                     | Endpoint                                                                                              |
| ------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `POST` | `/techniques/{techniqueId}/runs`         | [Start a technique run](https://docs.flora.ai/api/reference/technique-runs/starttechniquerun.md)      |
| `GET`  | `/techniques/{techniqueId}/runs/{runId}` | [Get a technique run](https://docs.flora.ai/api/reference/technique-runs/gettechniquerun.md)          |
| `GET`  | `/technique-runs`                        | [List technique run history](https://docs.flora.ai/api/reference/technique-runs/listtechniqueruns.md) |

### Assets

Asset upload and retrieval endpoints. [All Assets endpoints](https://docs.flora.ai/api/reference/assets.md).

| Method | Path                         | Endpoint                                                                                              |
| ------ | ---------------------------- | ----------------------------------------------------------------------------------------------------- |
| `POST` | `/assets/resolve`            | [Resolve asset ids to URLs](https://docs.flora.ai/api/reference/assets/resolveassets.md)              |
| `GET`  | `/assets`                    | [List assets](https://docs.flora.ai/api/reference/assets/listassets.md)                               |
| `POST` | `/assets`                    | [Create an asset upload](https://docs.flora.ai/api/reference/assets/uploadasset.md)                   |
| `GET`  | `/assets/{assetId}`          | [Get an asset](https://docs.flora.ai/api/reference/assets/getasset.md)                                |
| `POST` | `/assets/reserve`            | [Reserve signed uploads in bulk](https://docs.flora.ai/api/reference/assets/reserveassetuploads.md)   |
| `POST` | `/assets/{assetId}/complete` | [Complete a signed asset upload](https://docs.flora.ai/api/reference/assets/completeassetupload.md)   |
| `POST` | `/assets/complete`           | [Complete signed uploads in bulk](https://docs.flora.ai/api/reference/assets/completeassetuploads.md) |
| `POST` | `/assets/{assetId}/retry`    | [Retry a signed asset upload](https://docs.flora.ai/api/reference/assets/retryassetupload.md)         |

### Library

Library folder and saved-image endpoints. [All Library endpoints](https://docs.flora.ai/api/reference/library.md).

| Method   | Path                                                         | Endpoint                                                                                                |
| -------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- |
| `POST`   | `/workspaces/{workspaceId}/library/folders`                  | [Create a library folder](https://docs.flora.ai/api/reference/library/createlibraryfolder.md)           |
| `POST`   | `/workspaces/{workspaceId}/library/folders/{folderId}/items` | [Add an image to a library folder](https://docs.flora.ai/api/reference/library/addlibraryfolderitem.md) |
| `DELETE` | `/workspaces/{workspaceId}/library/folders/{folderId}`       | [Delete a library folder](https://docs.flora.ai/api/reference/library/deletelibraryfolder.md)           |

### Runs

Top-level run creation endpoints. [All Runs endpoints](https://docs.flora.ai/api/reference/runs.md).

| Method | Path            | Endpoint                                                                           |
| ------ | --------------- | ---------------------------------------------------------------------------------- |
| `GET`  | `/runs/{runId}` | [Get a run](https://docs.flora.ai/api/reference/runs/getrun.md)                    |
| `POST` | `/runs/action`  | [Start an action run](https://docs.flora.ai/api/reference/runs/createactionrun.md) |

### Canvas

Project canvas endpoints. [All Canvas endpoints](https://docs.flora.ai/api/reference/canvas.md).

| Method  | Path                                                                                                       | Endpoint                                                                                                    |
| ------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `POST`  | `/projects/{projectId}/actions`                                                                            | [Create a canvas action](https://docs.flora.ai/api/reference/canvas/createcanvasaction.md)                  |
| `POST`  | `/projects/{projectId}/actions/{nodeId}/run`                                                               | [Run a canvas action](https://docs.flora.ai/api/reference/canvas/runcanvasaction.md)                        |
| `GET`   | `/projects/{projectId}/actions/{nodeId}`                                                                   | [Get a canvas action](https://docs.flora.ai/api/reference/canvas/getcanvasaction.md)                        |
| `PATCH` | `/projects/{projectId}/actions/{nodeId}`                                                                   | [Update a canvas action](https://docs.flora.ai/api/reference/canvas/updatecanvasaction.md)                  |
| `GET`   | `/workspaces/{workspaceId}/projects/{projectId}/canvas/definition`                                         | [Get a canvas definition](https://docs.flora.ai/api/reference/canvas/getprojectcanvasdefinition.md)         |
| `PUT`   | `/workspaces/{workspaceId}/projects/{projectId}/canvas/definition`                                         | [Replace a canvas definition](https://docs.flora.ai/api/reference/canvas/replaceprojectcanvasdefinition.md) |
| `GET`   | `/workspaces/{workspaceId}/projects/{projectId}/graph`                                                     | [Get a project graph](https://docs.flora.ai/api/reference/canvas/getprojectgraph.md)                        |
| `POST`  | `/workspaces/{workspaceId}/projects/{projectId}/canvas/changeset`                                          | [Apply a canvas changeset](https://docs.flora.ai/api/reference/canvas/applycanvaschangeset.md)              |
| `POST`  | `/workspaces/{workspaceId}/projects/{projectId}/canvas/arrange`                                            | [Arrange canvas nodes](https://docs.flora.ai/api/reference/canvas/arrangecanvasnodes.md)                    |
| `POST`  | `/workspaces/{workspaceId}/projects/{projectId}/nodes/run`                                                 | [Run canvas nodes](https://docs.flora.ai/api/reference/canvas/runcanvasnodes.md)                            |
| `GET`   | `/workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document`                                   | [Get a node's document](https://docs.flora.ai/api/reference/canvas/getcanvasnodedocument.md)                |
| `GET`   | `/workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document/slides/{slideId}`                  | [Get one slide of a deck node](https://docs.flora.ai/api/reference/canvas/getcanvasdeckslide.md)            |
| `GET`   | `/workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document/slides/{slideId}/layers/{layerId}` | [Get one layer of a deck slide](https://docs.flora.ai/api/reference/canvas/getcanvasdecklayer.md)           |
| `GET`   | `/projects/{projectId}/nodes`                                                                              | [List project canvas nodes](https://docs.flora.ai/api/reference/canvas/listcanvasnodes.md)                  |
| `POST`  | `/projects/{projectId}/assets/{assetId}/attach`                                                            | [Attach an asset to a canvas](https://docs.flora.ai/api/reference/canvas/attachcanvasasset.md)              |

### Feedback

Product feedback endpoints. [All Feedback endpoints](https://docs.flora.ai/api/reference/feedback.md).

| Method | Path        | Endpoint                                                                                  |
| ------ | ----------- | ----------------------------------------------------------------------------------------- |
| `POST` | `/feedback` | [Record product feedback](https://docs.flora.ai/api/reference/feedback/recordfeedback.md) |

### Generations

Generation endpoints. [All Generations endpoints](https://docs.flora.ai/api/reference/generations.md).

| Method | Path           | Endpoint                                                                                      |
| ------ | -------------- | --------------------------------------------------------------------------------------------- |
| `POST` | `/generate`    | [Start a generation](https://docs.flora.ai/api/reference/generations/startgeneration.md)      |
| `GET`  | `/generations` | [List generation history](https://docs.flora.ai/api/reference/generations/listgenerations.md) |

### LoRAs

LoRA training and saved Style readiness endpoints. [All LoRAs endpoints](https://docs.flora.ai/api/reference/loras.md).

| Method | Path               | Endpoint                                                                                                      |
| ------ | ------------------ | ------------------------------------------------------------------------------------------------------------- |
| `GET`  | `/loras/trainers`  | [Discover LoRA trainers and compatible models](https://docs.flora.ai/api/reference/loras/listloratrainers.md) |
| `POST` | `/loras/train`     | [Train and save a LoRA Style](https://docs.flora.ai/api/reference/loras/trainlora.md)                         |
| `GET`  | `/loras/{styleId}` | [Get a saved LoRA Style](https://docs.flora.ai/api/reference/loras/getlora.md)                                |

This reference is generated from version 5.66.0 of the FLORA OpenAPI spec.

Using an AI agent instead of code? See [FLORA MCP](https://docs.flora.ai/mcp.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flora.ai/api/reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
