Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Source royalty-free images and videos from Pexels API for design, placeholders, or content. Supports search, curated/popular content, collections, multiple resolutions, and ALWAYS creates detailed sidecar metadata files.
.claude/skills/nicepkg-pexels-media/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 123% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 286% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 141% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 415% | 0% |
Source high-quality, royalty-free images and videos from Pexels for design work, placeholders, or content creation.
This skill requires the PEXELS_API_KEY environment variable to be set.
bash# Check if API key is available echo $PEXELS_API_KEY
If not set, obtain a free API key from Pexels API.
https://api.pexels.com/v1/https://api.pexels.com/videos/All requests require the Authorization header:
bashcurl -H "Authorization: $PEXELS_API_KEY" "https://api.pexels.com/v1/search?query=nature"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/search?query=QUERY&orientation=ORIENTATION&size=SIZE&color=COLOR&locale=LOCALE&page=PAGE&per_page=PER_PAGE"
Parameters: | Parameter | Required | Values | |-----------|----------|--------| | query | Yes | Search term | | orientation | No | landscape, portrait, square | | size | No | large (24MP), medium (12MP), small (4MP) | | color | No | red, orange, yellow, green, turquoise, blue, violet, pink, brown, black, gray, white, or hex code (e.g., #ffffff) | | locale | No | en-US, pt-BR, es-ES, de-DE, fr-FR, ja-JP, zh-CN, ko-KR, etc. | | page | No | Page number (default: 1) | | per_page | No | Results per page (default: 15, max: 80) |
Trending photos curated by the Pexels team (updated hourly):
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/curated?page=1&per_page=15"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/photos/PHOTO_ID"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/videos/search?query=QUERY&orientation=ORIENTATION&size=SIZE&min_width=MIN_WIDTH&min_height=MIN_HEIGHT&min_duration=MIN_DURATION&max_duration=MAX_DURATION&page=PAGE&per_page=PER_PAGE"
Additional Video Parameters: | Parameter | Description | |-----------|-------------| | min_width | Minimum width in pixels | | min_height | Minimum height in pixels | | min_duration | Minimum duration in seconds | | max_duration | Maximum duration in seconds |
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/videos/popular?min_width=1920&min_duration=10&max_duration=60&page=1&per_page=15"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/videos/videos/VIDEO_ID"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/collections/featured?page=1&per_page=15"
bashcurl -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/collections/COLLECTION_ID?type=TYPE&page=1&per_page=15"
Type parameter: photos, videos, or omit for both.
When downloading photos, these sizes are available in the API response:
| Key | Description | |-----|-------------| | original | Original size uploaded by photographer | | large2x | Width 940px, height doubled | | large | Width 940px | | medium | Height 350px | | small | Height 130px | | portrait | Width 800px, height 1200px | | landscape | Width 1200px, height 627px | | tiny | Width 280px, height 200px |
Videos include multiple quality files in the response:
| Quality | Typical Resolution | |---------|-------------------| | hd | 1280x720 | | sd | 640x360 | | hls | Adaptive streaming | | Various | Full HD, 4K when available |
CRITICAL REQUIREMENT: For EVERY downloaded file, you MUST create a sidecar metadata file.
For a downloaded file mountain-sunset.jpg, create mountain-sunset.jpg.meta.json.
json{ "source": "pexels", "type": "photo", "id": 12345, "url": "https://www.pexels.com/photo/12345/", "download_url": "https://images.pexels.com/photos/12345/pexels-photo-12345.jpeg", "downloaded_size": "large", "width": 1920, "height": 1080, "photographer": "John Doe", "photographer_url": "https://www.pexels.com/@johndoe", "photographer_id": 67890, "avg_color": "#7E5835", "alt": "Brown mountain during sunset", "license": "Pexels License - Free for personal and commercial use", "attribution": "Photo by John Doe on Pexels", "attribution_html": "<a href=\"https://www.pexels.com/photo/12345/\">Photo</a> by <a href=\"https://www.pexels.com/@johndoe\">John Doe</a> on <a href=\"https://www.pexels.com\">Pexels</a>", "downloaded_at": "2025-12-02T14:30:00Z", "api_response": { // Full original API response for this photo } }
json{ "source": "pexels", "type": "video", "id": 12345, "url": "https://www.pexels.com/video/12345/", "download_url": "https://videos.pexels.com/video-files/12345/...", "downloaded_quality": "hd", "width": 1920, "height": 1080, "duration": 30, "user": { "id": 67890, "name": "John Doe", "url": "https://www.pexels.com/@johndoe" }, "video_files": [ { "id": 1, "quality": "hd", "file_type": "video/mp4", "width": 1920, "height": 1080, "link": "https://..." } ], "video_pictures": [ { "id": 1, "picture": "https://...", "nr": 0 } ], "license": "Pexels License - Free for personal and commercial use", "attribution": "Video by John Doe on Pexels", "downloaded_at": "2025-12-02T14:30:00Z", "api_response": { // Full original API response for this video } }
bash# Search for photos RESPONSE=$(curl -s -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/search?query=office+workspace&orientation=landscape&per_page=5") # Parse and display results echo "$RESPONSE" | jq '.photos[] | {id, photographer, alt, url: .src.large}'
bash# Get photo details PHOTO_ID=12345 PHOTO_DATA=$(curl -s -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/photos/$PHOTO_ID") # Extract download URL (choose size) DOWNLOAD_URL=$(echo "$PHOTO_DATA" | jq -r '.src.large') FILENAME="pexels-$PHOTO_ID-large.jpg" # Download the image curl -L -o "$FILENAME" "$DOWNLOAD_URL" # Create sidecar metadata (MANDATORY) echo "$PHOTO_DATA" | jq '{ source: "pexels", type: "photo", id: .id, url: .url, download_url: .src.large, downloaded_size: "large", width: .width, height: .height, photographer: .photographer, photographer_url: .photographer_url, photographer_id: .photographer_id, avg_color: .avg_color, alt: .alt, license: "Pexels License - Free for personal and commercial use", attribution: ("Photo by " + .photographer + " on Pexels"), downloaded_at: (now | todate), api_response: . }' > "$FILENAME.meta.json"
X-Ratelimit-LimitX-Ratelimit-RemainingX-Ratelimit-ResetWhile not legally required by the Pexels license, attribution is encouraged:
attribution_html from the sidecar filebash# Get 5 abstract/minimal images for placeholders curl -s -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/search?query=minimal+abstract&orientation=square&size=small&per_page=5"
bash# Find short, wide landscape videos curl -s -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/videos/search?query=nature+aerial&orientation=landscape&min_width=1920&min_duration=5&max_duration=15"
bash# Search for clean, neutral backgrounds curl -s -H "Authorization: $PEXELS_API_KEY" \ "https://api.pexels.com/v1/search?query=white+background+texture&color=white&size=large"
When using this skill:
PEXELS_API_KEY is set| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-11 | pass→pass | 7,287 | 2,482 | -66% | 1 | 1 | 0% | 1,203 | 3,493 | +190% | 0 | 0 | — |
case-16 | pass→pass | 2,893 | 3,239 | +12% | 1 | 1 | 0% | 504 | 3,653 | +625% | 0 | 0 | — |
case-01 | fail→fail | 30,083 | 15,336 | -49% | 1 | 1 | 0% | 5,860 | 3,388 | -42% | 0 | 0 | — |
case-02 | fail→fail | 14,442 | 5,384 | -63% | 1 | 1 | 0% | 2,544 | 3,381 | +33% | 0 | 0 | — |
case-03 | fail→fail | 7,477 | 4,433 | -41% | 1 | 1 | 0% | 1,085 | 3,311 | +205% | 0 | 0 | — |
case-04 | pass→pass | 13,278 | 5,781 | -56% | 1 | 1 | 0% | 2,306 | 4,086 | +77% | 0 | 0 | — |
case-05 | pass→pass | 9,013 | 2,793 | -69% | 1 | 1 | 0% | 1,731 | 3,588 | +107% | 0 | 0 | — |
case-06 | pass→pass | 7,531 | 4,888 | -35% | 1 | 1 | 0% | 1,471 | 4,052 | +175% | 0 | 0 | — |
case-07 | fail→pass | 8,557 | 3,645 | -57% | 1 | 1 | 0% | 1,704 | 3,808 | +123% | 0 | 0 | — |
case-08 | pass→pass | 8,673 | 2,977 | -66% | 1 | 1 | 0% | 1,634 | 3,578 | +119% | 0 | 0 | — |
case-09 | fail→pass | 8,692 | 3,112 | -64% | 1 | 1 | 0% | 1,558 | 3,600 | +131% | 0 | 0 | — |
case-10 | fail→pass | 5,143 | 2,009 | -61% | 1 | 1 | 0% | 884 | 3,412 | +286% | 0 | 0 | — |
case-12 | fail→fail | 8,851 | 1,981 | -78% | 1 | 1 | 0% | 1,385 | 3,356 | +142% | 0 | 0 | — |
case-13 | fail→pass | 9,124 | 2,028 | -78% | 1 | 1 | 0% | 1,439 | 3,466 | +141% | 0 | 0 | — |
case-14 | pass→pass | 5,133 | 2,635 | -49% | 1 | 1 | 0% | 833 | 3,548 | +326% | 0 | 0 | — |
case-15 | fail→pass | 3,996 | 1,496 | -63% | 1 | 1 | 0% | 642 | 3,304 | +415% | 0 | 0 | — |
case-17 | pass→pass | 4,428 | 3,594 | -19% | 1 | 1 | 0% | 625 | 3,684 | +489% | 0 | 0 | — |
case-18 | pass→pass | 5,796 | 1,896 | -67% | 1 | 1 | 0% | 992 | 3,379 | +241% | 0 | 0 | — |
case-19 | pass→pass | 14,809 | 2,087 | -86% | 1 | 1 | 0% | 2,371 | 3,389 | +43% | 0 | 0 | — |
case-20 | pass→pass | 7,884 | 4,470 | -43% | 1 | 1 | 0% | 1,346 | 3,836 | +185% | 0 | 0 | — |
case-21 | pass→pass | 7,540 | 4,822 | -36% | 1 | 1 | 0% | 1,348 | 3,936 | +192% | 0 | 0 | — |
case-22 | pass→pass | 14,374 | 13,584 | -5% | 1 | 1 | 0% | 2,696 | 5,613 | +108% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +23 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.