API Reference

Authentication

All API requests require authentication via Bearer token:

Authorization: Bearer sol_sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Inference API (OpenAI-Compatible)

POST /v1/chat/completions

Create a chat completion.

{
  "model": "llama3.2:8b",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  "temperature": 0.7,
  "max_tokens": 1024,
  "stream": false
}

POST /v1/embeddings

Generate text embeddings.

{
  "model": "nomic-embed-text",
  "input": "Hello world"
}

GET /v1/models

List available models (OpenAI-compatible format).

Management API

Management endpoints require admin-scoped API keys for remote access. Localhost requests bypass auth (for dashboard access).

Method Path Description
GET /api/v1/health Health check (no auth)
GET /api/v1/keys List API keys
POST /api/v1/keys Create API key
DELETE /api/v1/keys/:id Revoke API key
POST /api/v1/models/pull Pull a model
DELETE /api/v1/models/:name Delete a model
GET /api/v1/analytics/requests Request log
GET /api/v1/analytics/usage Usage statistics
GET /api/v1/tunnel/status Tunnel status
POST /api/v1/tunnel/enable Enable tunnel
POST /api/v1/tunnel/disable Disable tunnel

Error Responses

{
  "error": {
    "message": "description of what went wrong",
    "type": "Unauthorized"
  }
}