LLM API Guide

Liquid AI LFM3-1.7B (liquid/lfm-3-1.7b) OpenRouter API: Pricing & Free Limits

Call Liquid AI LFM3-1.7B on OpenRouter using liquid/lfm-3-1.7b ($0.08/$0.20 per 1M tokens as of 2026-11-10) or liquid/lfm-3-1.7b:free (20 RPM, up to 1,000 RPD).

Summary

  1. Use model ID liquid/lfm-3-1.7b for paid production requests ($0.08 input, $0.20 output as of 2026-11-10).
  2. The :free endpoint enforces 20 RPM on all accounts, and 50 RPD on accounts with under $10 in lifetime credits as of 2026-11-10.
  3. Avoid response_format with json_schema on LFM3-1.7B, which suffers a 72.81% failure rate in live telemetry.

Liquid AI's 1.73-billion-parameter agent model, LFM3-1.7B, is live on OpenRouter under two model IDs: liquid/lfm-3-1.7b for paid production traffic and liquid/lfm-3-1.7b:free for rate-limited free calls (as of 2026-11-10). Both endpoints expose the full 256K context window (262,144 tokens combined input and output) and run on Liquid AI's inference cluster at a median throughput of 252 to 268 tokens per second with a time-to-first-token (P50 latency) of 0.26 to 0.29 seconds.

The paid endpoint bills $0.08 per 1M input tokens, $0.20 per 1M output tokens, and $0.02 per 1M cached input tokens with zero platform markup (as of 2026-11-10). Because agent harnesses repeatedly send identical system prompts and tool definitions, live traffic on OpenRouter hits a 95.8% prompt cache rate, bringing the weighted average input cost down to $0.0225 per 1M tokens.

Specification / Rule Paid Endpoint (liquid/lfm-3-1.7b) Free Endpoint (liquid/lfm-3-1.7b:free)
OpenRouter Model ID liquid/lfm-3-1.7b liquid/lfm-3-1.7b:free
Parameter Count 1.73B (Tri-hybrid architecture) 1.73B (Tri-hybrid architecture)
Context Window 256K (262,144 tokens total) 256K (262,144 tokens total)
Input Pricing (as of 2026-11-10) $0.08 / 1M tokens ($0.02 cache read) $0.00 / 1M tokens
Output Pricing $0.20 / 1M tokens $0.00 / 1M tokens
Requests Per Minute (RPM) Dynamic (scales with account balance) 20 RPM hard cap
Requests Per Day (RPD) Unlimited (balance-dependent) 50 RPD (<$10 lifetime credits) / 1,000 RPD ($10+ credits)
Median Speed & Latency 268 tok/s · 0.29s TTFT 252 tok/s · 0.26s TTFT
Prompt Logging Policy Not used for model training Prompts and outputs retained to train Liquid models

If you want to understand how credit deductions, prompt caching, and zero-markup pass-through billing work across paid and free tiers, see my breakdown of how much OpenRouter costs compared to direct APIs.


On this page

OpenRouter :free Rate Limits (RPM, RPD, and the $10 Credit Rule)

Calling liquid/lfm-3-1.7b:free costs nothing in token fees, but your requests are governed by OpenRouter's platform-wide free tier limits and a different data retention policy. On the :free endpoint, Liquid AI retains prompts and completions to train future models. If you are routing customer PII, internal source code, or proprietary support tickets, use the paid liquid/lfm-3-1.7b ID instead.

Every account calling liquid/lfm-3-1.7b:free is capped at 20 requests per minute (RPM) regardless of account balance. Daily request quotas (RPD) depend on how much credit you have purchased over the lifetime of your OpenRouter account. If you signed up for a free account and have purchased less than $10 in lifetime credits, you get 50 requests per day (RPD) across all :free models combined. Once your lifetime credit purchases reach $10 or more, your daily cap jumps to 1,000 RPD. OpenRouter applies a $1 internal buffer on this check, so a $9 net credit balance after payment processing fees still unlocks the 1,000 RPD tier. Paying once unlocks the 1,000 RPD limit permanently—calling liquid/lfm-3-1.7b:free does not deduct from that credit balance.

Daily quotas reset at 00:00 UTC. When a burst of parallel classification or routing calls exceeds 20 RPM or exhausts your daily quota, the API returns HTTP 429 Too Many Requests along with X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and Retry-After headers. You can inspect your remaining daily quota at any time before dispatching a batch job by querying the key metadata endpoint:

bash
curl -s https://openrouter.ai/api/v1/key \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" | jq '.data.free_model_daily_requests'

That JSON object returns used, limit, and remaining counts for the current UTC day, allowing your router to fall back from liquid/lfm-3-1.7b:free to liquid/lfm-3-1.7b automatically when remaining hits zero.


Calling liquid/lfm-3-1.7b in Python and TypeScript

