modal-endpoints
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Modal Auto Endpoints — production LLM inference with modal endpoint CLI. Use when deploying OpenAI-compatible chat completions for catalog or custom models (HF/Volume), configuring proxy tokens, routing regions, or choosing Endpoints vs custom @app.server / vLLM Functions. Triggers on: "modal endpoint", "Auto Endpoints", "modal endpoint create", "OpenAI-compatible Modal", "LLM endpoint Modal", "proxy tokens Modal".
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Use this skill when deploying Auto Endpoints: managed, OpenAI API-compatible LLM inference on Modal with minimal configuration (SDK/CLI …
- Distinctive: line 24
Prefer managed speculative decoding / recipes over writing server code first
- Very specific: line 26
Prefer a custom @app.server when you need full control of engine flags, multi-model routers, or non-OpenAI protocols.
- Very specific: line 60
Always pass a catalog --model (recipe base), then custom weights:
- Distinctive: line 102
Stop tears down containers and stops compute billing.
- Very specific: line 118
Create proxy token; pass both headers.
- Distinctive: line 123
Prefer Volume-cached weights for custom checkpoints
- Distinctive: line 126
Use the base/catalog repo id (or custom HF id), not the Endpoint display name
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Modal Endpoints
Use this skill when deploying Auto Endpoints: managed, OpenAI API-compatible LLM inference on Modal with minimal configuration (SDK/CLI 1.5.1+).
Endpoints are built on Modal Servers. For custom server code, see modal-servers. For hand-rolled vLLM/SGLang Functions, see modal-web-serving / modal-scaling-performance.
When to Use This Skill
- Need a production LLM API with one CLI command
- Serving catalog models (Qwen, Kimi, Gemma, DeepSeek, Nemotron, GPT-OSS, GLM, …)
- Serving fine-tunes from Hugging Face or a Modal Volume
- Want scale-to-zero, usage-based GPU billing, and tuned engine recipes
- Prefer managed speculative decoding / recipes over writing server code first
Prefer a custom @app.server when you need full control of engine flags, multi-model routers, or non-OpenAI protocols.
Quick Start
# Proxy token (required unless --unauthenticated)
modal workspace proxy-tokens create
# With RBAC:
modal workspace proxy-tokens allow wk-... main
modal endpoint create --model Qwen/Qwen3.5-4B
# Optional explicit name; default derived from model id
modal endpoint create --name agent --model zai-org/GLM-5.2-FP8Dashboard: Endpoints tab mirrors CLI options.
Calling the API
OpenAI Chat Completions under /v1. Model name = base catalog repo id (or custom HF repo id).
curl "<endpoint-url>/v1/models" \
-H "Modal-Key: $MODAL_PROXY_TOKEN_ID" \
-H "Modal-Secret: $MODAL_PROXY_TOKEN_SECRET"
# Or for quick tests (auth injected; higher latency):
modal curl "<endpoint-url>/v1/models"Find URLs: dashboard or modal endpoint list.
Custom Weights
Always pass a catalog --model (recipe base), then custom weights:
# Hugging Face fine-tune
modal endpoint create \
--name my-ft \
--model Qwen/Qwen3.6-27B \
--custom-hf-repo org/my-ft \
--custom-hf-revision <sha> \
--custom-hf-token "$HF_TOKEN" # if gated/private
# Modal Volume (directory must contain config.json)
modal endpoint create \
--name my-volume-ft \
--model Qwen/Qwen3.5-4B \
--custom-volume-name my-volume \
--custom-volume-path /checkpoints/1234Placement
| Flag | Meaning |
--routing-region | Proxy anchor near callers: us-west (docs default for endpoints), us-east, ca-central, eu-west, ap-south |
--compute-region | Pin container regions (repeatable); incurs region multiplier |
--colocate-compute | Run compute in the routing region |
modal endpoint create \
--model Qwen/Qwen3.5-4B \
--routing-region us-east \
--compute-region us-westLifecycle Management
modal endpoint list --env prod
modal endpoint list --env prod --json
modal endpoint stop qwen3-5-4b --env prodStop tears down containers and stops compute billing. Autoscaling overrides are adjustable in the UI. Idle scale-to-zero → no compute charge while idle.
Endpoints vs Custom Servers vs Web Functions
| Need | Use |
| Fastest path to OpenAI-compatible LLM API | Endpoints (modal endpoint) |
| Custom engine process, sticky sessions, full Server knobs | @app.server (modal-servers) |
| FastAPI/ASGI app as a Function | modal-web-serving |
Batch .map / .spawn inference | Functions + modal-parallel-execution |
Inspect generated Server source: Endpoint dashboard Source panel.
Symptom Triage
401 on requests
- Create proxy token; pass both headers; with RBAC
allowthe Environment - Or recreate with
--unauthenticatedif public is intentional
Endpoint slow to become ready
- Large models / weight pulls — watch dashboard provisioning
- Prefer Volume-cached weights for custom checkpoints
Wrong model name in API calls
- Use the base/catalog repo id (or custom HF id), not the Endpoint display name
Reference Map
references/endpoint-cli.md— create/list/stop and auth flagsreferences/custom-weights-placement.md— HF/Volume weights and regionsreferences/when-to-use-endpoints.md— product boundaries
Guardrails
- Requires client/CLI with Endpoints support (1.5.1+)
- Secrets for proxy tokens are shown once at creation — store safely
- Region pinning multiplies cost — mention when recommending
--compute-region - Endpoints bill standard GPU/CPU rates while containers run
Key References
In this repository80 other files it gives its agents.
- a11y-accessibility-designSkill
- agentic-ui-patternsSkill
- ai-native-ui-designSkill
- ai-ui-anti-patternsSkill
- ai-ui-heuristicsSkill
- calm-technology-uiSkill
- conversion-growth-designSkill
- cross-platform-designSkill
- dark-mode-designSkill
- data-visualizationSkill
- design-systemsSkill
- design-thinking-processSkill
- error-empty-statesSkill
- ethical-design-patternsSkill
- form-uxSkill
- information-architectureSkill
- interaction-design-patternsSkill
- internationalization-uiSkill
- mobile-touch-designSkill
- modal-classes-lifecycleSkill
- modal-container-imagesSkill
- modal-dicts-queuesSkill
- modal-fundamentalsSkill
- modal-gpu-computeSkill
- modal-networkingSkill
- modal-observabilitySkill
- modal-parallel-executionSkill
- modal-sandboxesSkill
- modal-scaling-performanceSkill
- modal-schedulingSkill
- modal-secretsSkill
- modal-serversSkill
- modal-storageSkill
- modal-web-servingSkill
- modal-workspace-adminSkill
- motion-design-principlesSkill
- notifications-permissionsSkill
- onboarding-uxSkill
- rust-api-designSkill
- rust-async-programmingSkill
- rust-cargo-masterySkill
- rust-cli-applicationsSkill
- rust-clippy-lintsSkill
- rust-closures-iteratorsSkill
- rust-compiler-internalsSkill
- rust-concurrencySkill
- rust-design-patternsSkill
- rust-editionsSkill
- rust-embeddedSkill
- rust-error-handlingSkill
- rust-game-developmentSkill
- rust-lifetimes-borrowingSkill
- rust-macrosSkill
- rust-performanceSkill
- rust-rustdocSkill
- rust-rustup-toolchainSkill
- rust-smart-pointersSkill
- rust-testing-benchmarkingSkill
- rust-type-systemSkill
- rust-unsafe-ffiSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

