/spotify-ads-api:assets upload <file_path> | list [audio|video|image] | get <asset_id>from spotify-ads-api
Uploads, lists, and manages Spotify Ads API creative assets (audio, video, images) for ad campaigns. Handles file uploads including chunked uploads for large files.
Ships in spotify-ads-api. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Upload, list, and retrieve creative assets (audio, video, images) for use in ads.
Set the plugin root and define the request wrapper:
PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}}"
api() { "$PLUGIN_ROOT/scripts/api-request.sh" assets "$@"; }
Before the first Ads API v3 call, read and follow $PLUGIN_ROOT/skills/api-reference/references/live-openapi.md.
Before sending any output to a human user, read and follow $PLUGIN_ROOT/skills/api-reference/references/language-standards.md.
To retrieve settings values (TOKEN, AD_ACCOUNT_ID, AUTO_EXECUTE, BASE_URL, SDK_HEADER, SKILL_HEADER, PLUGIN_VERSION) for use outside API calls, run api --env. The output is eval-safe, so eval $(api --env) assigns them all.
The argument format is: <operation> [arg]
upload <file_path> — Upload a new assetlist [audio|video|image] — List assets, optionally filtered by typeget <asset_id> — Get details of a specific assetupload <file_path>Two-step process following the API's required flow.
| Extensions | Asset Type |
|---|---|
.mp3, .wav, .ogg | AUDIO |
.mp4, .mov | VIDEO |
.png, .jpg, .jpeg | IMAGE |
If the extension doesn't match any of these, ask the user to specify the asset type.
Use AskUserQuestion to ask for the asset name (2-120 characters). Default to the filename without extension.
api POST "ad_accounts/{ad_account_id}/assets" \
'{"asset_type":"AUDIO","name":"my-creative"}'
Extract id from the response.
File uploads use raw curl (not the
apiwrapper) because they use multipart form data. Runeval $(api --env)before upload calls: it setsTOKEN,AD_ACCOUNT_ID,BASE_URL,SDK_HEADER, andSKILL_HEADER(already scoped to this skill). Keep-H "$SDK_HEADER"and-H "$SKILL_HEADER"on every upload call so the request stays attributable in reporting.
First, check the file size:
FILE_SIZE=$(stat -f%z "/path/to/file" 2>/dev/null || stat --printf="%s" "/path/to/file" 2>/dev/null || wc -c < "/path/to/file")
If file is <= 20MB — Simple upload:
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "$SDK_HEADER" \
-H "$SKILL_HEADER" \
-F "media=@/path/to/file" \
-F "asset_type=AUDIO" \
"$BASE_URL/ad_accounts/$AD_ACCOUNT_ID/assets/$ASSET_ID/upload"
If file is > 20MB — Chunked upload:
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "$SDK_HEADER" \
-H "$SKILL_HEADER" \
-H "Content-Type: application/json" \
"$BASE_URL/ad_accounts/$AD_ACCOUNT_ID/assets/$ASSET_ID/chunked_upload/start"
Extract upload_session_id and max_chunk_size_mb from the response.
CHUNK_DIR=$(mktemp -d)
split -b ${MAX_CHUNK_SIZE_MB}m /path/to/file "$CHUNK_DIR/chunk_"
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "$SDK_HEADER" \
-H "$SKILL_HEADER" \
-F "media=@$CHUNK_DIR/chunk_aa" \
-F "upload_section=1" \
"$BASE_URL/ad_accounts/$AD_ACCOUNT_ID/assets/$ASSET_ID/chunked_upload/transfer"
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "$SDK_HEADER" \
-H "$SKILL_HEADER" \
-H "Content-Type: application/json" \
-d '{"upload_session_id":"<session_id>","number_of_sections":<total_chunks>}' \
"$BASE_URL/ad_accounts/$AD_ACCOUNT_ID/assets/$ASSET_ID/chunked_upload/complete"
rm -rf "$CHUNK_DIR"
After upload, poll GET /assets/{id} until status changes from PROCESSING to READY or REJECTED. Poll every 3 seconds, max 60 seconds.
api GET "ad_accounts/{ad_account_id}/assets/$ASSET_ID"
Check the status field in the response. If still PROCESSING, wait 3 seconds and retry.
Show the final asset details:
If the asset was REJECTED, explain that the file may not meet format requirements and suggest checking the supported formats section below.
list [audio|video|image]List assets in the account, optionally filtered by type.
api GET "ad_accounts/{ad_account_id}/assets?asset_types=AUDIO&limit=50&sort_direction=DESC"
If no type filter is provided, omit the asset_types parameter to list all assets.
Format as table:
| ID | Name | Type | Status | Duration/Dimensions | Created |
|---|
If continuation_token is present in the response, note that more assets exist.
get <asset_id>Get full details of a specific asset.
api GET "ad_accounts/{ad_account_id}/assets/$ASSET_ID"
Display all fields in readable format:
| Type | Formats | Recommendations |
|---|---|---|
| Audio | MP3, WAV, OGG | 128kbps+, 44.1kHz+ sample rate |
| Video | MP4, MOV | Aspect ratios: 16:9, 1.91:1, 1:1, 9:16 |
| Image | PNG, JPEG | — |
auto_execute is true, execute each API call directly.auto_execute is false, present the curl command and ask for confirmation before executing.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub spotify/ads-agentic-tools --plugin spotify-ads-api20 skills in this plugin
/account-adminAdminister Spotify Ads API businesses and ad accounts: discover businesses and accounts, inspect or update supported profile and billing fields, create businesses or ad accounts, list members and roles, invite users, assign ad-account access, update roles, cancel invitations, and remove access. Use when a user asks to find an ad account by ID, audit access, onboard an agency or teammate, manage business/ad-account membership, or update supported account identity details./adsList or get Spotify Ads API ad sets and ads, and stage their creation or updates through drafts by default. Use direct live writes only when explicitly requested./spotify-ads-api-referenceThis skill should be used when the user asks to "call the Spotify Ads API", "create a Spotify ad campaign", "manage Spotify ads", "pull Spotify ad reports", "set up ad sets or ads", "upload ad assets", "target audiences on Spotify", "check campaign status", "get ad account info", "look up API schema or fields", "check what targeting options exist", or asks about Spotify advertising endpoints, request/response formats, enum values, or authentication.Other plugins' skills for the same job