Content resources represent files in your agent’s workspace — generated outputs (images, videos, audio) and manually uploaded assets. The asset library provides a unified view with folder organization, and direct upload lets you send files straight to S3 for maximum performance.
Returns a paginated list of content resources belonging to the agent. Results are ordered by most recent first.
GET /v1/content_resources
Parameter Type Required Description agent_idinteger Yes The agent whose resources to list. typestring No Filter by file type: image, video, audio, zip, or safe_tensors. project_idinteger No Filter to resources attached to a specific project. idsarray No Return only resources matching these IDs. pageinteger No Page number for pagination (default 0, 20 items per page).
"url" : " https://cdn.gen.pro/uploads/abc123.png " ,
"thumbnail_url" : " https://cdn.gen.pro/uploads/abc123_thumb.png " ,
"file_name" : " product-hero.png " ,
"content_type" : " image/png "
"url" : " https://cdn.gen.pro/uploads/def456.mp4 " ,
"file_name" : " intro-clip.mp4 " ,
"content_type" : " video/mp4 "
# All resources for an agent
curl " https://api.gen.pro/v1/content_resources?agent_id=42 " \
-H " X-API-Key: your-api-key "
curl " https://api.gen.pro/v1/content_resources?agent_id=42&type=image&page=2 " \
-H " X-API-Key: your-api-key "
Status Error code Description 401unauthorizedMissing or invalid API key. 404not_foundAgent not found or not accessible.
Uploads a new file as a content resource. The file must be sent as a multipart form upload. Optionally place the resource in an asset folder.
POST /v1/content_resources
Parameter Type Required Description agent_idinteger Yes The agent to create the resource under. content_resource[file]file Yes The file to upload (multipart). Accepted types: images, videos, audio, zip, safetensors. asset_folder[id]integer No Place the resource inside this asset folder.
"url" : " https://cdn.gen.pro/uploads/ghi789.png " ,
"thumbnail_url" : " https://cdn.gen.pro/uploads/ghi789_thumb.png " ,
"file_name" : " banner.png " ,
"content_type" : " image/png "
curl -X POST " https://api.gen.pro/v1/content_resources?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-F " content_resource[file]=@/path/to/banner.png "
curl -X POST " https://api.gen.pro/v1/content_resources?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-F " content_resource[file]=@/path/to/banner.png " \
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to create resources for this agent. 422content_resource_creation_failedValidation failed (e.g., unsupported file type, missing file).
Returns a single content resource with full details, including the generating job if the resource was produced by an AI generation task.
GET /v1/content_resources/:id
Parameter Type Required Description agent_idinteger Yes The agent that owns the resource. idinteger Yes The content resource ID (path parameter).
"url" : " https://cdn.gen.pro/uploads/abc123.png " ,
"thumbnail_url" : " https://cdn.gen.pro/uploads/abc123_thumb.png " ,
"file_name" : " product-hero.png " ,
"content_type" : " image/png "
"type" : " image_from_text "
curl " https://api.gen.pro/v1/content_resources/5012?agent_id=42 " \
-H " X-API-Key: your-api-key "
Status Error code Description 401unauthorizedMissing or invalid API key. 404content_resource_not_foundResource does not exist or does not belong to this agent.
Renames the file associated with a content resource.
PATCH /v1/content_resources/:id
Parameter Type Required Description agent_idinteger Yes The agent that owns the resource. idinteger Yes The content resource ID (path parameter). content_resource[filename]string Yes The new filename for the resource.
Returns 200 OK with an empty body on success.
curl -X PATCH " https://api.gen.pro/v1/content_resources/5012?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
-d ' {"content_resource": {"filename": "hero-banner-v2.png"}} '
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to update resources for this agent. 404not_foundResource not found. 422validation_errorInvalid filename or other validation failure.
Permanently deletes a content resource and its associated file.
DELETE /v1/content_resources/:id
Parameter Type Required Description agent_idinteger Yes The agent that owns the resource. idinteger Yes The content resource ID (path parameter).
Returns 200 OK with an empty body on success.
curl -X DELETE " https://api.gen.pro/v1/content_resources/5012?agent_id=42 " \
-H " X-API-Key: your-api-key "
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to delete resources for this agent. 404not_foundResource not found. 422validation_errorResource could not be deleted.
Returns a paginated, unified view of the agent’s asset library. This combines content resources (files) and asset folders into a single list, with support for filtering by type, folder, and search.
Parameter Type Required Description agent_idinteger Yes The agent whose asset library to list. folder_idinteger No Show contents of a specific folder. Omit to show root-level items. asset_typestring No Comma-separated filter: image, video, audio, folder. Example: image,video. searchstring No Search assets by name. orderstring No Sort order. Use recent for newest first (default: folders first, then newest). pageinteger No Page number (default 1). page_sizeinteger No Items per page (default 20).
Items are polymorphic. Content resources include file details; folders include a name.
"type" : " ContentResource " ,
"url" : " https://cdn.gen.pro/uploads/abc123.png " ,
"thumbnail_url" : " https://cdn.gen.pro/uploads/abc123_thumb.png " ,
"file_name" : " product-hero.png " ,
"content_type" : " image/png "
"type" : " ContentResource " ,
"url" : " https://cdn.gen.pro/uploads/def456.mp4 " ,
"file_name" : " intro-clip.mp4 " ,
"content_type" : " video/mp4 "
curl " https://api.gen.pro/v1/asset_libraries?agent_id=42 " \
-H " X-API-Key: your-api-key "
# Inside a folder, images only
curl " https://api.gen.pro/v1/asset_libraries?agent_id=42&folder_id=15&asset_type=image " \
-H " X-API-Key: your-api-key "
curl " https://api.gen.pro/v1/asset_libraries?agent_id=42&search=banner " \
-H " X-API-Key: your-api-key "
Status Error code Description 401unauthorizedMissing or invalid API key. 404not_foundAgent or folder not found.
Creates a new folder in the agent’s asset library. Folders can be nested by specifying a parent_id.
Parameter Type Required Description agent_idinteger Yes The agent to create the folder under. asset_folder[name]string Yes Name of the folder. asset_folder[parent_id]integer No ID of the parent folder for nesting. Omit to create at root level.
curl -X POST " https://api.gen.pro/v1/asset_folders?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
-d ' {"asset_folder": {"name": "Campaign Q3"}} '
curl -X POST " https://api.gen.pro/v1/asset_folders?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
-d ' {"asset_folder": {"name": "Thumbnails", "parent_id": 15}} '
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to modify this agent’s assets. 422validation_errorInvalid folder name or parent.
Renames an existing asset folder.
PATCH /v1/asset_folders/:id
Parameter Type Required Description agent_idinteger Yes The agent that owns the folder. idinteger Yes The asset folder ID (path parameter). asset_folder[name]string Yes The new folder name.
curl -X PATCH " https://api.gen.pro/v1/asset_folders/15?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
-d ' {"asset_folder": {"name": "Brand Assets 2026"}} '
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to modify this agent’s assets. 404not_foundFolder not found or does not belong to this agent. 422validation_errorInvalid folder name.
Permanently deletes an asset folder and all of its contents (subfolders and files).
DELETE /v1/asset_folders/:id
Parameter Type Required Description agent_idinteger Yes The agent that owns the folder. idinteger Yes The asset folder ID (path parameter).
Returns 200 OK with an empty body on success.
curl -X DELETE " https://api.gen.pro/v1/asset_folders/16?agent_id=42 " \
-H " X-API-Key: your-api-key "
Status Error code Description 401unauthorizedMissing or invalid API key. 403forbiddenYou do not have permission to delete this agent’s assets. 404not_foundFolder not found or does not belong to this agent. 422folder_removal_failedFolder could not be deleted.
Returns a pre-signed S3 URL for uploading a file directly from the client. This is the recommended approach for large files — the upload goes straight to S3 without passing through the API server.
Workflow:
Call this endpoint with file metadata to get a signed upload URL.
PUT the file bytes to the returned direct_upload.url with the provided headers.
Use the returned signed_id as the content_resource[file] value when creating a content resource.
Parameter Type Required Description blob[filename]string Yes Original filename including extension. blob[byte_size]integer Yes File size in bytes. Maximum 1 GB. blob[checksum]string Yes Base64-encoded MD5 checksum of the file. blob[content_type]string Yes MIME type (e.g., image/png, video/mp4). blob[metadata]object No Arbitrary key-value metadata to attach to the blob.
"filename" : " hero-video.mp4 " ,
"content_type" : " video/mp4 " ,
"checksum" : " x8F1TrG7p+mAWjK7Yv3QZA== " ,
"signed_id" : " eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaH... " ,
"url" : " https://s3.amazonaws.com/gen-uploads/abcdef123456?X-Amz-Signature=... " ,
"Content-Type" : " video/mp4 " ,
"Content-MD5" : " x8F1TrG7p+mAWjK7Yv3QZA== "
# Step 1: Get the signed upload URL
curl -X POST https://api.gen.pro/v1/direct_upload \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
"filename": "hero-video.mp4",
"checksum": "x8F1TrG7p+mAWjK7Yv3QZA==",
"content_type": "video/mp4"
# Step 2: Upload the file directly to S3
curl -X PUT " https://s3.amazonaws.com/gen-uploads/abcdef123456?X-Amz-Signature=... " \
-H " Content-Type: video/mp4 " \
-H " Content-MD5: x8F1TrG7p+mAWjK7Yv3QZA== " \
--data-binary @hero-video.mp4
# Step 3: Create the content resource using the signed_id
curl -X POST " https://api.gen.pro/v1/content_resources?agent_id=42 " \
-H " X-API-Key: your-api-key " \
-H " Content-Type: application/json " \
-d ' {"content_resource": {"file": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaH..."}} '
Status Error code Description 401unauthorizedMissing or invalid API key. 422invalid_content_typeThe MIME type is not in the accepted list. 422file_size_exceededFile exceeds the 1 GB maximum. 422direct_upload_failedUnexpected error creating the upload.