cloud-video-production-client
Integrate trusted customer servers or local agents with the Firefly Cloud Video Production API. Use when uploading explicitly selected local image/video files, submitting local or URL assets for asynchronous cloud template production, tracking a production by conversation_id, retrieving the final video, handling idempotent retries, receiving signed production webhooks, or diagnosing public API errors from /api/rest/mva/out/cloud endpoints.
How do I install this agent skill?
npx skills add https://github.com/gracefullliam/mp-agent-skills --skill cloud-video-production-clientIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides a robust client for cloud video production, managing local file uploads to Tencent COS and tracking asynchronous production tasks. It demonstrates a high standard of security maturity by mandating environment-specific secrets, implementing strict input validation, and providing comprehensive integration documentation.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Cloud Video Production Client
Integrate with the asynchronous Cloud template-production service. Keep customer credentials outside prompts, source code, logs, and generated documents.
Load references
- Read
references/api-contract.mdbefore constructing or interpreting any API request. - Read
references/webhook-contract.mdwhencallback_urlis used or a webhook receiver is implemented. - Read
references/integration-checklist.mdbefore integration review, test handoff, or go-live. - Use
references/openapi.yamlwhen a machine-readable contract, SDK generation, or schema validation is needed. - Run
scripts/make_from_local_media.pywithuv run --scriptfor local images, local videos, or mixed local media instead of reimplementing the direct-upload workflow.
Resolve connection settings
Require these values from the customer's deployment configuration:
base_url: environment-specific Agent gateway origin; never guess a production URL.api_key: load the production credential only fromFIREFLY_MVA_PROD_API_KEY; requireproducescope.callback_secret: required only when verifying Webhook signatures; obtain it through the agreed secure channel.
Send the value of FIREFLY_MVA_PROD_API_KEY as X-API-Key from a server or secret manager. Never read a generic API_KEY/X_API_KEY or another environment credential as a fallback. Never place the key in browser code or ask the user to paste a real value into chat.
The service operator creates the credential from the database-backed credential control plane and delivers it once through an approved secure channel. Customers do not self-register a key through the public Cloud endpoints; later list operations cannot recover the plaintext.
Prepare assets
Accept either HTTP/HTTPS media URLs or local files that the current trusted runtime is allowed to read.
For each explicitly selected local file:
- Resolve the path inside the runtime's approved read scope. Do not scan a home directory, expand an unspecified directory recursively, or upload a file the user did not select.
- Prefer the bundled
scripts/make_from_local_media.pyrunner. It accepts repeated--inputvalues, so one request may contain images, videos, or both. - Compute size, MIME type, and SHA-256, then send metadata only to
POST /api/rest/mva/out/cloud/upload/init. - Keep the returned object-scoped COS credentials in memory and use the Tencent COS SDK high-level transfer API with every required header. Let the SDK choose single PUT or multipart internally; do not branch on file size.
- Send only
upload_idtoPOST /api/rest/mva/out/cloud/upload/complete. Require one non-emptydata.files[]descriptor before/make. - Map
type,url, andcontent_sha256to canonicalassets[], then submit/make.
Do not embed local bytes or Base64 in prompts or /make. Do not fall back to gateway multipart when direct upload fails. The legacy /upload endpoint is only for an explicitly requested compatibility diagnostic.
For an end-to-end local-media task, run:
uv run --script scripts/make_from_local_media.py \
--base-url https://customer-configured-agent-host \
--input /approved/media/photo.jpg \
--input /approved/media/clip.mp4 \
--intent "生成一条节奏明快的短片" \
--output-dir ./outputs \
--wait
The runner reads only FIREFLY_MVA_PROD_API_KEY. It writes a credential-free state file before upload, never prints signed URLs or temporary COS credentials, and downloads the final video only when --wait is present.
If the runtime cannot read the user's device—for example, a browser-only or remote cloud agent given only a local path—ask the user to attach the file through the host product or move it into an accessible workspace. Never pretend the path was uploaded.
Select the workflow
Create and Poll
Use this as the default integration path.
- Generate one stable
outer_request_idfor the customer's business operation. - Upload explicitly selected local files and normalize all local/URL inputs into canonical
assets[]. - Submit
POST /api/rest/mva/out/cloud/makewith canonical fields only. - Persist
conversation_id,outer_request_id, andrequest_idfrom the response. - Poll
POST /api/rest/mva/out/cloud/pollevery 3–5 seconds. - Stop on
completed,failed, orcancelled. - After completion, call
POST /api/rest/mva/out/cloud/queryResultwhen the detailed final material or poster is required.
Create and Webhook
Use this when the customer has a public HTTPS receiver.
- Register the receiver and signing secret before submitting a task.
- Include
callback_url; omitcallback_eventsto receive the default terminal events. - Verify the signature against the raw request bytes before parsing JSON.
- Deduplicate deliveries by
event_idorX-MP-Video-Delivery. - Return 2xx promptly, then process asynchronously.
- Use
queryResultfor reconciliation. Do not run continuous Poll merely because a callback was configured; Poll only for recovery or an explicit user action.
Enforce request rules
- Send flat JSON to upload init/complete, make, Poll, and queryResult. Never wrap those bodies in
content,BaseRequest, or another envelope. - Use only documented
assets[]fields such asasset_id,asset_type,asset_url, andcontent_sha256; do not invent aliases. - Do not send
productId,userId,project_id,conversation_id,templateCode, aspect ratio, high-light timestamps, or template candidates on task creation. - Treat unknown fields as invalid because the public request models use
extra="forbid". - Provide HTTP/HTTPS asset URLs that the Agent service can access.
/makeaccepts JSON references and never file bytes. - Treat
user_intentas optional text or the documented object. Text is trimmed and truncated to 200 Unicode characters.
Handle responses
Inspect both HTTP status and body code. Branch on code, not the message text.
200: request succeeded.- Require
/upload/completeto return onedata.files[]item with a non-emptyurlbefore calling/make. 409102: idempotent replay. Adopt the returned existingconversation_id; do not create another task.409103or409104: terminal production failure or cancellation; stop waiting.429100: wait forRetry-After, then retry with the sameouter_request_id.- For
/make, handle503100or503101with bounded exponential backoff and the sameouter_request_id. Retry/upload/completewith the sameupload_idafter an ambiguous response; never reuse object-scoped credentials for another file. 400100,401100,403100,404100,413100,422100,422101: fix the request, upload type/size, credential, task identifier, callback, or asset; do not blind-retry.
Retry network failures and ambiguous submit responses with the same outer_request_id. Generate a new outer_request_id only for an intentional new production.
Preserve traceability
Log safe identifiers only:
- environment and request time with timezone
X-Request-IDouter_request_idconversation_id- HTTP status, body
code, taskstatus, andcurrent_node - Webhook
event_id
Never log API keys, callback secrets, signed asset query strings, raw credentials, or full customer media content. Never log local absolute paths. A basename may still be sensitive; include it only when the customer's logging policy allows it.
Produce integration artifacts
When helping a customer implement or review an integration, produce:
- environment and credential placeholders
- request/response field mapping
- idempotency and retry policy
- Poll or Webhook state machine
- webhook verification and deduplication checklist when applicable
- error-code handling table
- smoke-test and launch-readiness checklist
Do not claim production readiness until the customer has passed the checklist in references/integration-checklist.md.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/gracefullliam/mp-agent-skills/cloud-video-production-client">View cloud-video-production-client on skillZs</a>