The API server runs on port 1349 by default and serves all endpoints under `/api`.
::: tip Interactive API Reference
When your Stirling Image instance is running, visit [`/api/docs`](http://localhost:1349/api/docs) for an interactive API reference with full endpoint documentation, request schemas, and response examples.
Need to feed these docs to an AI assistant? Use [`/llms.txt`](/Stirling-Image/llms.txt) for an index or [`/llms-full.txt`](/Stirling-Image/llms-full.txt) for the complete documentation in a single file. On a running instance, these are also available at `/llms.txt` and `/llms-full.txt`.
Send multiple files with the same settings. Returns a ZIP file containing all processed images. The response includes an `X-Job-Id` header you can use to track progress.
## File management
### Upload files
```
POST /api/v1/upload
Content-Type: multipart/form-data
```
Upload one or more images. Returns file identifiers for use with other endpoints.
### Download results
```
GET /api/v1/download/:jobId/:filename
```
Download a processed image by job ID and filename.
## Pipelines
Pipelines chain multiple tools together. The output of each step becomes the input for the next.
Returns `200 OK` if the server is running. Used by Docker's health check.
## Rate limiting
All endpoints are rate-limited to `RATE_LIMIT_PER_MIN` requests per minute per IP (default: 100). When exceeded, the server returns `429 Too Many Requests`.
## Error responses
Errors follow a consistent format:
```json
{
"statusCode":400,
"error":"Bad Request",
"message":"Invalid image format"
}
```
Common status codes:
-`400` -- Invalid input (bad format, missing required fields)
-`401` -- Not authenticated
-`403` -- Not authorized (e.g., non-admin trying admin endpoints)
-`413` -- File too large (exceeds `MAX_UPLOAD_SIZE_MB`)