Skip to main content

Synopsis

Description

Starts an HTTP REST API server for cluster and node scheduling workflows. This allows other services to query llmfit’s model compatibility analysis programmatically. The API is designed for:
  • Kubernetes schedulers and operators
  • Multi-node orchestration systems
  • CI/CD pipelines
  • Infrastructure-as-code tools
  • Monitoring and observability platforms

Options

string
default:"0.0.0.0"
Host interface to bind. Use “0.0.0.0” to listen on all interfaces, or “127.0.0.1” for localhost only.
integer
default:"8787"
Port to listen on.
string
Override GPU VRAM size (e.g., “32G”, “32000M”, “1.5T”).
integer
Cap context length used for memory estimation (tokens). Must be >= 1.

Usage Examples

Start Server

Override Detection

Production Deployment

API Endpoints

Health Check

Returns server health status. Response:

System Information

Returns detected hardware specifications. Response:

List Compatible Models

Returns models compatible with the node’s hardware. Query Parameters:
  • limit (integer): Maximum results to return
  • n (integer): Alias for limit
  • perfect (boolean): Show only perfect fits
  • min_fit (enum): Minimum fit level (perfect, good, marginal, too_tight)
  • runtime (enum): Filter by runtime (any, mlx, llamacpp)
  • use_case (enum): Filter by use case (general, coding, reasoning, chat, multimodal, embedding)
  • provider (string): Filter by provider name
  • search (string): Search query
  • sort (enum): Sort column (score, tps, params, mem, ctx, date, use)
  • include_too_tight (boolean): Include models that are too tight
  • max_context (integer): Context length cap for memory estimation
Response:

Top Recommendations

Returns top N recommended models for the node. Query Parameters: Same as /api/v1/models Response: Same format as /api/v1/models

Model by Name

Returns models matching the specified name (partial match). Path Parameters:
  • name (string): Model name or partial name
Query Parameters: Same as /api/v1/models Response: Same format as /api/v1/models

Example Output

Starting the Server

Testing Endpoints

Integration Examples

Kubernetes Scheduler

Python Client

Bash Script

Terraform Provider

Security Considerations

Bind to Localhost

For single-node use, bind to localhost:

Reverse Proxy

Use nginx or similar for authentication:

Firewall Rules

Network Policy (Kubernetes)

  • system - Show system specs
  • fit - Find compatible models
  • recommend - Get recommendations
  • info - Model information