InfinityLooper
搜尋並下載免費的無縫循環影片背景,適用於直播、VTuber 場景、音樂影片和桌布。搜尋無需登入。
託管 MCP 伺服器
npx add-mcp 'https://infinitylooper.com/mcp'可安裝到 Claude Code、Codex、Cursor 等客戶端
文件
InfinityLooper API
Search thousands of free looping video backgrounds and download the MP4s from scripts, apps and AI agents.
Keys
Search needs no key; downloads need a free API key and share your account's allowance.
Base URL
https://infinitylooper.com/api/v1, JSON answers, RFC 9457 errors.
MCP server
https://infinitylooper.com/mcp for Claude, ChatGPT, Claude Code, Cursor, VS Code, Gemini CLI and other MCP apps. Search needs no sign-in; downloads sign in with Google.
For machines
API catalogue, OpenAPI 3.1 spec, this guide in Markdown, agent skill, llms.txt.
Just want a video?
Browse the loops and download them on the site.
Use it with an AI agent
Give your agent this prompt. It is all the agent needs to find and download loops:
Use the InfinityLooper API to find and download free looping video backgrounds. Read https://infinitylooper.com/developers.md first. My API key is in the INFINITYLOOPER_API_KEY environment variable. Never print the key. If the variable is not set, search without it and ask me to create a key at https://infinitylooper.com/account#api-keys.
MCP server
Add InfinityLooper to your AI app and ask for loops in plain words. The server is https://infinitylooper.com/mcp. Searching needs no sign-in. The first time you download, your app opens a Google sign-in; after you choose Allow it can download loops with your account. Downloads use the same allowance as the website.
One-click install: Add to Cursor or Add to VS Code.
In Claude, open Settings, then Connectors, choose Browse connectors and search for InfinityLooper. Or choose Add custom connector and use the details below.
Name: InfinityLooper
URL: https://infinitylooper.com/mcp
Choose Connect, sign in with Google and choose Allow.
Quickstart
1. Search, no key needed
curl "https://infinitylooper.com/api/v1/loops?q=fireplace&orientation=landscape&limit=3"
Open this example as JSON. Results include the canonical loop page in url, a public preview_url, full download specifications in file, and source-specific terms in licence. Share the loop page with people who will sign in with Google to download it. You can also browse the public HTML catalogue without a key.
2. Get an API key
Sign in with Google at infinitylooper.com/account#api-keys and choose Create key. The key is shown once, so put it straight into an environment variable:
export INFINITYLOOPER_API_KEY="il_live_..."
3. Download
curl -s -X POST "https://infinitylooper.com/api/v1/loops/fox-sleeping-by-a-snowy-fireplace/download" \
-H "Authorization: Bearer $INFINITYLOOPER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
| jq -r '.files[0].url' \
| xargs curl -L -o fox-sleeping-by-a-snowy-fireplace.mp4
The answer has a link for each file that works for 10 minutes. Fetch the files straight away, from your script or server.
Connect to Claude
Give Claude two tools: one to search and one to download. The Anthropic Python SDK runs the tool loop for you.
import os, uuid, requests
import anthropic
from anthropic import beta_tool
API = "https://infinitylooper.com/api/v1"
KEY = os.environ["INFINITYLOOPER_API_KEY"]
@beta_tool
def search_loops(query: str, orientation: str = "", min_height: int = 0) -> str:
"""Search InfinityLooper's free looping video backgrounds.
Args:
query: Search words, for example "rain window" or "space".
orientation: "landscape", "vertical" or "" for any.
min_height: Smallest frame height in pixels, 1080 for Full HD or 2160 for 4K. 0 for any.
"""
params = {"q": query, "limit": 5}
if orientation:
params["orientation"] = orientation
if min_height:
params["min_height"] = min_height
return requests.get(f"{API}/loops", params=params).text
@beta_tool
def download_loop(slug: str) -> str:
"""Download a loop's MP4 into the current folder and return the saved file names.
Args:
slug: The loop's slug from search_loops.
"""
r = requests.post(f"{API}/loops/{slug}/download",
headers={"Authorization": f"Bearer {KEY}", "Idempotency-Key": str(uuid.uuid4())})
if not r.ok:
return r.text
names = []
for f in r.json()["files"]:
with open(f["name"], "wb") as out:
out.write(requests.get(f["url"]).content)
names.append(f["name"])
return "Saved " + ", ".join(names)
client = anthropic.Anthropic()
runner = client.beta.messages.tool_runner(
model="claude-opus-5-5",
max_tokens=16000,
betas=["server-side-fallback-2026-07-01"],
fallbacks="default",
tools=[search_loops, download_loop],
messages=[{"role": "user", "content": "Find a calm rainy window loop in 1080p and download it."}],
)
for message in runner:
for block in message.content:
if block.type == "text":
print(block.text)
Connect to OpenAI
Use function calling in the Responses API. The two functions are the same as in the Claude example: search_loops and download_loop.
import json
from openai import OpenAI
# search_loops and download_loop: the same functions as in the Claude example, without the @beta_tool line.
TOOLS = [
{"type": "function", "name": "search_loops",
"description": "Search InfinityLooper's free looping video backgrounds.",
"parameters": {"type": "object", "properties": {
"query": {"type": "string", "description": "Search words, for example rain window or space."},
"orientation": {"type": "string", "enum": ["", "landscape", "vertical"]},
"min_height": {"type": "integer", "description": "1080 for Full HD, 2160 for 4K, 0 for any."}},
"required": ["query"]}},
{"type": "function", "name": "download_loop",
"description": "Download a loop's MP4 into the current folder.",
"parameters": {"type": "object", "properties": {"slug": {"type": "string"}}, "required": ["slug"]}},
]
FUNCTIONS = {"search_loops": search_loops, "download_loop": download_loop}
client = OpenAI()
items = [{"role": "user", "content": "Find a calm rainy window loop in 1080p and download it."}]
while True:
response = client.responses.create(model="gpt-5", tools=TOOLS, input=items)
calls = [o for o in response.output if o.type == "function_call"]
if not calls:
print(response.output_text)
break
items += response.output
for call in calls:
result = FUNCTIONS[call.name](**json.loads(call.arguments))
items.append({"type": "function_call_output", "call_id": call.call_id, "output": result})
Agent skill
The skill teaches coding agents such as Claude Code, Codex and Cursor how to use this API: when to search, how to download, and how to handle errors and downloads left.
mkdir -p ~/.claude/skills/infinitylooper
curl -o ~/.claude/skills/infinitylooper/SKILL.md https://infinitylooper.com/skills/infinitylooper/SKILL.md
Other agents can read the same file from infinitylooper.com/skills/infinitylooper/SKILL.md or from this guide.
Authentication
Send your key in the Authorization header:
Authorization: Bearer il_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Search, loop details and themes need no key; downloads and /me do. A key spends the downloads of the Google account that created it. Create and revoke keys at infinitylooper.com/account#api-keys; a revoked key stops at once. Keys start with il_live_ so secret scanners can spot a leak, and carry the read and download scopes.
Endpoints
Every GET endpoint also answers HEAD with the same headers and no body. Send each query parameter once: one the endpoint does not take, or one sent twice, gets a 400 that names it.
API index
GET/
curl "https://infinitylooper.com/api/v1"
Returns the API's name and version, this guide, the URL of each endpoint and the OpenAPI spec.
Search loops
GET/loops
| Parameter | Type | Default | Description |
|---|---|---|---|
q | string | Search words, ranked like the search box on the site, up to 200 characters. Spelling variants (cosy, cozy), synonyms (galaxy, space), plurals and typos are understood. | |
theme | string | A theme id from GET /themes, for example rain or fireplace. | |
orientation | string | landscape or vertical. | |
min_height | integer | Smallest frame height in pixels, up to 10000. For landscape loops 1080 is Full HD and 2160 is 4K. Vertical loops are taller than they are wide. | |
has_audio | boolean | true or false. Every loop is silent today, so true returns nothing. A loop whose sound has not been measured has null and matches neither. | |
max_duration | integer | Longest loop length in whole seconds, inclusive, up to 86400. | |
limit | integer | 20 | Results per page, 1 to 100. Whole numbers are written in digits: 10 (or 10.0), never 1e1 or 10.5. |
cursor | string | next_cursor from the previous page. |
curl "https://infinitylooper.com/api/v1/loops?theme=fireplace&limit=1"
{
"data": [
{
"id": "IL-AB-0016",
"slug": "fox-sleeping-by-a-snowy-fireplace",
"title": "Fox sleeping by a snowy fireplace animated background",
"url": "https://infinitylooper.com/free/animated-backgrounds/fox-sleeping-by-a-snowy-fireplace",
"description": "A fox sleeps beside a fireplace with snow-covered trees outside. A silent 10-second 1080p loop, 3.6 MB.",
"best_for": ["TV ambience", "Stream scene in OBS or Streamlabs"],
"tags": ["fox", "fireplace", "snow", "winter"],
"themes": ["snow", "fireplace", "cute-animals"],
"preview_url": "https://infinitylooper.com/previews/v4/IL-AB-0016.mp4",
"poster_url": "https://infinitylooper.com/free/posters/hd/IL-AB-0016-640.webp",
"file": {
"width": 1916,
"height": 1080,
"resolution": "1916 x 1080 (1080p Full HD)",
"orientation": "landscape",
"duration_seconds": 10.041667,
"format": "MP4 (H.264)",
"has_audio": false,
"size": "3.6 MB"
},
"licence": { "type": "standard", "credit": null, "source_url": null, "url": "https://infinitylooper.com/terms#licence" }
}
],
"next_cursor": "eyJvIjoxfQ",
"total": 499
}
Pass next_cursor back as cursor to get the next page. It is null on the last page. Counts in these examples change as the library grows.
When you send q, the answer also has a search object that says how the words were read:
{ "search": { "query": "cozy rain window", "words": ["cosy", "rain", "window"], "dropped": [], "relaxed": [], "corrected_to": null } }
A word that no loop matches together with the others is set aside and listed in dropped, so you still get the closest loops. When nothing matches at all, data is empty and every word is in dropped.
Get a loop
GET/loops/{slug}
Takes the slug or the id (IL-AB-0016). Returns one loop in the same shape as a search result.
curl "https://infinitylooper.com/api/v1/loops/fox-sleeping-by-a-snowy-fireplace"
List themes
GET/themes
curl "https://infinitylooper.com/api/v1/themes"
{
"data": [
{ "id": "rain", "name": "Rain", "url": "https://infinitylooper.com/free/theme/rain", "count": 331 },
{ "id": "snow", "name": "Snow and winter", "url": "https://infinitylooper.com/free/theme/snow", "count": 289 }
],
"total": 23
}
Every id in a loop's themes is listed here and works as the theme filter.
Download a loop
POST/loops/{slug}/download
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer <your API key> |
Idempotency-Key | no | Any unique string, 1 to 128 visible characters. A retry with the same value is never counted twice. |
curl -X POST "https://infinitylooper.com/api/v1/loops/fox-sleeping-by-a-snowy-fireplace/download" \
-H "Authorization: Bearer $INFINITYLOOPER_API_KEY" \
-H "Idempotency-Key: 6f1c2b8e-3d47-4b0a-9a51-2e8f0c7d9b14"
{
"loop": {
"id": "IL-AB-0016",
"slug": "fox-sleeping-by-a-snowy-fireplace",
"title": "Fox sleeping by a snowy fireplace animated background",
"url": "https://infinitylooper.com/free/animated-backgrounds/fox-sleeping-by-a-snowy-fireplace",
"licence": { "type": "standard", "credit": null, "source_url": null, "url": "https://infinitylooper.com/terms#licence" }
},
"files": [
{
"name": "fox-sleeping-by-a-snowy-fireplace.mp4",
"bytes": 3751747,
"variant": null,
"url": "<signed link to the file, valid for 10 minutes>",
"expires_at": "2026-11-17T09:10:00.000Z"
}
],
"redownload": false,
"counted": true
}
The answer also has a usage object with your account's numbers, the same as GET /me:
| Field | Type | Description |
|---|---|---|
plan | string | free or max. |
limit | integer | Downloads allowed in the rolling window. |
used | integer | Downloads counted in the window. |
remaining | integer | Downloads left. |
resets_at | string or null | When the oldest counted download leaves the window. null while there is room. |
window_days | integer | Length of the rolling window, 30. |
redownload is true, and nothing is counted, when the account already downloaded this loop in the last 30 days. A retry with the same Idempotency-Key on the same day is not counted either: it answers counted: false with redownload: false. Some loops have more than one file, such as a vertical cut: variant names it.
Check your downloads
GET/me
curl "https://infinitylooper.com/api/v1/me" -H "Authorization: Bearer $INFINITYLOOPER_API_KEY"
Returns the usage fields above, plus key with its id and scopes. Through the MCP server with a Google sign-in the answer has signed_in instead of key. Call it before a batch of downloads.
Downloads and rate limits
- Downloads: scripts and agents are welcome to download in bulk, within the account's downloads. Your keys and the website share one download allowance per account over a rolling 30 days. A loop the account already downloaded in that time is free to download again. Check
GET /me, or read these headers on/meand download answers, including afree-limitrefusal:
RateLimit-Policy: "downloads";q=<allowance>;w=2592000
RateLimit: "downloads";r=<remaining>;t=<seconds until one frees up>
- Requests: up to 120 requests a minute from one address, and 30 a minute per key and per account. Over a limit you get a
rate-limitedproblem withRetry-Afterin seconds and the same number inretry_after_seconds. The edge may answer the address limit with a plain-text429instead: wait a minute. Requests an MCP app makes with your key count towards the key's limit. - File links work for 10 minutes (
expires_at). Ask for new ones with the same call. A re-download of the same loop is free. - Search answers may be cached for up to five minutes.
Errors
Every error has type, title, status and detail. Switch on type, which ends in one of these:
| Status | type | What to do |
|---|---|---|
| 400 | invalid-parameter | A parameter is unknown, sent more than once or not valid, or the Idempotency-Key header is not valid. The parameter field names it. |
| 401 | unauthorized | No key was sent. Add Authorization: Bearer <your key>. Every 401 carries a WWW-Authenticate header. |
| 401 | invalid-key | The key is wrong or revoked. Create a new one on your account page. |
| 403 | insufficient-scope | The key does not have permission for this endpoint. |
| 405 | method-not-allowed | Wrong HTTP method. Downloads are POST, everything else is GET or HEAD. The Allow header lists them. |
| 429 | free-limit | The account has used its downloads for now. resets_at and Retry-After say when the next one is available. Loops it already downloaded stay free. |
| 429 | rate-limited | Too many requests with this key, from this account or from one address. Wait for Retry-After seconds, also given as retry_after_seconds. The edge may answer too many from one address with a plain-text 429 instead: wait a minute. |
| 503 | unavailable | A service the API needs is down. Nothing was charged. Retry after Retry-After. |
{
"type": "https://infinitylooper.com/developers#errors-invalid-key",
"title": "Invalid API key",
"status": 401,
"detail": "This API key is not valid or has been revoked. Create a new one at https://infinitylooper.com/account#api-keys."
}
Licence and credit
Every loop names its licence, and the download answer repeats it. The licence at infinitylooper.com/terms#licence covers personal, commercial and client work, including monetised videos and streams. Public domain loops name their source in licence.source_url. When licence.credit is set, show that credit. A few loops also have licence.source_component, which names a separately licensed source the loop was made from: its kind, creator, url, licence_url, modification and generation_credit.