> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryflowy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Flowy is a node-based AI creative platform: you generate images, video, audio, 3D and vector on an infinite Canvas, refine on the Studio timeline, and export or publish from the same project.
> Prefer the Flowy MCP server (https://mcp.tryflowy.ai/mcp) or the REST API at https://apis.tryflowy.ai/v1 for programmatic work. Install with `flowy mcp install` from the @tryflowy/cli package.
> Credits are workspace-scoped. Generations reserve credits on start and only deduct on success, so failed runs refund automatically.

# Upload an asset

> Add media to your library by signed upload or by URL.

Assets you upload through the API appear in your library. There are two ways in, and both need the `assets:write` [scope](https://docs.tryflowy.ai/api/permissions.md).

## Upload a file

**1. Start the upload**

`POST /v1/assets/upload-url` with `fileName`, `contentType` and `sizeBytes`. Send `durationSec`, `width` and `height` when you know them: they are stored as declared, and tools that bill or limit by length read them. The response gives an `assetId`, an `uploadUrl` and the `headers` to send.

**2. PUT the bytes**

`PUT` the file to `uploadUrl` with exactly the returned `headers`. A request without them is rejected by storage.

**3. Confirm**

`POST /v1/assets/{assetId}/confirm`. Flowy verifies the file landed, runs moderation and marks the asset ready, then returns the asset. A confirm before the upload finished returns `409` with `code` set to `upload_incomplete`; a blocked file returns `422`.

A file above the size cap for its kind returns `413` with `code` set to `too_large`.

## Import from URLs

`POST /v1/assets/import-url` fetches up to 8 public `https` URLs server-side and stores each as an asset. Pass `projectId` to attach them to a project. Failures are reported per item, so one bad URL does not fail the others.

Read the result with [Get an asset](https://docs.tryflowy.ai/api/get-asset.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.