Frevana S3
Upload any local file to S3 storage through Frevana's POST /s3/custom-upload-url universal API and return its public URL, file key, and content ID.
Prerequisites & Authentication
- One local file path (
--file <path>)
FREVANA_TOKEN (or --token) or FREVANA_API_KEY (or --api-key) in the environment
curl, bash, and python3
- Network access to
${FREVANA_API_BASE_URL:-https://api.frevana.com}
Universal API Contract
The skill communicates with POST /s3/custom-upload-url:
scene_type: Fixed to universal.
file_extension: Required by API. Auto-detected from filename (e.g. jpg, png, pdf, mp4, json), or overridden with --file-extension.
content_type: Required by API. Auto-detected MIME type (e.g. image/png, video/mp4, application/pdf), or overridden with --content-type.
file_key: Pass only when updating existing content (--file-key <key>). Omitted for new uploads.
file_title: Optional. Defaults to filename stem without extension, or overridden with --title.
- Optional Metadata (can be omitted):
agent_id, task_id, team_id
publish_type (frevana_community, only_share_link, custom_domain, custom_domain_and_frevana_community)
tags (string array or comma-separated list)
category (faq, guides, report, product_comparison, landing_page, knowledge_page, agent_app_result)
preview_image_url, description, language_code
Execution Workflow
- Detect File Properties: Inspect the target file and resolve its extension, MIME type, and title.
- Request Presigned Upload URL: Send
POST /s3/custom-upload-url with scene_type=universal and the Frevana Bearer token.
- Upload to S3: Upload the file payload directly to
presigned_url using curl -X PUT with Content-Type: <content_type>. The Frevana Bearer token is never sent to the S3 presigned URL.
- Return Result: Output JSON containing
url, file_key, and content_id.
Invocation Examples
# Basic upload: upload an image or document to S3
bash skills/frevana-s3/scripts/upload_file.sh \
--file ./charts/revenue_q3.png
# Update an existing object using its previous file_key
bash skills/frevana-s3/scripts/upload_file.sh \
--file ./charts/revenue_q3_updated.png \
--file-key "images-dev/user123/revenue_q3.png"
# Upload with custom title and tags
bash skills/frevana-s3/scripts/upload_file.sh \
--file ./reports/annual_analysis.pdf \
--title "Annual Financial Analysis 2026" \
--tags "finance,report,q3" \
--category "report"
# Output only the public URL (convenient for agent pipelines)
bash skills/frevana-s3/scripts/upload_file.sh \
--file ./assets/banner.webp \
--text-only
Options
-f, --file PATH Local file to upload (required)
-k, --file-key KEY Previous file_key; pass only when updating existing content
-t, --title TITLE File title (default: filename stem)
--content-type MIME Override MIME type (default: auto-detected)
--file-extension EXT Override file extension (default: auto-detected)
Optional Metadata:
--agent-id ID Agent ID (or FREVANA_AGENT_ID env)
--task-id ID Task/Thread ID (or FREVANA_TASK_ID / CODEX_THREAD_ID env)
--team-id ID Team ID (or FREVANA_TEAM_ID / CODEX_TEAM_ID env)
--publish-type TYPE Publish type (e.g. only_share_link, custom_domain, frevana_community)
--tags TAGS Tags, comma-separated or JSON array (e.g. "report,v1")
--category CAT Category (e.g. report, guides, faq, agent_app_result)
--preview-image-url URL Preview image URL
--description DESC File description
--language-code CODE Language code (e.g. en, zh, ja)
Output & Auth:
--text-only Output only the public URL
-o, --output FILE Save output JSON to specified file
--dry-run Print payload JSON and exit without network requests
--token TOKEN Frevana Bearer token (or FREVANA_TOKEN env)
--api-key KEY Frevana API key (or FREVANA_API_KEY env)
--api-base-url URL API base URL override (default: https://api.frevana.com)
-h, --help Show this help message
Output Format
By default, the script prints a JSON object:
{
"url": "https://dxxxxx.cloudfront.net/images-dev/user123/abc-123.png",
"file_key": "images-dev/user123/abc-123.png",
"content_id": "121212"
}
- When
--text-only is provided, only the url is printed to stdout.
- To update the content later, callers should persist and reuse the returned
file_key with --file-key.
1---2name: frevana-s33description: Upload any local file (images, videos, PDFs, documents, archives, data files) to S3 via Frevana's universal upload flow (POST /s3/custom-upload-url with scene_type=universal) and return its public URL, file key, and content ID. Use this skill whenever the user asks to upload, host, share, or store arbitrary files in Frevana S3 storage, or update previously uploaded files via file_key.4metadata:5 source: https://skillmd.com/skills/finpeakinc/frevana-s36---78# Frevana S3910Upload any local file to S3 storage through Frevana's `POST /s3/custom-upload-url` universal API and return its public URL, file key, and content ID.1112## Prerequisites & Authentication1314- One local file path (`--file <path>`)15- `FREVANA_TOKEN` (or `--token`) or `FREVANA_API_KEY` (or `--api-key`) in the environment16- `curl`, `bash`, and `python3`17- Network access to `${FREVANA_API_BASE_URL:-https://api.frevana.com}`1819## Universal API Contract2021The skill communicates with `POST /s3/custom-upload-url`:2223- **`scene_type`**: Fixed to `universal`.24- **`file_extension`**: Required by API. Auto-detected from filename (e.g. `jpg`, `png`, `pdf`, `mp4`, `json`), or overridden with `--file-extension`.25- **`content_type`**: Required by API. Auto-detected MIME type (e.g. `image/png`, `video/mp4`, `application/pdf`), or overridden with `--content-type`.26- **`file_key`**: Pass only when updating existing content (`--file-key <key>`). Omitted for new uploads.27- **`file_title`**: Optional. Defaults to filename stem without extension, or overridden with `--title`.28- **Optional Metadata (can be omitted)**:29 - `agent_id`, `task_id`, `team_id`30 - `publish_type` (`frevana_community`, `only_share_link`, `custom_domain`, `custom_domain_and_frevana_community`)31 - `tags` (string array or comma-separated list)32 - `category` (`faq`, `guides`, `report`, `product_comparison`, `landing_page`, `knowledge_page`, `agent_app_result`)33 - `preview_image_url`, `description`, `language_code`3435## Execution Workflow36371. **Detect File Properties**: Inspect the target file and resolve its extension, MIME type, and title.382. **Request Presigned Upload URL**: Send `POST /s3/custom-upload-url` with `scene_type=universal` and the Frevana Bearer token.393. **Upload to S3**: Upload the file payload directly to `presigned_url` using `curl -X PUT` with `Content-Type: <content_type>`. The Frevana Bearer token is never sent to the S3 presigned URL.404. **Return Result**: Output JSON containing `url`, `file_key`, and `content_id`.4142## Invocation Examples4344```bash45# Basic upload: upload an image or document to S346bash skills/frevana-s3/scripts/upload_file.sh \47 --file ./charts/revenue_q3.png4849# Update an existing object using its previous file_key50bash skills/frevana-s3/scripts/upload_file.sh \51 --file ./charts/revenue_q3_updated.png \52 --file-key "images-dev/user123/revenue_q3.png"5354# Upload with custom title and tags55bash skills/frevana-s3/scripts/upload_file.sh \56 --file ./reports/annual_analysis.pdf \57 --title "Annual Financial Analysis 2026" \58 --tags "finance,report,q3" \59 --category "report"6061# Output only the public URL (convenient for agent pipelines)62bash skills/frevana-s3/scripts/upload_file.sh \63 --file ./assets/banner.webp \64 --text-only65```6667## Options6869```text70-f, --file PATH Local file to upload (required)71-k, --file-key KEY Previous file_key; pass only when updating existing content72-t, --title TITLE File title (default: filename stem)73--content-type MIME Override MIME type (default: auto-detected)74--file-extension EXT Override file extension (default: auto-detected)7576Optional Metadata:77--agent-id ID Agent ID (or FREVANA_AGENT_ID env)78--task-id ID Task/Thread ID (or FREVANA_TASK_ID / CODEX_THREAD_ID env)79--team-id ID Team ID (or FREVANA_TEAM_ID / CODEX_TEAM_ID env)80--publish-type TYPE Publish type (e.g. only_share_link, custom_domain, frevana_community)81--tags TAGS Tags, comma-separated or JSON array (e.g. "report,v1")82--category CAT Category (e.g. report, guides, faq, agent_app_result)83--preview-image-url URL Preview image URL84--description DESC File description85--language-code CODE Language code (e.g. en, zh, ja)8687Output & Auth:88--text-only Output only the public URL89-o, --output FILE Save output JSON to specified file90--dry-run Print payload JSON and exit without network requests91--token TOKEN Frevana Bearer token (or FREVANA_TOKEN env)92--api-key KEY Frevana API key (or FREVANA_API_KEY env)93--api-base-url URL API base URL override (default: https://api.frevana.com)94-h, --help Show this help message95```9697## Output Format9899By default, the script prints a JSON object:100101```json102{103 "url": "https://dxxxxx.cloudfront.net/images-dev/user123/abc-123.png",104 "file_key": "images-dev/user123/abc-123.png",105 "content_id": "121212"106}107```108109- When `--text-only` is provided, only the `url` is printed to stdout.110- To update the content later, callers should persist and reuse the returned `file_key` with `--file-key`.