Установка
SKILL.md
Modal Sandboxes
Disposable remote containers (with optional GPU) via Modal, paid per call in USDC. No Modal account, no GPU procurement.
READ THIS BEFORE SETTING timeout
timeout is the BILLED lifetime, charged upfront in full, and never refunded — not an idle timeout. Above 300s the price switches from a flat rate to per-hour billing for the entire duration you ask for, whether you use it or not. Terminating early refunds nothing.
That makes timeout the single most expensive field in this MCP:
| what you ask for | what you pay |
|---|---|
{ timeout: 300 } | $0.0120 |
{ timeout: 300, gpu: "A100" } | $0.2020 |
{ timeout: 600, gpu: "A100" } | $0.6687 |
{ timeout: 86400, gpu: "H100" } | $192.0020 |
All four are live-verified quotes. A 24h H100 sandbox costs $192 upfront, non-refundable, even if your job finishes in a minute.
So: ask for the time you need, not a safe-looking ceiling. Need 20 minutes of H100? timeout: 1200 is $2.67, not $192. Keep timeout ≤ 300 and you stay on the flat rate entirely.
How to Call from MCP
// 1. Create — timeout: 300 keeps you on the FLAT rate ($0.0120, or $0.2020 with A100).
// Anything above 300 bills hourly for the full requested lifetime, no refund.
blockrun_modal({ path: "sandbox/create", body: {
image: "python:3.11",
gpu: "A100",
timeout: 300,
setup_commands: ["pip install torch transformers"]
}})
// returns { sandbox_id, ... }
// 2. Exec
blockrun_modal({ path: "sandbox/exec", body: {
sandbox_id: "sb_abc...",
command: ["python", "-c", "import torch; print(torch.cuda.get_device_name(0))"]
}})
// 3. Terminate
blockrun_modal({ path: "sandbox/terminate", body: { sandbox_id: "sb_abc..." } })
Endpoint Catalog
| Path | Method | Body | Price |
|---|---|---|---|
sandbox/create | POST | { image?, timeout?, cpu?, memory?, gpu?, setup_commands? } | depends on timeout + gpu — see below |
sandbox/exec | POST | { sandbox_id, command: ["python","-c","..."], timeout? } | $0.0030 |
sandbox/status | POST | { sandbox_id } | $0.0030 |
sandbox/terminate | POST | { sandbox_id } | $0.0030 |
sandbox/create pricing is bimodal
timeout ≤ 300s — flat rate, charged once:
| gpu | price |
|---|---|
| (none, CPU) | $0.0120 |
T4 | $0.0520 |
L4 | $0.0820 |
A10G | $0.1020 |
A100 | $0.2020 |
H100 | $0.4020 |
timeout > 300s — per-hour × the full requested lifetime, upfront, no refund:
| gpu | per hour | 1h | 24h (max) |
|---|---|---|---|
| (none, CPU) | $0.10 | $0.1020 | $2.4020 |
T4 | $1.50 | $1.5020 | $36.0020 |
L4 | $2.00 | $2.0020 | $48.0020 |
A10G | $2.50 | $2.5020 | $60.0020 |
A100 | $4.00 | $4.0020 | $96.0020 |
H100 | $8.00 | $8.0020 | $192.0020 |
Hours are exact, not rounded up — timeout: 1800 on A100 is 0.5h = $2.0020. Every figure above includes the $0.002 flat transaction fee. Max timeout is 86400 (24h).
One quirk worth knowing: timeout: 300 costs $0.0120 (flat) but timeout: 301 costs $0.0104 (CPU-hourly) — just past the cliff is briefly cheaper on CPU. It stops being cheaper around 432s.
Field Reference
| Field | Default | Notes |
|---|---|---|
image | python:3.11 | Any public Docker image. nvidia/cuda:12-runtime if you bring GPU code. |
timeout | 300 | BILLED lifetime in seconds — charged upfront for the full amount, never refunded. NOT idle eviction: you pay for what you ask for, not what you use. ≤300 = flat rate; >300 switches to per-hour billing (see the tables above). Max 86400 (24h). This is the field that turns a $0.01 sandbox into a $192 one. |
cpu | 1 | CPU cores |
memory | 1024 | Memory in MB |
gpu | none | T4 / L4 / A10G / A100 / H100 — those five only. Anything else is rejected: {"gpu":"A100-80GB"} returns HTTP 400 "Unsupported GPU type. Allowed: T4, L4, A10G, A100, H100". Drives the price hard — see the tables above. |
setup_commands | [] | Shell commands run once during sandbox provisioning |
command (exec) | required | Array form: ["python","-c","print(2+2)"] |
Worked Examples
1. Quick Python eval
const { structuredContent: sb } = await blockrun_modal({ path: "sandbox/create", body: {} })
await blockrun_modal({ path: "sandbox/exec", body: {
sandbox_id: sb.sandbox_id,
command: ["python", "-c", "import numpy; print(numpy.__version__)"]
}})
await blockrun_modal({ path: "sandbox/terminate", body: { sandbox_id: sb.sandbox_id } })
Cost: $0.0180 — create $0.0120 + exec $0.0030 + terminate $0.0030. Every call carries the $0.002 transaction fee, so three calls pay it three times; batch your work into one exec rather than several.
2. GPU inference, A100, with deps pre-installed
blockrun_modal({ path: "sandbox/create", body: {
image: "pytorch/pytorch:2.4.0-cuda12.1-cudnn9-runtime",
gpu: "A100",
timeout: 1200,
memory: 16384,
setup_commands: ["pip install --quiet transformers accelerate"]
}})
Then sandbox/exec with your inference command.
Cost: $1.3413 — create $1.3353 + exec $0.0030 + terminate $0.0030. timeout: 1200 is above the 300s flat tier, so the A100 bills hourly for the full 20 minutes you asked for: $4.00/h × (1200/3600) = $1.3333, + the $0.002 fee. It is charged upfront and never refunded — it does NOT auto-evict when idle, and terminating after 30 seconds still costs the full $1.3353. Ask for the time you actually need.
3. Test untrusted code Claude generated
blockrun_modal({ path: "sandbox/exec", body: {
sandbox_id,
command: ["bash", "-c", "<the generated script>"],
timeout: 60
}})
Output is captured. No risk to your local machine.
When NOT to Use Modal
- Normal repo edits / dev work — use local tools, Modal adds latency and cost
- Long-running services — sandboxes are ephemeral, not server hosts
- Anything you'd run hundreds of times per minute — payment overhead dominates at high QPS
Notes
sandbox_idis returned bycreateand required by every other endpointexecis sync — blocks until command finishes or hits itstimeoutterminateis cheap; call it to free the sandbox even iftimeoutwould expire shortly- The free-tier
nvidia/*LLM models inblockrun_chatare different infrastructure — Modal is for your arbitrary code
Reference
- Endpoints:
POST /v1/modal/sandbox/{create,exec,status,terminate} - Upstream: Modal
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: modal](https://darkplay.ru/ai/skills/blockrunai-blockrun-mcp-modal)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
pixeltableanthropics · Создание мультимодальных AI-приложений с Pixeltable — таблицы, вычисляемые столбцы, поиск…
pixeltableanthropics · Создание мультимодальных AI-приложений с Pixeltable: таблицы, вычисляемые столбцы, поиск…
infrastructureorchestra-research · Облачные GPU и оркестрация вычислений: Modal, Lambda Labs и SkyPilot. Используйте при…
multimodalorchestra-research · Модели для зрения, аудио и мультимодальных задач: CLIP, Whisper, LLaVA, BLIP-2, Segment…
minimax-skillsminimax-ai · Библиотека навыков MiniMax AI для фронтенда, фулстека, Android, iOS, шейдеров…
daftanthropics · Навыки работы с Daft — высокопроизводительным движком данных для ИИ и мультимодальных…
gemini-plugin-ccanthropics · Плагин gemini-plugin-cc для Claude Code: ревью кода, делегирование задач и…
phasefolioanthropics · Моделирование rNPV и due diligence биотех-активов в Claude Code на основе данных…
rs-dl-architectanthropics · rs-dl-architect — экспертное руководство по проектированию, анализу и ревью архитекту�…
video-to-code-skillanthropics · Загружает видео в контекст Claude как транскрипцию и сводку, синхронизированные с…Лучшие ИИ-инструменты для программирования
Подборка нейросетей и ИИ-ассистентов для разработки и автоматизации кода. Сервисы, которые ускоряют написание, ревью и отладку, экономят часы рутины и снижают порог входа в сложные
GenAPIGenapi
Notepad++ AINotepad-plus-plus
Creatium MaxCremax
Emacs AIGnu
KiteKite
Amazon Q DeveloperAmazonЛучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachat