{"openapi": "3.1.0", "info": {"title": "Loopshelf API", "version": "2.0", "description": "Поиск свободных картинок и гифок с лицензией и готовой атрибуцией. Источники: Викисклад, Метрополитен-музей, Openverse, KLIPY. Ключи не нужны. MCP: POST /mcp (JSON-RPC 2.0). Подсказки для моделей: /llms.txt"}, "servers": [{"url": "https://loopshelf.space"}], "paths": {"/api/v1/search": {"get": {"summary": "Поиск", "parameters": [{"name": "q", "in": "query", "required": true, "schema": {"type": "string"}}, {"name": "kind", "in": "query", "schema": {"type": "string", "enum": ["all", "photo", "art", "anim"], "default": "all"}}, {"name": "source", "in": "query", "schema": {"type": "string", "enum": ["all", "commons", "met", "openverse", "nasa", "klipy"], "default": "all"}}, {"name": "page", "in": "query", "schema": {"type": "integer", "default": 1, "minimum": 1, "maximum": 20}}, {"name": "limit", "in": "query", "schema": {"type": "integer", "default": 24, "maximum": 60}}, {"name": "orientation", "in": "query", "schema": {"type": "string", "enum": ["any", "landscape", "portrait", "square"], "default": "any"}}, {"name": "commercial", "in": "query", "schema": {"type": "boolean", "default": false}, "description": "только лицензии, пригодные для коммерческого использования (без NC и ND)"}, {"name": "wait", "in": "query", "schema": {"type": "string", "enum": ["full"]}, "description": "wait=full — дождаться всех источников (до 20 с); без него ответ через ≤4,5 с, а не успевшие источники перечислены в pending: повторите тот же запрос через несколько секунд"}], "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"query": {"type": "string"}, "page": {"type": "integer"}, "count": {"type": "integer"}, "pending": {"type": "array", "items": {"type": "string"}, "description": "источники, которые ещё не ответили"}, "items": {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "string", "description": "стабильный id (sha1 исходного url)"}, "title": {"type": "string"}, "kind": {"type": "string", "enum": ["photo", "art", "anim"]}, "author": {"type": "string"}, "license": {"type": "string"}, "license_url": {"type": "string"}, "attribution": {"type": "string", "description": "готовая строка атрибуции"}, "source": {"type": "string"}, "source_key": {"type": "string"}, "page": {"type": "string", "description": "страница у источника"}, "orig": {"type": "string", "description": "исходный файл у источника"}, "thumb": {"type": "string", "description": "превью ≤480 px, относительный путь на loopshelf.space"}, "large": {"type": "string", "description": "просмотр ≤1400 px"}, "full": {"type": "string"}, "mp4": {"type": "string", "description": "только гифки: та же анимация в mp4 (легче)"}, "width": {"type": ["integer", "null"]}, "height": {"type": ["integer", "null"]}, "meta": {"type": "string"}}}}}}}}}}}}, "/api/v1/item/{id}": {"get": {"summary": "Карточка по id", "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "string"}}], "responses": {"200": {"description": "ok", "content": {"application/json": {"schema": {"type": "object", "properties": {"id": {"type": "string", "description": "стабильный id (sha1 исходного url)"}, "title": {"type": "string"}, "kind": {"type": "string", "enum": ["photo", "art", "anim"]}, "author": {"type": "string"}, "license": {"type": "string"}, "license_url": {"type": "string"}, "attribution": {"type": "string", "description": "готовая строка атрибуции"}, "source": {"type": "string"}, "source_key": {"type": "string"}, "page": {"type": "string", "description": "страница у источника"}, "orig": {"type": "string", "description": "исходный файл у источника"}, "thumb": {"type": "string", "description": "превью ≤480 px, относительный путь на loopshelf.space"}, "large": {"type": "string", "description": "просмотр ≤1400 px"}, "full": {"type": "string"}, "mp4": {"type": "string", "description": "только гифки: та же анимация в mp4 (легче)"}, "width": {"type": ["integer", "null"]}, "height": {"type": ["integer", "null"]}, "meta": {"type": "string"}}}}}}, "404": {"description": "нет такого"}}}}, "/api/v1/pack": {"get": {"summary": "Подборка по id: карточки и общий текст атрибуции", "parameters": [{"name": "ids", "in": "query", "required": true, "schema": {"type": "string"}, "description": "id через запятую, до 60"}], "responses": {"200": {"description": "ok"}}}}, "/api/v1/random": {"get": {"summary": "Случайная находка из подборок", "parameters": [{"name": "kind", "in": "query", "schema": {"type": "string", "enum": ["all", "photo", "art", "anim"]}}], "responses": {"200": {"description": "ok"}}}}, "/api/v1/sources": {"get": {"summary": "Включённые источники", "responses": {"200": {"description": "ok"}}}}, "/mcp": {"post": {"summary": "MCP (JSON-RPC 2.0): initialize, tools/list, tools/call", "responses": {"200": {"description": "ok"}}}}}}