OpenRouter uses the standard OpenAI Chat Completions schema. You only need to point the official OpenAI SDK's base_url to https://openrouter.ai/api/v1 and pass your OpenRouter key. If you run into path-appending 404 errors or credential conflicts when overriding environment variables, check my guide on setting base_url and api_key in the OpenAI Python SDK.

According to Liquid AI's official LFM3 release documentation and the LFM3-1.7B Hugging Face model card, you should not use standard 0.7 or 1.0 temperatures for agentic routing or extraction. Liquid AI specifies temperature=0.1, top_k=50, and repetition_penalty=1.1 as the default decoding parameters for tool calling, instruction following, and general chat.

Python Setup (OpenAI SDK)

python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

response = client.chat.completions.create(
    extra_headers={
        "HTTP-Referer": "https://llmapiguide.com",
        "X-Title": "LLM API Guide Router",
    },
    model="liquid/lfm-3-1.7b:free",  # Swap to "liquid/lfm-3-1.7b" for production
    messages=[
        {
            "role": "system",
            "content": "Classify the support ticket into billing, auth, or outage, and assign priority high, medium, or low."
        },
        {
            "role": "user",
            "content": "Our production webhook endpoint has returned 502 Bad Gateway since 08:15 UTC."
        }
    ],
    temperature=0.1,
    extra_body={
        "top_k": 50,
        "repetition_penalty": 1.1,
    },
)

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

TypeScript / Node.js Setup (OpenAI SDK)

typescript
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
  defaultHeaders: {
    "HTTP-Referer": "https://llmapiguide.com",
    "X-Title": "LLM API Guide Router",
  },
});

async function runTriage() {
  const completion = await openai.chat.completions.create({
    model: "liquid/lfm-3-1.7b",
    messages: [
      {
        role: "system",
        content: "You are a fast intent router. Reply with the target service name only.",
      },
      {
        role: "user",
        content: "Invoice #9482 was charged twice on my corporate Visa card.",
      },
    ],
    temperature: 0.1,
    // Pass LFM3-specific sampling parameters via non-standard body fields if needed
  });

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

runTriage().catch(console.error);

One important quirk of LFM3-1.7B is its built-in <think> tag reasoning mode. By default, the checkpoint can emit internal chain-of-thought tokens wrapped in <think>...</think> before answering. On a 1.73B model, Liquid AI notes that reasoning mode is inconsistent and adds unnecessary latency for simple classification or tool dispatch. If you only want immediate routing or extraction, keep your system prompt direct or pass reasoning: { exclude: true } in the OpenRouter request body so thinking tokens do not slow down your pipeline.


Avoiding the 72.8% json_schema Error Rate: Use Tool Calling Instead

If you look at the marketing summary for LFM3-1.7B, both structured JSON extraction and tool calling are listed as core strengths. However, live production telemetry on OpenRouter reveals a critical operational gap between the two methods:

  1. Structured Output (response_format: { type: "json_schema" }) Error Rate: 72.81%
  2. Tool Calling (tools + tool_choice) Error Rate: 5.21%

When you pass response_format: { type: "json_schema", json_schema: ... }, the inference server applies grammar-constrained decoding masks over the model's 128,000-token vocabulary. On a compact 1.73B tri-hybrid checkpoint, strict grammar masking frequently forces the decoder into degenerate token loops, unescaped quote failures, or premature EOS truncation, causing nearly three out of four strict json_schema requests to fail validation.

By contrast, LFM3-1.7B underwent 3.5 trillion tokens of mid-training heavily weighted toward agentic traces and native XML function calling (<tool_call><function=...>). On the Berkeley Function Calling Leaderboard (BFCL V4), LFM3-1.7B scores 71.39, beating both Qwen3.5-4B (55.12) and Qwen3.5-9B (62.83).

Whenever you need structured JSON output from liquid/lfm-3-1.7b, never use response_format. Instead, wrap your desired JSON schema inside a single tool definition and force the model to call that tool.

python
import json
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key=os.environ.get("OPENROUTER_API_KEY"),
)

tools = [
    {
        "type": "function",
        "function": {
            "name": "extract_ticket_metadata",
            "description": "Extract structured triage metadata from a raw customer message.",
            "parameters": {
                "type": "object",
                "properties": {
                    "category": {
                        "type": "string",
                        "enum": ["billing", "authentication", "infrastructure", "other"]
                    },
                    "urgency": {
                        "type": "string",
                        "enum": ["low", "medium", "high", "critical"]
                    },
                    "account_id": {
                        "type": "string",
                        "description": "Customer account ID if mentioned, otherwise 'unknown'."
                    }
                },
                "required": ["category", "urgency", "account_id"]
            }
        }
    }
]

