API Documentation

The Limitless Router API is OpenAI-compatible. Base URL: https://limitlessrouter.com/api/v1

Quick Start

  1. 1. Create an account
    Go to /register and sign up with your email.
  2. 2. Get an API key
    After registering, go to your dashboard and create an API key. Copy it immediately — it's only shown once.
  3. 3. Buy credits
    Go to /dashboard/credits and purchase credits with card or crypto.
  4. 4. Create a file and run it
    Create a file called test.py (or test.js / test.sh):

Python — test.py

pip install openai

# test.py
from openai import OpenAI

client = OpenAI(
    api_key="lr_your_api_key",
    base_url="https://limitlessrouter.com/api/v1"
)

response = client.chat.completions.create(
    model="limitless-router_demo/LiquidAI-LFM2.5-230M",
    messages=[{"role": "user", "content": "Hello!"}],
    max_tokens=256
)

print(response.choices[0].message.content)

# Run it:
# python test.py

JavaScript — test.js

npm install openai

// test.js
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "lr_your_api_key",
  baseURL: "https://limitlessrouter.com/api/v1",
});

const response = await client.chat.completions.create({
  model: "limitless-router_demo/LiquidAI-LFM2.5-230M",
  messages: [{ role: "user", content: "Hello!" }],
  max_tokens: 256,
});

console.log(response.choices[0].message.content);

// Run it:
// node test.js

cURL — test.sh

#!/bin/bash
# test.sh
curl https://limitlessrouter.com/api/v1/chat/completions \
  -H "Authorization: Bearer lr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "limitless-router_demo/LiquidAI-LFM2.5-230M",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

# Run it:
# bash test.sh

Replace lr_your_api_key with your actual API key from the dashboard.

Authentication

All API requests require a Bearer token in the Authorization header. Generate API keys from your dashboard.

Authorization: Bearer lr_your_api_key

Chat Completions

Create a chat completion. Compatible with the OpenAI chat completions endpoint.

POST /api/v1/chat/completions

{
  "model": "limitless-router_demo/LiquidAI-LFM2.5-230M",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  "temperature": 0.7,
  "max_tokens": 256
}

Response

{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "limitless-router_demo/LiquidAI-LFM2.5-230M",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 10,
    "total_tokens": 30
  }
}

Parameters

Parameter Type Required Description
model string Yes Model slug (e.g. limitless-router_demo/LiquidAI-LFM2.5-230M)
messages array Yes Array of message objects with role and content
temperature number No Sampling temperature (0-2). Default: 0.7
max_tokens number No Max tokens to generate. Default: 512

List Models

GET /api/v1/models

Returns all published models with their pricing and available quants. No authentication required.

Response

{
  "object": "list",
  "data": [
    {
      "id": "limitless-router_demo/LiquidAI-LFM2.5-230M",
      "name": "LiquidAI LFM2.5 230M",
      "description": "A compact 230M parameter model...",
      "org": "limitless-router_demo",
      "created": 1234567890,
      "owned_by": "limitless-router_demo",
      "pricing": {
        "per_request_cents": 0.02
      },
      "format": "gguf",
      "context_length": 2048
    }
  ]
}

API Key Management

Manage your API keys programmatically. All endpoints require authentication via session cookie or Bearer token.

List API Keys

GET /api/v1/dashboard/keys
{
  "keys": [
    {
      "id": "uuid",
      "label": "default",
      "created_at": "2026-01-01T00:00:00Z",
      "last_used_at": null
    }
  ]
}

Create API Key

POST /api/v1/dashboard/keys

{
  "label": "my-app"
}
{
  "key": "lr_xxxxxxxxxxxxxxxxxxxxxxxx",
  "id": "uuid",
  "label": "my-app"
}

The full API key is only returned once at creation. Store it securely.

Delete API Key

DELETE /api/v1/dashboard/keys

{
  "id": "uuid"
}

Account & Credits

Get Account Info

GET /api/v1/keys
{
  "email": "user@example.com",
  "balance_cents": 500,
  "keys": 3
}

Buy Credits

POST /api/v1/credits/buy

{
  "amount_cents": 500
}
{
  "payment_url": "https://pay.xptp.io/..."
}

Redirect the user to the returned payment_url to complete payment. Credits are added automatically when payment is confirmed via webhook.

GPU Health

GET /api/v1/health
{
  "online": true,
  "checked_at": "2026-01-01T00:00:00.000Z"
}

Check if the GPU server is online and ready to serve inference requests. No authentication required.

Submit a Model

POST /api/v1/submit

{
  "submitter_name": "Your Name",
  "submitter_email": "you@example.com",
  "model_name": "MyModel 7B",
  "org": "my-org",
  "description": "A 7B parameter model...",
  "format": "gguf",
  "file_url": "https://huggingface.co/...",
  "file_size_gb": 4.5,
  "context_length": 4096,
  "notes": "Optional notes"
}

Submits a model for review. Our team will review and publish approved models to the catalog.

Errors

Status Meaning
400 Bad request — missing or invalid parameters
401 Invalid or missing API key
402 Insufficient credits
404 Model not found
429 Rate limited
500 Internal server error
503 GPU offline — try again later

Pricing

Each model has a per-request price. Credits are deducted from your balance per successful request. Failed requests (GPU offline, errors) are not charged.

Current pricing reflects early-stage compute constraints. Prices will decrease as compute capacity scales.

Rate Limits

Rate limits are currently generous during the early stage. Abuse detection is in place. Excessive requests may be throttled. If you need higher limits, contact us.