Scalar API Reference
JustAPI includes Scalar as a built-in API documentation UI alongside Swagger UI and ReDoc.
Accessing Scalar
Section titled “Accessing Scalar”Start your app and open:
http://localhost:8000/scalarScalar provides a clean, modern interface for exploring and testing your API.
All Three Docs UIs
Section titled “All Three Docs UIs”JustAPI serves three documentation UIs out of the box:
| URL | UI | Description |
|---|---|---|
/docs |
Swagger UI | Classic interactive docs |
/redoc |
ReDoc | Clean, readable reference |
/scalar |
Scalar | Modern, fast, developer-friendly |
Configure Scalar URL
Section titled “Configure Scalar URL”from justapi import JustAPIApp
app = JustAPIApp( scalar_url="/scalar", # default docs_url="/docs", # Swagger UI redoc_url="/redoc", # ReDoc)Set any URL to None to disable:
app = JustAPIApp( scalar_url=None, # disable Scalar docs_url=None, # disable Swagger UI redoc_url="/redoc",)Scalar vs Swagger UI vs ReDoc
Section titled “Scalar vs Swagger UI vs ReDoc”| Feature | Scalar | Swagger UI | ReDoc |
|---|---|---|---|
| Speed | Fast | Medium | Medium |
| Design | Modern, minimal | Classic | Clean, readable |
| Try-it-out | Yes | Yes | No |
| Auth testing | Yes | Yes | No |
| Dark mode | Yes | No | No |
| Schema download | Yes | Yes | Yes |
Admin Token Protection
Section titled “Admin Token Protection”When admin_token is set, /scalar is protected:
app = JustAPIApp(admin_token="my-secret-token")Include the token in requests:
curl -H "Authorization: Bearer my-secret-token" http://localhost:8000/scalarSee Also
Section titled “See Also”- Metadata & Docs URLs — configuring doc endpoints
- Configure Swagger UI — Swagger customization
- API Reference — full API reference