{"id":"7e2af1b9-6254-4527-8627-5f8bdfa760f3","entityType":"agent","slug":"clawhub-pruna-ai-pruna-api","name":"pruna-api","canonicalUrl":"https://www.xpersona.co/agent/clawhub-pruna-ai-pruna-api","canonicalPath":"/agent/clawhub-pruna-ai-pruna-api","generatedAt":"2026-10-11T21:51:08.479Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":null},"description":"Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s173djpkkm1x4yfzg522h5vfp989mrn5:pruna-api","sourceUrl":"https://clawhub.ai/pruna-ai/pruna-api","homepage":"https://clawhub.ai/pruna-ai/skills/pruna-api","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/pruna-ai/pruna-api","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/pruna-ai/skills/pruna-api","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"pruna-api technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":null},"stars":null,"forks":null,"downloads":1007,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.14","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:49:25.129Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T18:49:25.196Z","lastCrawledAt":"2026-10-11T18:49:25.129Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T18:49:25.129Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.14","createdAt":"2026-09-29T15:32:56.818Z","changelog":"- Bumped version to 1.0.14. - Updated documentation in SKILL.md and references/pruna-models.md. - Removed deprecated skill-card.md file.","fileCount":9,"zipByteSize":11715},{"version":"1.0.13","createdAt":"2026-09-17T13:54:41.795Z","changelog":"- Updated video skill recommendations to include `p-video-2-pro` for cinematic clips and clarified use cases for each video skill. - Improved \"When NOT to use\" and \"Related skills\" sections for clearer tool selection. - Removed the deprecated `skill-card.md` file. - Version bump to 1.0.13.","fileCount":9,"zipByteSize":12066},{"version":"1.0.12","createdAt":"2026-09-10T13:53:21.008Z","changelog":"Version 1.0.12 - Updated alternative skill recommendations for more granular control and higher quality generation (new skills: p-image-ideogram, p-video-2). - Expanded related skills lists with additional descriptions and install instructions. - Improved guidance on when to use (and not use) this skill in SKILL.md. - Removed deprecated skill-card.md file.","fileCount":9,"zipByteSize":11665},{"version":"1.0.11","createdAt":"2026-09-03T14:08:27.451Z","changelog":"- Updated version to 1.0.11. - Documentation files in the references/ directory updated for clarity and completeness. - Removed outdated skill-card.md file. - No functional or API changes; documentation and content cleanup only.","fileCount":9,"zipByteSize":11402},{"version":"1.0.10","createdAt":"2026-08-28T07:54:40.671Z","changelog":"- Bumped version to 1.0.10. - Removed the file skill-card.md. - No functional changes to core documentation or features.","fileCount":9,"zipByteSize":11435},{"version":"1.0.9","createdAt":"2026-08-04T06:16:45.051Z","changelog":"- Updated `p-image` description to specify use for fastest, cheapest photo generation and clarify limitations for photoreal or in-image text needs. - Removed the file `skill-card.md`. - Version bumped from 1.0.8 to 1.0.9. - General documentation copy improvements in SKILL.md for clarity and guidance.","fileCount":9,"zipByteSize":11303},{"version":"1.0.8","createdAt":"2026-07-28T17:19:02.170Z","changelog":"pruna-api 1.0.8 - Updated agent usage instructions: now directs agents to open `generation-diversity` clarification intake if media path, voice, or brand is unspecified before uploads. - Removed the skill-card.md file. - Documentation refinements to agent guidance; clarified not to invent model payloads and reinforced use of matching tool skills. - Incremented version metadata.","fileCount":9,"zipByteSize":11145},{"version":"1.0.7","createdAt":"2026-07-23T12:33:41.318Z","changelog":"pruna-api 1.0.7 changelog: - Updated documentation in SKILL.md for clearer guidance on usage, installation, and when to use related skills. - Expanded \"When to use\"/\"When NOT to use\" sections to help users select the correct skill for their task. - Improved instructions on handling API credentials and agent safety before making paid calls. - Added references to additional documentation for onboarding and advanced usage. - Clarified agent habits and requirements for invoking `pruna-api` in workflows.","fileCount":9,"zipByteSize":10951}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s173djpkkm1x4yfzg522h5vfp989mrn5:pruna-api","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s173djpkkm1x4yfzg522h5vfp989mrn5:pruna-api` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/pruna-ai/pruna-api before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T21:51:08.449Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-pruna-ai-pruna-api/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":null},"readme":"Skill: pruna-api\n\nOwner: pruna-ai\n\nSummary: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\n\nTags: ai:1.0.14, generative:1.0.14, latest:1.0.14, pruna:1.0.14\n\nVersion history:\n\nv1.0.14 | 2026-09-29T15:32:56.818Z | auto\n\n- Bumped version to 1.0.14.\n- Updated documentation in SKILL.md and references/pruna-models.md.\n- Removed deprecated skill-card.md file.\n\nv1.0.13 | 2026-09-17T13:54:41.795Z | auto\n\n- Updated video skill recommendations to include `p-video-2-pro` for cinematic clips and clarified use cases for each video skill.\n- Improved \"When NOT to use\" and \"Related skills\" sections for clearer tool selection.\n- Removed the deprecated `skill-card.md` file.\n- Version bump to 1.0.13.\n\nv1.0.12 | 2026-09-10T13:53:21.008Z | auto\n\nVersion 1.0.12\n\n- Updated alternative skill recommendations for more granular control and higher quality generation (new skills: p-image-ideogram, p-video-2).\n- Expanded related skills lists with additional descriptions and install instructions.\n- Improved guidance on when to use (and not use) this skill in SKILL.md.\n- Removed deprecated skill-card.md file.\n\nv1.0.11 | 2026-09-03T14:08:27.451Z | auto\n\n- Updated version to 1.0.11.\n- Documentation files in the references/ directory updated for clarity and completeness.\n- Removed outdated skill-card.md file.\n- No functional or API changes; documentation and content cleanup only.\n\nv1.0.10 | 2026-08-28T07:54:40.671Z | auto\n\n- Bumped version to 1.0.10.\n- Removed the file skill-card.md.\n- No functional changes to core documentation or features.\n\nv1.0.9 | 2026-08-04T06:16:45.051Z | auto\n\n- Updated `p-image` description to specify use for fastest, cheapest photo generation and clarify limitations for photoreal or in-image text needs.\n- Removed the file `skill-card.md`.\n- Version bumped from 1.0.8 to 1.0.9.\n- General documentation copy improvements in SKILL.md for clarity and guidance.\n\nv1.0.8 | 2026-07-28T17:19:02.170Z | auto\n\npruna-api 1.0.8\n\n- Updated agent usage instructions: now directs agents to open `generation-diversity` clarification intake if media path, voice, or brand is unspecified before uploads.\n- Removed the skill-card.md file.\n- Documentation refinements to agent guidance; clarified not to invent model payloads and reinforced use of matching tool skills. \n- Incremented version metadata.\n\nv1.0.7 | 2026-07-23T12:33:41.318Z | auto\n\npruna-api 1.0.7 changelog:\n\n- Updated documentation in SKILL.md for clearer guidance on usage, installation, and when to use related skills.\n- Expanded \"When to use\"/\"When NOT to use\" sections to help users select the correct skill for their task.\n- Improved instructions on handling API credentials and agent safety before making paid calls.\n- Added references to additional documentation for onboarding and advanced usage.\n- Clarified agent habits and requirements for invoking `pruna-api` in workflows.\n\nArchive index:\n\nArchive v1.0.14: 9 files, 11715 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3066b), references/pruna-api.md (5837b), references/pruna-models.md (4438b), references/replicate-api.md (1230b), skill-card.md (2088b), skill.manifest.json (140b), SKILL.md (5735b), _meta.json (129b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.14\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2-pro` | Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2-pro -y` |\n| `p-video-2` | Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2-pro` | Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2-pro -y` |\n| `p-video-2` | Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790695976818\n}\n\nFile v1.0.14:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.14:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on`, `p-image-ideogram` | `PRUNA_API_KEY` |\n| `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-video-edit` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.14:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image-ideogram`, `p-image`, `p-image-edit`, `p-image-try-on`, `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image-ideogram` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video-2` (quality) or `p-video` (simpler) when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video-2` / `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.14:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video-2-pro` | Cinematic text / first-last-frame video with **generated audio** (no audio upload); 480p / 768p; 5–15s; `mode` cost/speed/quality (`cost` = same quality as `speed`, but cheaper and slower). Built on MiniMax H3. | `p-video-2-pro` | `p-video-2-pro-quality-checklist.md` in `video-prompting` |\n| `p-video-2` | 1080p / imported-audio / draft video; **first frame** (`image`) + **last frame** (`last_frame_image`); omit `duration` to let the model choose length | `p-video-2` | `p-video-2-quality-checklist.md` in `video-prompting` |\n| `p-video` | Simpler / quicker text / image / audio video; same payload as `p-video-2` | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n| `p-video-edit` | Instruction video edit (source ≤15s + prompt; optional 0–4 refs) | `p-video-edit` | `p-video-edit-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video-2` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video-2-pro` visual / `p-video-2` audio-led, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video-2` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video-2-pro` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video-2`) | `illustrated-story-reel` |\n| AI music video (lyrics → Music 2.5 → avatar + B-roll) | `music-video` |\n| Virtual try-on + persona bar | `p-image-try-on` + `image-prompting` |\n| Human recipe map | repo `docs/WORKFLOW-RECIPES.md` (not a skill) |\n\nFile v1.0.14:references/replicate-api.md\n\n# Replicate API (minimal)\n\nUsed by external tool skills (e.g. `stable-audio-2.5`, `gemini-3.1-flash-tts`).\n\n**Missing token:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) if needed), then `export REPLICATE_API_TOKEN=r8_...`.\n\n## Auth\n\n```bash\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nHeader: `Authorization: Bearer ${REPLICATE_API_TOKEN}`\n\n## Create + poll\n\n```bash\n# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions\n# Body: {\"input\": { ... }}\n\n# Poll GET on response.urls.get until status == succeeded\n# Download output URL (string or list depending on model)\n```\n\nShared client: `music-video` · tool skill: `music-2.5`\n\n## Gemini 3.1 Flash TTS\n\nModel: `google/gemini-3.1-flash-tts`\nRequired input: `text`\nOptional: `voice` (default `Kore`), `prompt` (style/scene), `language_code` (default `en-US`)\n\nOutput: audio file URL. Use for narration — upload to Pruna as part of scene anchor triple (`video-prompting`) (`input.audio` + `input.image` + `input.last_frame_image` on `p-video-2` or `p-video`). Layering with beds: `audio-prompting`\n\nFile v1.0.14:skill-card.md\n\n## Description:\n\nGuides agents through Pruna and Replicate API credentials, uploads, prediction polling, downloads, parallel batches, and safety checks.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[pruna-ai](https://clawhub.ai/user/pruna-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to prepare and run Pruna or Replicate media API workflows, including credential setup, file transfer, prediction tracking, and safe handling of paid calls.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: User media may be uploaded to Pruna or Replicate for remote processing.\n\nMitigation: Confirm consent and the destination before uploading sensitive or third-party media.\n\nRisk: API credentials could be exposed through chat, files, or logs.\n\nMitigation: Keep keys in environment variables and do not include them in chat, committed files, or logs.\n\nRisk: Unpinned installation commands may fetch changing dependencies in privileged environments.\n\nMitigation: Prefer a pinned or preinstalled skills tool over running unpinned npx commands.\n\n## Reference(s):\n\n- [Pruna API skill on ClawHub](https://clawhub.ai/pruna-ai/skills/pruna-api)\n- [Pruna API quickstart](https://docs.api.pruna.ai/guides/quickstart)\n- [Pruna models](https://docs.api.pruna.ai/guides/models)\n- [Replicate API guidance](artifact/references/replicate-api.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Configuration]\n\n**Output Format:** [Markdown with shell and API examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Advises on credential checks, uploads, asynchronous polling, and downloads; does not itself generate media.]\n\n## Skill Version(s):\n\n1.0.14 (source: release evidence and skill frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.14:skill.manifest.json\n\n{\n  \"references\": [\n    \"pruna-api.md\",\n    \"api-credentials.md\",\n    \"agent-safety.md\",\n    \"replicate-api.md\",\n    \"pruna-models.md\"\n  ]\n}\n\nArchive v1.0.13: 9 files, 12066 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3066b), references/pruna-api.md (5837b), references/pruna-models.md (4374b), references/replicate-api.md (1230b), skill-card.md (3204b), skill.manifest.json (140b), SKILL.md (5735b), _meta.json (129b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.13\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2-pro` | Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2-pro -y` |\n| `p-video-2` | Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2-pro` | Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2-pro -y` |\n| `p-video-2` | Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1789653281795\n}\n\nFile v1.0.13:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.13:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on`, `p-image-ideogram` | `PRUNA_API_KEY` |\n| `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-video-edit` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.13:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image-ideogram`, `p-image`, `p-image-edit`, `p-image-try-on`, `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image-ideogram` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video-2` (quality) or `p-video` (simpler) when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video-2` / `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.13:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video-2-pro` | Cinematic text / first-last-frame video with **generated audio** (no audio upload); 480p / 768p; 5–15s; `mode` speed/quality. Built on MiniMax H3. | `p-video-2-pro` | `p-video-2-pro-quality-checklist.md` in `video-prompting` |\n| `p-video-2` | 1080p / imported-audio / draft video; **first frame** (`image`) + **last frame** (`last_frame_image`); omit `duration` to let the model choose length | `p-video-2` | `p-video-2-quality-checklist.md` in `video-prompting` |\n| `p-video` | Simpler / quicker text / image / audio video; same payload as `p-video-2` | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n| `p-video-edit` | Instruction video edit (source ≤15s + prompt; optional 0–4 refs) | `p-video-edit` | `p-video-edit-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video-2` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video-2-pro` visual / `p-video-2` audio-led, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video-2` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video-2-pro` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video-2`) | `illustrated-story-reel` |\n| AI music video (lyrics → Music 2.5 → avatar + B-roll) | `music-video` |\n| Virtual try-on + persona bar | `p-image-try-on` + `image-prompting` |\n| Human recipe map | repo `docs/WORKFLOW-RECIPES.md` (not a skill) |\n\nFile v1.0.13:references/replicate-api.md\n\n# Replicate API (minimal)\n\nUsed by external tool skills (e.g. `stable-audio-2.5`, `gemini-3.1-flash-tts`).\n\n**Missing token:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) if needed), then `export REPLICATE_API_TOKEN=r8_...`.\n\n## Auth\n\n```bash\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nHeader: `Authorization: Bearer ${REPLICATE_API_TOKEN}`\n\n## Create + poll\n\n```bash\n# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions\n# Body: {\"input\": { ... }}\n\n# Poll GET on response.urls.get until status == succeeded\n# Download output URL (string or list depending on model)\n```\n\nShared client: `music-video` · tool skill: `music-2.5`\n\n## Gemini 3.1 Flash TTS\n\nModel: `google/gemini-3.1-flash-tts`\nRequired input: `text`\nOptional: `voice` (default `Kore`), `prompt` (style/scene), `language_code` (default `en-US`)\n\nOutput: audio file URL. Use for narration — upload to Pruna as part of scene anchor triple (`video-prompting`) (`input.audio` + `input.image` + `input.last_frame_image` on `p-video-2` or `p-video`). Layering with beds: `audio-prompting`\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nUse before Pruna or Replicate HTTP calls for credentials, uploads, polling, downloads, parallel batches, and agent safety.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[pruna-ai](https://clawhub.ai/user/pruna-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill to prepare safe Pruna and Replicate API workflows, including credential checks, media uploads, prediction polling, output downloads, and parallel batch execution before paid calls.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill supports paid external API workflows that can incur cost when prediction or upload commands are run.\n\nMitigation: Confirm required API keys and user intent before paid POST requests, and resolve cost-sensitive media, resolution, duration, and approval-gate choices before execution.\n\nRisk: Local media, scripts, portraits, or voices may be uploaded to Pruna or Replicate services.\n\nMitigation: Get explicit user acknowledgement before first upload or prediction, confirm rights and consent for likenesses or voices, and explain that content leaves the local environment.\n\nRisk: API credentials could be exposed if copied into prompts, logs, manifests, or subagent instructions.\n\nMitigation: Read credentials only from environment variables or gitignored local configuration, never print full keys, and avoid distributing secrets to parallel workers unless isolated secret injection is documented.\n\nRisk: Download commands can overwrite local files.\n\nMitigation: Confirm output paths before writing downloaded results and avoid clobbering unrelated files.\n\nRisk: Installer commands may fetch executable skill packages with npx.\n\nMitigation: Consider pinning or otherwise verifying the npx skills installer before running installation commands.\n\n## Reference(s):\n\n- [ClawHub pruna-api release page](https://clawhub.ai/pruna-ai/skills/pruna-api)\n- [API credentials](references/api-credentials.md)\n- [Agent safety](references/agent-safety.md)\n- [Pruna P-API shared reference](references/pruna-api.md)\n- [Replicate API](references/replicate-api.md)\n- [Pruna models index](references/pruna-models.md)\n- [Pruna Developer Portal](https://docs.api.pruna.ai/)\n- [Pruna API Quickstart](https://docs.api.pruna.ai/guides/quickstart)\n- [Pruna Available Models](https://docs.api.pruna.ai/guides/models)\n- [Replicate API Tokens](https://replicate.com/account/api-tokens)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration]\n\n**Output Format:** [Markdown with inline shell commands and API request examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Guidance may include credential setup, upload and polling steps, download commands, and safety checks before paid external API calls.]\n\n## Skill Version(s):\n\n1.0.13 (source: server release evidence and artifact metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skill.manifest.json\n\n{\n  \"references\": [\n    \"pruna-api.md\",\n    \"api-credentials.md\",\n    \"agent-safety.md\",\n    \"replicate-api.md\",\n    \"pruna-models.md\"\n  ]\n}\n\nArchive v1.0.12: 9 files, 11665 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3049b), references/pruna-api.md (5820b), references/pruna-models.md (4089b), references/replicate-api.md (1230b), skill-card.md (2626b), skill.manifest.json (140b), SKILL.md (5067b), _meta.json (129b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.12\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2` | Use when someone wants the best-quality short clip from text, images, or audio — polished B-roll, start/end frame animation, or a motion shot with stronger lip-sync. Not for full multi-scene films or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs the highest quality or tight lip-sync. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2` | Use when someone wants the best-quality short clip from text, images, or audio — polished B-roll, start/end frame animation, or a motion shot with stronger lip-sync. Not for full multi-scene films or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs the highest quality or tight lip-sync. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1789048401008\n}\n\nFile v1.0.12:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.12:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on`, `p-image-ideogram` | `PRUNA_API_KEY` |\n| `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-video-edit` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.12:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image-ideogram`, `p-image`, `p-image-edit`, `p-image-try-on`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image-ideogram` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video-2` (quality) or `p-video` (simpler) when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video-2` / `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.12:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video-2` | Best-quality text / image / audio video; **first frame** (`image`) + **last frame** (`last_frame_image`); omit `duration` to let the model choose length | `p-video-2` | `p-video-2-quality-checklist.md` in `video-prompting` |\n| `p-video` | Simpler / quicker text / image / audio video; same payload as `p-video-2` | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n| `p-video-edit` | Instruction video edit (source ≤15s + prompt; optional 0–4 refs) | `p-video-edit` | `p-video-edit-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video-2` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video-2`, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video-2` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video-2` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video-2`) | `illustrated-story-reel` |\n| AI music video (lyrics → Music 2.5 → avatar + B-roll) | `music-video` |\n| Virtual try-on + persona bar | `p-image-try-on` + `image-prompting` |\n| Human recipe map | repo `docs/WORKFLOW-RECIPES.md` (not a skill) |\n\nFile v1.0.12:references/replicate-api.md\n\n# Replicate API (minimal)\n\nUsed by external tool skills (e.g. `stable-audio-2.5`, `gemini-3.1-flash-tts`).\n\n**Missing token:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) if needed), then `export REPLICATE_API_TOKEN=r8_...`.\n\n## Auth\n\n```bash\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nHeader: `Authorization: Bearer ${REPLICATE_API_TOKEN}`\n\n## Create + poll\n\n```bash\n# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions\n# Body: {\"input\": { ... }}\n\n# Poll GET on response.urls.get until status == succeeded\n# Download output URL (string or list depending on model)\n```\n\nShared client: `music-video` · tool skill: `music-2.5`\n\n## Gemini 3.1 Flash TTS\n\nModel: `google/gemini-3.1-flash-tts`\nRequired input: `text`\nOptional: `voice` (default `Kore`), `prompt` (style/scene), `language_code` (default `en-US`)\n\nOutput: audio file URL. Use for narration — upload to Pruna as part of scene anchor triple (`video-prompting`) (`input.audio` + `input.image` + `input.last_frame_image` on `p-video-2` or `p-video`). Layering with beds: `audio-prompting`\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nUse before any Pruna or Replicate HTTP call: credentials, upload, polling, downloads, parallel batches, and agent safety.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[pruna-ai](https://clawhub.ai/user/pruna-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to prepare Pruna and Replicate API work: checking credentials, uploading media, creating predictions, polling status, downloading outputs, and applying safety checks before paid or remote API calls.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Unsafe installer commands could fetch or run skill code without sufficient review.\n\nMitigation: Review and pin the installer and skill source before installing or enabling the skill.\n\nRisk: Credential handling patterns could expose API keys if keys are copied into chat, logs, manifests, or non-Pruna download URLs.\n\nMitigation: Keep API keys in environment variables, avoid printing or embedding them, and send PRUNA_API_KEY only to verified HTTPS Pruna API hosts.\n\nRisk: Media uploads send local images, audio, scripts, or portraits to remote Pruna or Replicate APIs.\n\nMitigation: Get explicit user acknowledgement before uploads or paid predictions, especially for personal likenesses, voices, copyrighted material, or sensitive media.\n\n## Reference(s):\n\n- [ClawHub pruna-api skill page](https://clawhub.ai/pruna-ai/skills/pruna-api)\n- [Pruna API reference](references/pruna-api.md)\n- [API credentials](references/api-credentials.md)\n- [Agent safety](references/agent-safety.md)\n- [Replicate API](references/replicate-api.md)\n- [Pruna models](references/pruna-models.md)\n- [Pruna Developer Portal](https://docs.api.pruna.ai/)\n- [Pruna Quickstart](https://docs.api.pruna.ai/guides/quickstart)\n- [Pruna Models](https://docs.api.pruna.ai/guides/models)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration]\n\n**Output Format:** [Markdown guidance with inline shell command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Covers credential checks, API request setup, upload and polling flows, download handling, batch guidance, and safety review prompts; it does not execute API calls by itself.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release evidence and frontmatter)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skill.manifest.json\n\n{\n  \"references\": [\n    \"pruna-api.md\",\n    \"api-credentials.md\",\n    \"agent-safety.md\",\n    \"replicate-api.md\",\n    \"pruna-models.md\"\n  ]\n}\n\nArchive v1.0.11: 9 files, 11402 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3036b), references/pruna-api.md (5729b), references/pruna-models.md (3865b), references/replicate-api.md (1215b), skill-card.md (2803b), skill.manifest.json (140b), SKILL.md (3861b), _meta.json (129b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.11\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1788444507451\n}\n\nFile v1.0.11:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.11:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on`, `p-image-ideogram` | `PRUNA_API_KEY` |\n| `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-video-edit` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.11:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image`, `p-image-edit`, `p-image-try-on`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video` when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.11:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video` | Text / image / audio video; **first frame** (`image`) + **last frame** (`last_frame_image`) chaining | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n| `p-video-edit` | Instruction video edit (source ≤15s + prompt; optional 0–4 refs) | `p-video-edit` | `p-video-edit-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video`, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video`) | `illustrated-story-reel` |\n| AI music video (lyrics → Music 2.5 → avatar + B-roll) | `music-video` |\n| Virtual try-on + persona bar | `p-image-try-on` + `image-prompting` |\n| Human recipe map | repo `docs/WORKFLOW-RECIPES.md` (not a skill) |\n\nFile v1.0.11:references/replicate-api.md\n\n# Replicate API (minimal)\n\nUsed by external tool skills (e.g. `stable-audio-2.5`, `gemini-3.1-flash-tts`).\n\n**Missing token:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) if needed), then `export REPLICATE_API_TOKEN=r8_...`.\n\n## Auth\n\n```bash\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nHeader: `Authorization: Bearer ${REPLICATE_API_TOKEN}`\n\n## Create + poll\n\n```bash\n# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions\n# Body: {\"input\": { ... }}\n\n# Poll GET on response.urls.get until status == succeeded\n# Download output URL (string or list depending on model)\n```\n\nShared client: `music-video` · tool skill: `music-2.5`\n\n## Gemini 3.1 Flash TTS\n\nModel: `google/gemini-3.1-flash-tts`\nRequired input: `text`\nOptional: `voice` (default `Kore`), `prompt` (style/scene), `language_code` (default `en-US`)\n\nOutput: audio file URL. Use for narration — upload to Pruna as part of scene anchor triple (`video-prompting`) (`input.audio` + `input.image` + `input.last_frame_image` on `p-video`). Layering with beds: `audio-prompting`\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nGuides agents before Pruna or Replicate HTTP calls, covering credentials, uploads, polling, downloads, parallel batches, and agent safety.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[pruna-ai](https://clawhub.ai/user/pruna-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill to prepare Pruna or Replicate HTTP generation workflows, including credential setup, uploads, polling, downloads, and parallel batches. It also prompts safety checks before paid calls or media uploads.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Prompts and selected media may leave the local environment for Pruna or Replicate cloud processing.\n\nMitigation: Get explicit user acknowledgement before the first upload or paid prediction and disclose remote processing.\n\nRisk: API keys may be exposed if copied into prompts, logs, manifests, or subagent task text.\n\nMitigation: Read PRUNA_API_KEY and REPLICATE_API_TOKEN from environment variables only, and never print or commit full keys.\n\nRisk: Paid generation calls and downloads can incur cost or overwrite local files.\n\nMitigation: Confirm required credentials, paid calls, unresolved media choices, and output paths before POST requests or local writes.\n\nRisk: Floating install commands can install a changed package version.\n\nMitigation: Prefer pinned or verified skill install references over floating npx commands.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/pruna-ai/skills/pruna-api)\n- [Pruna P-API reference](references/pruna-api.md)\n- [API credentials](references/api-credentials.md)\n- [Agent safety](references/agent-safety.md)\n- [Replicate API](references/replicate-api.md)\n- [Pruna models](references/pruna-models.md)\n- [Pruna Developer Portal](https://docs.api.pruna.ai/)\n- [Pruna Quickstart](https://docs.api.pruna.ai/guides/quickstart)\n- [Pruna model list](https://docs.api.pruna.ai/guides/models)\n- [Replicate API tokens](https://replicate.com/account/api-tokens)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, markdown, shell commands, configuration]\n\n**Output Format:** [Markdown with inline shell commands and HTTP API examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Includes credential setup, upload, polling, download, batch execution, and safety guidance; it does not execute API calls by itself.]\n\n## Skill Version(s):\n\n1.0.11 (source: evidence.json release.version and SKILL.md frontmatter metadata.version)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skill.manifest.json\n\n{\n  \"references\": [\n    \"pruna-api.md\",\n    \"api-credentials.md\",\n    \"agent-safety.md\",\n    \"replicate-api.md\",\n    \"pruna-models.md\"\n  ]\n}\n\nArchive v1.0.10: 9 files, 11435 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3000b), references/pruna-api.md (5729b), references/pruna-models.md (3699b), references/replicate-api.md (1219b), skill-card.md (2979b), skill.manifest.json (140b), SKILL.md (3861b), _meta.json (129b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.10\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787903680671\n}\n\nFile v1.0.10:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.10:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on` | `PRUNA_API_KEY` |\n| `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.10:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image`, `p-image-edit`, `p-image-try-on`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video` when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.10:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video` | Text / image / audio video; **first frame** (`image`) + **last frame** (`last_frame_image`) chaining | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video`, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video`) | `illustrated-story-reel` |\n| AI music video (lyrics → Music 2.5 → avatar + B-roll) | `music-video` |\n| Virtual try-on + persona bar | `p-image-try-on` + `image-prompting` |\n| Human recipe map | repo `docs/WORKFLOW-RECIPES.md` (not a skill) |\n\nFile v1.0.10:references/replicate-api.md\n\n# Replicate API (minimal)\n\nUsed by external tool skills (e.g. `stable-audio-2.5`, `gemini-3.1-flash-tts`).\n\n**Missing token:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) if needed), then `export REPLICATE_API_TOKEN=r8_...`.\n\n## Auth\n\n```bash\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nHeader: `Authorization: Bearer ${REPLICATE_API_TOKEN}`\n\n## Create + poll\n\n```bash\n# POST https://api.replicate.com/v1/models/{owner}/{name}/predictions\n# Body: {\"input\": { ... }}\n\n# Poll GET on response.urls.get until status == succeeded\n# Download output URL (string or list depending on model)\n```\n\nShared client: `music-video` · tool skill: `music-2.5`\n\n## Gemini 3.1 Flash TTS\n\nModel: `google/gemini-3.1-flash-tts`  \nRequired input: `text`  \nOptional: `voice` (default `Kore`), `prompt` (style/scene), `language_code` (default `en-US`)\n\nOutput: audio file URL. Use for narration — upload to Pruna as part of scene anchor triple (`video-prompting`) (`input.audio` + `input.image` + `input.last_frame_image` on `p-video`). Layering with beds: `audio-prompting`\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nUse before any Pruna or Replicate HTTP call for credentials, upload, polling, download, parallel batches, and agent safety.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[pruna-ai](https://clawhub.ai/user/pruna-ai)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to prepare Pruna and Replicate API calls, including credential setup, file upload, prediction polling, output download, and safety checks before paid or external-processing requests.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Selected media, scripts, narration text, and related inputs may be sent to Pruna or Replicate for remote processing.\n\nMitigation: Require explicit user acknowledgment before the first upload or paid prediction, and disclose that content leaves the local environment.\n\nRisk: Portraits, voices, third-party likenesses, or identity replacement workflows can involve consent-sensitive material.\n\nMitigation: Confirm the user has permission to use any likeness, voice, portrait, or identity material before making external API calls.\n\nRisk: API credentials could be exposed if copied into prompts, logs, manifests, committed files, or subagent instructions.\n\nMitigation: Read PRUNA_API_KEY and REPLICATE_API_TOKEN only from host environment variables or local uncommitted environment files, and never include full keys in generated content.\n\nRisk: Downloaded outputs can overwrite local files.\n\nMitigation: Confirm output paths before writing downloaded files and avoid clobbering unrelated workspace paths.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/pruna-ai/skills/pruna-api)\n- [Pruna developer portal](https://docs.api.pruna.ai/)\n- [Pruna quickstart](https://docs.api.pruna.ai/guides/quickstart)\n- [Pruna models](https://docs.api.pruna.ai/guides/models)\n- [Pruna dashboard](https://dashboard.pruna.ai/)\n- [Replicate API tokens](https://replicate.com/account/api-tokens)\n- [API credentials](references/api-credentials.md)\n- [Agent safety](references/agent-safety.md)\n- [Pruna P-API](references/pruna-api.md)\n- [Replicate API](references/replicate-api.md)\n- [Pruna models index](references/pruna-models.md)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, markdown, shell commands, configuration]\n\n**Output Format:** [Markdown guidance with inline shell command examples and configuration instructions]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include API request patterns, credential checks, upload and polling steps, download guidance, and safety reminders.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release evidence and frontmatter metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skill.manifest.json\n\n{\n  \"references\": [\n    \"pruna-api.md\",\n    \"api-credentials.md\",\n    \"agent-safety.md\",\n    \"replicate-api.md\",\n    \"pruna-models.md\"\n  ]\n}\n\nArchive v1.0.9: 9 files, 11303 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3000b), references/pruna-api.md (5729b), references/pruna-models.md (3699b), references/replicate-api.md (1219b), skill-card.md (2760b), skill.manifest.json (140b), SKILL.md (3860b), _meta.json (128b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.9\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n| `video-editing` | Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits. | `npx skills add PrunaAI/pruna-skills@video-editing -y` |\n\n## Before generating\n\n1. **[API credentials](./references/api-credentials.md)** — signup and env vars when keys are missing.\n2. **[Agent safety](./references/agent-safety.md)** — before uploads or paid calls in untrusted contexts.\n3. **[pruna-api.md](./references/pruna-api.md)** — create, poll, download, parallel batches.\n4. Replicate tools → [replicate-api.md](./references/replicate-api.md).\n5. Model index → [pruna-models.md](./references/pruna-models.md).\n\n## Related skills\n\nInstall related skills when the job needs them:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video` | Use when someone wants one short video clip from text or images — B-roll, start/end frame animation, or a quick motion shot. Not for full multi-scene films or lip-synced hosts. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n\nOr install the full suite once: `npx skills add PrunaAI/pruna-skills@pruna -y`\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1785824205051\n}\n\nFile v1.0.9:references/agent-safety.md\n\n# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases\n\nFile v1.0.9:references/api-credentials.md\n\n# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on` | `PRUNA_API_KEY` |\n| `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- Full rules: [agent-safety.md](./agent-safety.md).\n\nFile v1.0.9:references/pruna-api.md\n\n# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image`, `p-image-edit`, `p-image-try-on`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video` when all anchor triple URLs exist.\n\nExample shape (conceptual):\n\n```bash\nfor scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending\n```\n\n## Scene anchor triple (multi-scene `p-video`)\n\nNarrated story films pass three uploads per scene — **`image`**, **`last_frame_image`**, **`audio`** — in one prediction. Omit `duration` when `audio` is set.\n\nFull spec: `video-prompting`.\n\n## File uploads\n\nLocal files leave the machine and are processed at `https://api.pruna.ai/` — see [agent-safety.md](./agent-safety.md).\n\n1. `POST /v1/files` with `-F \"content=@/path/to/file.jpg\"` and `apikey` header.\n2. Use `urls.get` from the response (or construct `https://api.pruna.ai/v1/files/{id}`) as the **`image`**, **`last_frame_image`**, **`images[]`**, **`person_image`**, **`garment_images[]`**, **`audio`**, etc. value in `input`.\n\nUploaded files expire (see upload response `expires_at`).\n\n## File upload (curl)\n\n```bash\ncurl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\"\n```\n\nUse `urls.get` from the JSON response in prediction `input` fields.\n\n## Poll async job {#poll}\n\nAfter an async `POST /v1/predictions` (no `Try-Sync`), poll until `status` is `succeeded` or `failed`:\n\n```bash\ncurl -s -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"https://api.pruna.ai/v1/predictions/status/PREDICTION_ID\"\n```\n\nUse the `get_url` from the create response. Repeat every few seconds until done.\n\n## Download output {#download}\n\n`-o` writes (or overwrites) a local file — confirm the path with the user ([agent-safety.md](./agent-safety.md)).\n\n```bash\ncurl -L -H \"apikey: ${PRUNA_API_KEY}\" \\\n  \"GENERATION_URL_FROM_STATUS\" \\\n  -o output.bin\n```\n\nIf `generation_url` is relative, prefix with `https://api.pruna.ai`.\n\n## Typical success response\n\n- **Sync:** `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n- **Async (create):** `{ \"id\": \"...\", \"get_url\": \"https://api.pruna.ai/v1/predictions/status/...\" }`\n- **Async (poll):** eventually `{ \"status\": \"succeeded\", \"generation_url\": \"...\" }`\n\nDownload binary output with `GET` to `generation_url` and the same `apikey` header.\n\n## Environment variable\n\nSkills in this repo assume **`PRUNA_API_KEY`** is set in the shell when running `curl` examples.\n\n**Missing key:** agents must stop and point the user to [api-credentials.md](./api-credentials.md) — sign up at [dashboard.pruna.ai](https://dashboard.pruna.ai/), create an API key, then `export PRUNA_API_KEY=...`.\n\n**Agent discipline:** `generation-diversity` before every `POST /v1/predictions`.\n\nFile v1.0.9:references/pruna-models.md\n\n# Pruna models (index)\n\nPricing and limits change; confirm on the official page: [Available models](https://docs.api.pruna.ai/guides/models).\n\n**Execution:** Multi-scene and batch runs should use **async parallel fan-out** and **subagents per independent lane** — see [pruna-api.md](./pruna-api.md#parallel-async-multi-scene--batch).\n\n## First-party Pruna models covered by this repo\n\n| Model ID | Type | Tool skill | QA checklist (install guide) |\n|----------|------|------------|------------------------------|\n| `p-image` | Text-to-image (good quality, extremely fast; use when user asks cheap/fast) | `p-image` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-ideogram` | Text-to-image with control knobs (photoreal photos, in-image text, JSON/hex/bbox; thinking + upsampling) | `p-image-ideogram` | `p-image-quality-checklist.md` in `image-prompting` |\n| `p-image-edit` | Image edit / compose (1–5 images) | `p-image-edit` | `p-image-edit-quality-checklist.md` in `image-prompting` |\n| `p-image-upscale` | Upscale (target MP 1–128, optional enhance) | `p-image-upscale` | `p-image-upscale-quality-checklist.md` in `image-prompting` |\n| `p-image-try-on` | Virtual try-on (person + up to 11 garments, ≤6 finals / 7–8 reliable; optional pose ref, turbo ~4) | `p-image-try-on` | `p-image-try-on-quality-checklist.md` in `image-prompting` |\n| `p-video` | Text / image / audio video; **first frame** (`image`) + **last frame** (`last_frame_image`) chaining | `p-video` | `p-video-quality-checklist.md` in `video-prompting` |\n| `p-video-avatar` | Talking avatar from portrait + script or audio | `p-video-avatar` | `p-video-avatar-quality-checklist.md` in `video-prompting` |\n| `p-video-animate` | Animate a still using source video motion (motion transfer) | `p-video-animate` | `p-video-animate-quality-checklist.md` in `video-prompting` |\n| `p-video-replace` | Replace people in source video using 1–4 identity images | `p-video-replace` | `p-video-replace-quality-checklist.md` in `video-prompting` |\n\n## External tools (Replicate)\n\n| Tool | Type | Tool skill | Notes |\n|------|------|------------|-------|\n| `stable-audio-2.5` | Text-to-music bed | `stable-audio-2.5` | Requires `REPLICATE_API_TOKEN`; mix via ffmpeg bed mix |\n| `music-2.5` | Full song with vocals (lyrics + style) | `music-2.5` | Requires `REPLICATE_API_TOKEN`; `music-video` workflow |\n| `gemini-3.1-flash-tts` | Narration / voiceover TTS | `gemini-3.1-flash-tts` | Requires `REPLICATE_API_TOKEN`; mux or drive `p-video` via uploaded audio — `audio-prompting` |\n\n## Related models (not duplicated as skills here)\n\nDocumented on the same models page: `p-image-lora`, trainers, `flux-*`, `wan-*`, `qwen-*`, `vace`, etc. Add a new tool skill when you need agent guidance for another model.\n\n## Composed workflows in this repo\n\n| Workflow | Skill |\n|----------|-------|\n| Full suite install | `pruna` |\n| Single-scene avatar (`p-video-avatar`, intake first) | `avatar-single-scene` |\n| Multi-scene avatar (stills + `p-video-avatar` / animate rows) | `avatar-multi-scene` |\n| Single-scene cinematic (`p-video`, intake first) | `image-to-video` |\n| Multi-scene cinematic (`p-video` + scene anchor triple) | `narrated-multi-scene` |\n| Multi-scene visual transitions (stills → `p-video` pair) | `visual-transition-reel` |\n| Educational explainer (narrator + character) | `interactive-explainer` |\n| Illustrated story reel (Ken Burns / gentle `p-video`) | `illustr\n\nArchive v1.0.8: 9 files, 11145 bytes\n\nFiles: references/agent-safety.md (2432b), references/api-credentials.md (3000b), references/pruna-api.md (5729b), references/pruna-models.md (3463b), references/replicate-api.md (1219b), skill-card.md (2727b), skill.manifest.json (140b), SKILL.md (3732b), _meta.json (128b)\n\nArchive v1.0.7: 9 files, 10951 bytes\n\nFiles: references/agent-safety.md (2006b), references/api-credentials.md (3000b), references/pruna-api.md (5729b), references/pruna-models.md (3463b), references/replicate-api.md (1219b), skill-card.md (2902b), skill.manifest.json (140b), SKILL.md (3607b), _meta.json (128b)","readmeExcerpt":"Skill: pruna-api Owner: pruna-ai Summary: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. Tags: ai:1.0.14, generative:1.0.14, latest:1.0.14, pruna:1.0.14 Version history: v1.0.14 | 2026-09-29T15:32:56.818Z | auto - Bumped version to 1.0.14. - Updated documentation in SKILL.md and references/pruna-models.md. - Removed deprecated skill-card.md file. v","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"> export PRUNA_API_KEY=\"your_key_here\"\n>"},{"language":"bash","snippet":"> export REPLICATE_API_TOKEN=\"r8_...\"\n>"},{"language":"bash","snippet":"-H \"apikey: ${PRUNA_API_KEY}\""},{"language":"bash","snippet":"curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &"},{"language":"bash","snippet":"for scene in 1 2 3 4 5; do\n  curl -s -X POST 'https://api.pruna.ai/v1/predictions' \\\n    -H 'Content-Type: application/json' \\\n    -H \"apikey: ${PRUNA_API_KEY}\" \\\n    -H 'Model: p-video-avatar' \\\n    -d @\"scene${scene}_avatar_payload.json\" &\ndone\nwait\n# Then poll all get_url values until none are pending"},{"language":"bash","snippet":"curl -X POST \"https://api.pruna.ai/v1/files\" \\\n  -H \"apikey: ${PRUNA_API_KEY}\" \\\n  -F \"content=@/path/to/local/file.jpg\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: pruna-api\ndescription: Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.\nlicense: MIT\nmetadata:\n  version: \"1.0.14\"\n  package: pruna-skills\n---\n\n# Pruna API\n\nHTTP patterns for the **Pruna P-API** and **Replicate** (audio tools). Install this before paid `POST` calls from Pruna tool skills.\n\n## Install\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `pruna-api` | Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety. | `npx skills add PrunaAI/pruna-skills@pruna-api -y` |\n| `generation-diversity` | Use when writing any generative prompt — ritual seed, explicit structure, scenario axes, and quality gates before paid API calls. | `npx skills add PrunaAI/pruna-skills@generation-diversity -y` |\n\n## When to use\n\n- Setting up `PRUNA_API_KEY` / Replicate tokens\n- Uploading files, polling predictions, downloading outputs\n- Parallel async multi-scene batches\n- Safety review before enabling skills in untrusted repos\n\n## Agent habit\n\nIn the **first reply**, name `` `pruna-api` `` in backticks. Before any paid `POST`, confirm `PRUNA_API_KEY` and/or `REPLICATE_API_TOKEN` as needed. If media path, voice, or brand is still open, open intake → **`generation-diversity`** clarification intake before upload. Do not invent model payloads — use the matching tool skill.\n\n## When NOT to use\n\nUse a different skill instead:\n\n| Skill | Description | Install |\n| --- | --- | --- |\n| `p-image-ideogram` | Use when photo generation needs more control — photoreal results, text in the image, or structured JSON with hex colors and bounding boxes. Simpler photo generation, edits, and video use other skills in the suite. | `npx skills add PrunaAI/pruna-skills@p-image-ideogram -y` |\n| `p-image` | Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed. | `npx skills add PrunaAI/pruna-skills@p-image -y` |\n| `p-video-2-pro` | Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2-pro -y` |\n| `p-video-2` | Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts. | `npx skills add PrunaAI/pruna-skills@p-video-2 -y` |\n| `p-video` | Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p. | `npx skills add PrunaAI/pruna-skills@p-video -y` |\n| `generation-diversity` | Use when writing any generat"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cagwf7q3t0cxrgteb7xk0bh81j0eb\",\n  \"slug\": \"pruna-api\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1790695976818\n}"},{"path":"references/agent-safety.md","content":"# Agent safety (data, credentials, locale)\n\nRequired before the first paid generation call (`POST /v1/predictions`, Replicate prediction, or file upload to Pruna/Replicate). Link from tool and workflow skills that transmit media.\n\n## Privacy / external transmission\n\nLocal images, audio, scripts, and portraits are **uploaded to remote APIs** (primarily `https://api.pruna.ai/`; Replicate for TTS/song/bed/WhisperX). Uploads may include biometric-like portraits, personal voice, or copyrighted material.\n\n- Get **explicit user acknowledgment** before the first upload or prediction in a session (or when new media is introduced).\n- Do **not** use third-party likenesses or voices without the user’s confirmation that they have consent.\n- Tell the user that content leaves the local environment and is processed/stored remotely per the provider’s terms.\n\n## Credentials\n\n- Read `PRUNA_API_KEY` / `REPLICATE_API_TOKEN` from the **host environment** only (shell / `.env` — never commit).\n- **Never** embed keys in prompts, chat, manifests, plan JSON, logs, or subagent task text.\n- Prefer the **parent agent** to own API calls. Do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- If a key is missing, stop and use the templates in [api-credentials.md](./api-credentials.md).\n\n## Local disk\n\nDownloads (`curl -o …`, runners writing under an output dir) **create or overwrite** local files. Confirm the output path with the user before writing; avoid clobbering unrelated paths.\n\n## Locale and voice\n\n- Confirm **`voice_language`** (and voice preset) with the user before avatar/TTS jobs.\n- Examples that use `English (US)` are **illustrative only** — not a silent default override of user locale.\n\n## Creative and media decisions\n\nBefore the first upload or paid call, resolve decisions that change cost or output when the user has not already answered: **generate vs use existing** media, brand/palette, narration vs text-only, music bed vs silent, aspect/duration/**resolution (720p/1080p, canvas, MP)**, and workflow **approval gates**. Shared checklist: open intake → **`generation-diversity`** clarification intake.\n\n## Related\n\n- [api-credentials.md](./api-credentials.md) — signup + header rules\n- [pruna-api.md](./pruna-api.md) — upload / poll / download\n- generation-quality-checklists.md#approval-gates-workflows (`generation-diversity`) — approval phases"},{"path":"references/api-credentials.md","content":"# API credentials (Pruna + Replicate)\n\n**Agent rule:** Before any `POST /v1/predictions`, Replicate prediction, or paid runner — check env vars. If a required key is **missing or empty**, **stop** and tell the user how to sign up. Do not guess, mock, or skip with placeholder keys.\n\n## Pruna P-API\n\n| | |\n|--|--|\n| **Env var** | `PRUNA_API_KEY` |\n| **Header** | `apikey: ${PRUNA_API_KEY}` (not `Authorization: Bearer`) |\n| **Sign up / get key** | [Pruna dashboard](https://dashboard.pruna.ai/) |\n| **Docs** | [Quickstart](https://docs.api.pruna.ai/guides/quickstart) · [pruna-api.md](./pruna-api.md) |\n\n**Used by:** all `p-image*`, `p-video*` tool skills and Pruna workflow runners.\n\n### If `PRUNA_API_KEY` is missing — agent message template\n\n> Pruna generation needs an API key. Sign up or sign in at **[dashboard.pruna.ai](https://dashboard.pruna.ai/)**, create an API key, then set:\n>\n> ```bash\n> export PRUNA_API_KEY=\"your_key_here\"\n> ```\n>\n> Add that to your shell profile or project `.env` (never commit the key). Reply when it’s set and we can continue.\n\n## Replicate\n\n| | |\n|--|--|\n| **Env var** | `REPLICATE_API_TOKEN` |\n| **Header** | `Authorization: Bearer ${REPLICATE_API_TOKEN}` |\n| **Sign up / get token** | [Replicate API tokens](https://replicate.com/account/api-tokens) ([sign in](https://replicate.com/signin) first if needed) |\n| **Docs** | [replicate-api.md](./replicate-api.md) |\n\n**Used by:** `music-2.5`, `gemini-3.1-flash-tts`, `stable-audio-2.5`, `whisperx`, and workflow beds/TTS/song phases.\n\n### If `REPLICATE_API_TOKEN` is missing — agent message template\n\n> This step uses Replicate (song, TTS, transcription, or background bed). Create a token at **[replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)**, then set:\n>\n> ```bash\n> export REPLICATE_API_TOKEN=\"r8_...\"\n> ```\n>\n> Reply when it’s set and we can continue.\n\n## Which key does this job need?\n\n| Task | Keys required |\n|------|----------------|\n| `p-image`, `p-image-edit`, `p-image-upscale`, `p-image-try-on`, `p-image-ideogram` | `PRUNA_API_KEY` |\n| `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-video-edit` | `PRUNA_API_KEY` |\n| Music 2.5 song generation | `REPLICATE_API_TOKEN` |\n| Gemini TTS narration | `REPLICATE_API_TOKEN` |\n| Stable Audio background bed | `REPLICATE_API_TOKEN` |\n| WhisperX transcription | `REPLICATE_API_TOKEN` |\n| Music video / explainer (full pipeline) | **Both** — Pruna for stills/video; Replicate for song/TTS/bed as needed |\n\nWhen only one key is missing, suggest **only** that provider’s signup link — not both.\n\n## Security\n\n- Never print full keys in chat or commit them to git.\n- `.env` is gitignored; prefer env vars over hardcoding in plans or manifests.\n- Never embed keys in prompts, manifests, plan JSON, logs, or **subagent task text**.\n- Prefer the **parent agent** to own API calls; do not fan credentials across parallel subagents unless the host documents isolated secret injection.\n- F"},{"path":"references/pruna-api.md","content":"# Pruna P-API (shared reference)\n\nOfficial docs: [Developer Portal](https://docs.api.pruna.ai/), [Quickstart](https://docs.api.pruna.ai/guides/quickstart), [Models](https://docs.api.pruna.ai/guides/models).\n\n**Before first upload or paid call:** [agent-safety.md](./agent-safety.md) — privacy, credentials, local disk, locale.\n\n## Authentication\n\nSend your API key in the **`apikey`** header on every request (not `Authorization: Bearer`).\n\n```bash\n-H \"apikey: ${PRUNA_API_KEY}\"\n```\n\nUse the same header on delivery URLs when downloading bytes.\n\n## Base URL\n\n- Predictions: `https://api.pruna.ai/v1/predictions`\n- File upload: `https://api.pruna.ai/v1/files` (multipart form field `content=@file`)\n- Status: `https://api.pruna.ai/v1/predictions/status/{id}`\n- Delivery: use `generation_url` from a succeeded status (may be relative; prefix with `https://api.pruna.ai` if needed)\n\n## Request shape\n\nAll generative calls use:\n\n- `POST /v1/predictions`\n- Headers: `Content-Type: application/json`, `apikey`, **`Model: <model-id>`** (for example `p-image-ideogram`, `p-image`, `p-image-edit`, `p-image-try-on`, `p-video-2-pro`, `p-video-2`, `p-video`, `p-video-avatar`, `p-video-animate`, `p-video-replace`, `p-image-upscale`)\n- JSON body: `{ \"input\": { ... } }` where `input` fields match the model page (see each skill).\n\n## Sync vs async\n\n| Mode | Header | When to use |\n|------|--------|--------------|\n| Synchronous | `Try-Sync: true` | Fast jobs (many images, simple edits). Completes within ~60s or may time out. |\n| Asynchronous | omit `Try-Sync` | Video, long edits, production reliability. Poll `get_url` / status until `succeeded` or `failed`. |\n\nOfficial guidance: prefer **async for video**; sync is acceptable for quick **p-image** / **p-image-edit** / **p-image-upscale** / **p-image-try-on** when latency is low.\n\n## Parallel async (multi-scene / batch)\n\nWhen several predictions **do not depend on each other's outputs**, create them **in parallel** (async, omit `Try-Sync`), then **poll all** `get_url` endpoints until every job finishes. Use **phased** execution when later steps need URLs from earlier steps (hero → scene edits → avatars).\n\n| Rule | Guidance |\n|------|----------|\n| **Async first** | Omit `Try-Sync` on production video, avatar, and batch image jobs. |\n| **Parallel when independent** | If job B does not need job A's `generation_url`, start both before polling either. |\n| **Phased when dependent** | Finish phase N (all jobs in the phase) before starting phase N+1. |\n| **Subagents for lanes** | One subagent per independent scene/lane when 2+ scenes; parent owns manifest and assembly. |\n| **Sync only for probes** | `Try-Sync: true` is OK for a **single** quick image test — not for video or batch runs. |\n\nTypical multi-scene avatar phases: plan → hero `p-image-ideogram` → parallel scene `p-image-edit` → parallel `p-video-avatar` → assembly. Narrated films: parallel Gemini TTS per scene after scripts approved, then parallel `p-video-2` (quality) or `p-video`"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":2223,"uniquenessScore":36,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T18:49:25.196Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T21:51:08.479Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}