Skip to content
Back to skills

Server Basics

ASecurity

"Serve models and custom pipelines with LitServe LitAPI and

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
devopsfastapidockerapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill server-basics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Server Basics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Server Basics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-server-basics/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-server-basics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: server-basics
description: "Serve models and custom pipelines with LitServe LitAPI and
  LitServer, including batching, streaming, auth, callbacks, loggers,
  middleware, payloads, multi-endpoints, clients, Docker, and deployment."
metadata:
  disco-role: operating
disable-model-invocation: true
license: Apache 2.0
---

# server-basics

Use this sub-skill when a task asks how to build, run, deploy, or debug a general
LitServe server. It covers the standard `LitAPI` + `LitServer` workflow and the
HTTP-serving surfaces around it.

## Use this for

- Serving a custom model or pipeline with `litserve.LitAPI` and `litserve.LitServer`.
- Choosing `accelerator`, `devices`, `workers_per_device`, `timeout`, `num_api_servers`,
  host, port, logging, and client-generation settings.
- Adding batching, streaming, async handlers, auth, callbacks, loggers, middleware,
  request tracking, payload limits, health/info/shutdown endpoints, and multiple API paths.
- Handling JSON, form data, multipart file uploads, and base64 image input/output.
- Generating a local Dockerfile with `litserve dockerize` or deploying through the
  Lightning CLI passthrough.

## Route elsewhere

- OpenAI-compatible chat completions or embeddings belong in
  [`../openai-specs/SKILL.md`](../openai-specs/SKILL.md).
- MCP tool exposure and MCP server mounting belong in [`../mcp/SKILL.md`](../mcp/SKILL.md).
- Torch/CUDA benchmark harnesses, FastAPI parity tests, throughput benchmark scripts,
  and transformer/vision benchmark reproduction are intentionally out of scope.
- Start from the root LitServe router when the user request spans multiple sub-skills:
  [`../../SKILL.md`](../../SKILL.md).

## Reference map

Read these bundled references instead of opening the source repository:

- [`references/api-reference.md`](references/api-reference.md): constructor defaults,
  hooks, endpoint registration, auth, callbacks, loggers, middleware, client generation,
  and Docker/deployment knobs.
- [`references/workflows.md`](references/workflows.md): task recipes for serving,
  batching, streaming, async, files, images, auth, multi-endpoints, client generation,
  Docker, and deployment.
- [`references/data-formats.md`](references/data-formats.md): JSON, form, multipart,
  Pydantic, image, and streaming payload contracts.
- [`references/troubleshooting.md`](references/troubleshooting.md): common validation
  errors, readiness issues, auth mismatches, client/Docker problems, and excluded paths.

## Bundled examples

- [`scripts/minimal_server.py`](scripts/minimal_server.py): safe CPU square server with
  port, host, accelerator, batching, workers, and client-generation options.
- [`scripts/file_upload_server.py`](scripts/file_upload_server.py): multipart file and
  form-data server with an optional payload-size limit.
- [`scripts/image_roundtrip_server.py`](scripts/image_roundtrip_server.py): base64 image
  request/response server using `ImageInput` and `ImageOutput`.

## Operating notes

- Prefer putting `max_batch_size`, `batch_timeout`, `api_path`, `stream`, `loop`, `spec`,
  `mcp`, and `enable_async` on the `LitAPI` constructor. The same settings on
  `LitServer` are deprecated compatibility paths.
- Load heavy model state in `setup(device)`, not in `__init__`.
- For local development use `host="127.0.0.1"`; for containers and remote deployment use
  `host="0.0.0.0"`.
- Do not use this sub-skill to implement OpenAI or MCP specs directly; route those to the
  sibling sub-skills so their endpoint contracts remain precise.

Files in this skill

  • SKILL.md3.5 KB
  • references/api-reference.md14.9 KB
  • references/data-formats.md9 KB
  • references/troubleshooting.md11.6 KB
  • references/workflows.md13.8 KB
  • scripts/file_upload_server.py3.7 KB
  • scripts/image_roundtrip_server.py3.7 KB
  • scripts/minimal_server.py3.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.