{"skill":{"slug":"shortapi-ai-music-generation","displayName":"Al Music Generation","summary":"Use this skill as an entry point to discover, select, and fetch specific integration parameters for all supported AI music generation models.","description":"---\nname: ShortApi Music Models Aggregation Skill\ndescription: \"Use this skill as an entry point to discover, select, and fetch specific integration parameters for all supported AI music generation models.\"\nmetadata:\n  {\n    \"openclaw\":\n      {\n        \"requires\": { \"env\": [\"SHORTAPI_KEY\"] },\n        \"homepage\": \"https://shortapi.ai\",\n      },\n  }\n---\n\n# Music Generation Models Integration Skill\n\n> Use this skill to explore and integrate all available Music Generation models through the ShortAPI platform.\n\n## Overview\n\nShortAPI provides a unified `/api/v1/job/create` endpoint for music generation natively. This skill provides an overview of all available music generation models and how to dynamically acquire the specific JSON schema required to invoke them.\n\n- **API Endpoint**: `https://api.shortapi.ai/api/v1/job/create`\n- **Category**: `text-to-audio`\n- **Kind**: inference\n\n## Available Music Models\n\nHere is the list of fully supported music generation model IDs you can use:\n\n| Model ID                | Description                            |\n| ----------------------- | -------------------------------------- |\n| `suno/suno-v5/generate` | Generate music and songs using Suno V5 |\n\n## How to use a Music Model\n\nBecause each music model supports different parameters (such as `lyrics`, `genre`, `style`, `duration`, `instrumental`, or advanced controls), you need to fetch the specific model's schema document to construct a valid API request payload.\n\n### Step 1: Fetch the specific Model API Skill Document (MANDATORY)\n\nYou **MUST** first fetch the detailed skill document for the specific `<model_id>` (e.g. `suno/suno-v5/generate`) before attempting to construct the POST request payload. **DO NOT** skip this step. **DO NOT** hallucinate parameters because different models have completely different parameter names and supported features.\n\nSend a `GET` request to:\n\n```text\nhttps://shortapi.ai/api/skill/<model_id>\n```\n\n_(For example: `GET https://shortapi.ai/api/skill/suno/suno-v5/generate`)_\n\nThis URL will return a Markdown (`.md`) text document containing the exact Input Parameters Schema for that specific model, alongside code examples. You must parse it to understand which arguments go into the `args` object.\n\n### Step 2: Construct the JSON Payload\n\nUsing the exact schema document fetched from Step 1, construct a valid JSON payload. **Only include arguments that were defined in the document fetched in Step 1.**\nAt a minimum, standard structures generally look like this:\n\n```json\n{\n  \"model\": \"<model_id>\",\n  \"args\": {\n    \"prompt\": \"Your music description or lyrics here...\"\n    // ...other model-specific required or optional parameters strictly parsed from Step 1\n  },\n  \"callback_url\": \"YOUR_OPTIONAL_WEBHOOK_URL\"\n}\n```\n\n### Step 3: Invoke the Unified Generation Endpoint\n\nMake an HTTP POST request to the API Endpoint. Include the Bearer token in the `Authorization` header.\n\n#### Bash (cURL) Example\n\n```bash\nresponse=$(curl --request POST \\\n  --url https://api.shortapi.ai/api/v1/job/create \\\n  --header \"Authorization: Bearer $SHORTAPI_KEY\" \\\n  --header \"Content-Type: application/json\" \\\n  --data '{\n    \"model\": \"suno/suno-v5/generate\",\n    \"args\": {\n      \"prompt\": \"A upbeat electronic dance track with catchy synth melodies\"\n    }\n  }')\nJOB_ID=$(echo \"$response\" | grep -o '\"job_id\": *\"[^\"]*\"' | sed 's/\"job_id\": *//; s/\"//g')\n```\n\n### Step 4: Fetch Generation Status (Background Polling)\n\nUse the returned `job_id` to poll the query API:\n\n```bash\ncurl --request GET \\\n  --url \"https://api.shortapi.ai/api/v1/job/query?id=$JOB_ID\" \\\n  --header \"Authorization: Bearer $SHORTAPI_KEY\"\n```\n\n## Security, Privacy & Safety Disclosure\n\n- **Endpoint Isolation**: This skill only communicates with `https://api.shortapi.ai`.\n- **Credential Safety**: The `SHORTAPI_KEY` is only used in the `Authorization` header to the official API endpoint and must never be included in any callback payload or exposed to third parties.\n- **Background Polling Policy**: To ensure resource safety, the Agent should poll the status endpoint for a maximum of **5 minutes** per job. If a job does not complete within this window, the Agent must inform the user and stop polling.\n- **State Management**: The Agent stores `job_id` and polling state exclusively within the current conversation context. No persistent external database is used for tracking job states by this skill.\n- **Content Sanitization**: Before rendering generated results (audio, images, or video) inline, the Agent **MUST** verify that the URLs point to authorized `shortapi.ai` or known CDN domains. The Agent is responsible for ensuring that the embedded HTML tags (`<audio>`, `<video>`, `<img>`) do not contain malicious attributes or scripts.\n- **Callback Lockdown**: The `callback_url` parameter is strictly user-defined. The Agent is prohibited from auto-generating or hallucinating this value.\n\n**CRITICAL BEHAVIOR FOR AGENTS:**\n\n1.  **Authentication First (SHORTAPI_KEY)**: Before any other step, you **MUST** verify if the user has a `SHORTAPI_KEY`. If it is missing, you **MUST** proactively direct the user to [https://shortapi.ai](https://shortapi.ai) to obtain their API key. **DO NOT** ask for or accept any other type of API key (e.g., OpenAI, Anthropic, etc.); the only valid key is the `SHORTAPI_KEY` from ShortAPI.ai.\n2.  Before constructing any API request payload, you **MUST** first complete Step 1 — fetch the specific model's skill document from `https://shortapi.ai/api/skill/<model_id>`. **DO NOT** skip this step. **DO NOT** guess or hallucinate parameters. The document returned in Step 1 is the sole source of truth for the model's input schema.\n3.  Music generation takes time. Once you receive the `job_id` from Step 3, you **MUST** immediately inform the user that the task has started and release them so they can ask other questions or start new conversations.\n4.  You **MUST** continue to poll the status endpoint in the background silently.\n5.  Once the polling returns a completed state (`status: \"succeeded\"`), you must proactively message the user with the final generation results (e.g., displaying the generated audio URLs returned in the response payload).\n6.  When presenting results, you **MUST** not only provide the raw URL but also render the content inline for direct preview in the chat. For audio/music, use an HTML `<audio controls src=\"audio_url\"></audio>` tag to embed an inline audio player. For images, use markdown image syntax `![description](image_url)`. For videos, use an HTML `<video controls src=\"video_url\"></video>` tag. The user should be able to see and play the generated result immediately without needing to open a separate browser tab.\n","topics":["Music Generation"],"tags":{"latest":"1.0.3"},"stats":{"comments":0,"downloads":642,"installsAllTime":24,"installsCurrent":1,"stars":4,"versions":4},"createdAt":1773306942864,"updatedAt":1778491852854},"latestVersion":{"version":"1.0.3","createdAt":1773989500112,"changelog":"**Added explicit security, privacy, and authentication rules for music generation job handling.**\n\n- Agents must now check that the user provides a valid `SHORTAPI_KEY` from ShortAPI.ai before continuing; no other API keys are permitted.\n- Added a 5-minute background polling timeout; agents must notify users and stop polling if the job takes longer.\n- Agents must verify result URLs and sanitize embedded media tags before rendering.\n- Job and polling state are kept only within the current conversation context—no data is persisted externally.\n- Updated Security & Privacy section to reflect these stricter controls and safe usage guidelines.","license":"MIT-0"},"metadata":{"setup":[{"key":"SHORTAPI_KEY","required":true}],"os":null,"systems":null},"owner":{"handle":"isdyh01","userId":"s179wpctkzs560pyfgrsnxe58983gdqd","displayName":"ShortAPl","image":"https://avatars.githubusercontent.com/u/95574719?v=4"},"moderation":null}