response = client.chat.completions.create(
    model="liquid/lfm-3-1.7b",
    messages=[
        {
            "role": "user",
            "content": "Account acct_88319 here—our SSO login loop is blocking all 40 engineers from signing in."
        }
    ],
    tools=tools,
    tool_choice={"type": "function", "function": {"name": "extract_ticket_metadata"}},
    temperature=0.1,
)

choice = response.choices[0]

# Always verify finish_reason and tool_calls presence
if choice.finish_reason == "tool_calls" and choice.message.tool_calls:
    arguments_json = choice.message.tool_calls[0].function.arguments
    parsed_data = json.loads(arguments_json)
    print("Extracted JSON:", parsed_data)
else:
    print("Fallback raw content:", choice.message.content)

Notice the check on choice.finish_reason == "tool_calls". As I documented when fixing LFM2.5-24B-A2B tool calling returning raw XML, Liquid AI models emit <|tool_call|> blocks natively. On OpenRouter's hosted Liquid AI provider, the chat template parser translates those tags into standard OpenAI message.tool_calls objects automatically. However, if you route requests through a secondary proxy or self-host the GGUF weights in llama.cpp without the updated chat template, the server will return finish_reason: "stop" and dump raw <tool_call><function=...> XML inside message.content. Checking finish_reason protects your application from silent NoneType crashes.


Architecture, Benchmarks, and Which Frontier Sub-Tasks to Replace

LFM3-1.7B is able to sustain a 256K context window and 260+ tok/s throughput at 1.73B parameters because it abandons the uniform all-attention Transformer stack. Instead, its 24 layers use a hardware-in-the-loop tri-hybrid architecture: 13 gated short convolution layers (with kernel size expanded from 3 in LFM2 to 7 in LFM3) handle local token patterns without quadratic memory cost, 5 sliding-window attention (SWA) layers with a 256-token window capture mid-range structure, and only 6 global attention layers span the full 256K context.

Those global attention layers use Head-wise Gated Attention (a sigmoid gate that shuts off attention heads when no relevant signal is present, suppressing activation outliers during 4-bit quantization) alongside Partial RoPE, which rotates only the high-frequency half of each head while leaving the low-frequency dimensions unrotated for position-agnostic content matching across long documents.

Benchmark Task Category LFM3-1.7B (1.7B) LFM2.5-2.6B (2.6B) Qwen3.5-4B (4.7B) Qwen3.5-9B (9.7B) Gemma 4 E4B (8B)
IFEval Strict Instruction Following 96.66 — 92.52 92.08 —
BFCL V4 Function & Tool Calling 71.39 — 55.12 62.83 —
LiveClaw End-to-End Agentic Execution 45.60 14.70 19.94 — 20.36
62-Benchmark Mean Unweighted Overall Average 71.40 57.60 71.70 73.40 64.00

Looking at those numbers and the live OpenRouter app rankings—where Kilo Code (380M tokens), Hermes Agent (273M tokens), OpenClaw (178M tokens), and Claude Code (41.5M tokens) are already the top consumers of liquid/lfm-3-1.7b—the right way to deploy this model is as a front-door filter in front of expensive models like Claude Sonnet 5.5 or GPT-6.1 Sol as of 2026-11-10.

First, use liquid/lfm-3-1.7b for deferred tool search and routing. When your agent connects to dozens of MCP servers exposing 100+ tools, stuffing every JSON tool schema into a frontier model prompt costs thousands of input tokens on every turn. LFM3-1.7B was trained specifically for deferred tool search: pass a lightweight directory of tool names to LFM3-1.7B at $0.08/1M tokens (or $0.02 cached) as of 2026-11-10, let it select the 2 or 3 relevant tools in 260 milliseconds, and inject only those schemas into your primary coding or reasoning model.

Second, use its 256K context window for RAG and log pre-filtering. Because 18 of its 24 layers use short convolutions and sliding-window attention, prefilling 50,000 tokens of raw server logs or documentation chunks into liquid/lfm-3-1.7b costs $0.004 per call as of 2026-11-10 and finishes in under half a second. Have LFM3-1.7B extract the relevant paragraphs or error stack traces before handing the condensed context to your main model.

Finally, respect the model's hard boundaries. Liquid AI explicitly advises against using LFM3-1.7B for agentic code generation or complex multi-step mathematical and logical reasoning. A 1.73B-parameter model does not have the capacity to plan multi-file refactors or resolve deep AST dependencies on its own. Keep liquid/lfm-3-1.7b strictly on tool routing, intent classification, and function-wrapped data extraction, and leave code synthesis to your frontier model.

Sources and checks

  1. liquid/lfm-3-1.7b
  2. liquid/lfm-3-1.7b:free
  3. OpenRouter's platform-wide free tier limits
  4. Liquid AI's official LFM3 release documentation
  5. LFM3-1.7B Hugging Face model card