---
title: LiquidAI: LFM2 24B A2B API | Text Generation | ModelsLab
description: Build with LiquidAI: LFM2 24B A2B API by Liquid. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/liquid/liquid-lfm-2-24b-a2b/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/liquid/liquid-lfm-2-24b-a2b/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T09:42:43.192165Z
---

LiquidAI: LFM2-24B-A2B
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/liquid-lfm-2-24b-a2b/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/liquid/liquid-lfm-2-24b-a2b.md)

liquid-lfm-2-24b-a2b liquid Closed Source Model $0.075000 / call

LiquidAI: LFM2-24B-A2B
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### LiquidAI: LFM2-24B-A2B

liquid liquid-lfm-2-24b-a2b

Copy model ID

PricingInput $0.03 / 1M tokens

Output $0.12 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.5-free)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [MiniMax: MiniMax M2.5 (free)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.5-free)

[G2](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-2b-it)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Gemma 2B It

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/google-gemma-2b-it)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.4-pro)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5.4 Pro

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.4-pro)

[Q2](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2-7B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen 2 (7B)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2-7B)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1-codex-max)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-5.1-Codex-Max

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-5.1-codex-max)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-3.5-turbo-instruct)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-3.5 Turbo Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-3.5-turbo-instruct)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1-distill-llama-70b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [DeepSeek: R1 Distill Llama 70B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1-distill-llama-70b)

[![Seed 1.8](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/4c050f2a-27fd-40d1-9b1e-7bfc9557709f.webp)](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/byteplus/seed-1.8)[Bytedance](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/byteplus)

 [Seed 1.8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/byteplus/seed-1.8)

[![Gemini 2.5 Pro](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/ede9a278-de62-47fb-a53d-99ee4c7b7abc.png)](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google/gemini-2.5-pro)[Google](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google)

 [Gemini 2.5 Pro

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/google/gemini-2.5-pro)

[GG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-2.5-flash-lite-preview-09-2025)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Google: Gemini 2.5 Flash Lite Preview 09-2025

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-2.5-flash-lite-preview-09-2025)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-3.2-11b-vision-instruct)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Meta: Llama 3.2 11B Vision Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-3.2-11b-vision-instruct)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta/meta-llama-Meta-Llama-3.1-70B-Instruct-Turbo)[ModelsLab](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta)

 [Meta Llama 3.1 70B Instruct Turbo

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta/meta-llama-Meta-Llama-3.1-70B-Instruct-Turbo)

[NN](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nvidia-NVIDIA-Nemotron-3-Super-120B-A12B-BF16)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Nvidia Nemotron 3 Super 120B A12b Bf16

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/nvidia-NVIDIA-Nemotron-3-Super-120B-A12B-BF16)

[XG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-3-beta)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [xAI: Grok 3 Beta

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-3-beta)

[XG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-4)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [xAI: Grok 4

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/x-ai-grok-4)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4-1106-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-4 Turbo (older v1106)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4-1106-preview)

[DR](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1-distill-qwen-32b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [DeepSeek: R1 Distill Qwen 32B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/deepseek-deepseek-r1-distill-qwen-32b)

[AC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-opus-4.1)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Anthropic: Claude Opus 4.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-opus-4.1)

About LiquidAI: LFM2-24B-A2B
---

LFM2-24B-A2B is the largest model in the LFM2 family of hybrid architectures designed for efficient on-device deployment. Built as a 24B parameter Mixture-of-Experts model with only 2B active parameters per...

### Technical Specifications

Model IDliquid-lfm-2-24b-a2bCategoryLLM ModelsTaskText GenerationPrice$0.075000 per million tokensAddedFebruary 26, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate LiquidAI: LFM2-24B-A2B into your application with a single API call. Get your API key from the [pricing page](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "liquid-lfm-2-24b-a2b",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/liquid/liquid-lfm-2-24b-a2b/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

LiquidAI: LFM2-24B-A2B API costs $0.075000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Learn more about LiquidAI: LFM2-24B-A2B](https://modelslab-frontend-v2-927501783998.us-east4.run.app/liquidai-lfm2-24b-a2b) [Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Liquid](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

LiquidAI: LFM2-24B-A2B FAQ
---

### What is LiquidAI: LFM2-24B-A2B?

LFM2-24B-A2B is the largest model in the LFM2 family of hybrid architectures designed for efficient on-device deployment. Built as a 24B parameter Mixture-of-Experts model with only 2B active parameters per...

### How do I use the LiquidAI: LFM2-24B-A2B API?

You can integrate LiquidAI: LFM2-24B-A2B into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "liquid-lfm-2-24b-a2b" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does LiquidAI: LFM2-24B-A2B cost?

LiquidAI: LFM2-24B-A2B costs $0.075000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the LiquidAI: LFM2-24B-A2B model ID?

The model ID for LiquidAI: LFM2-24B-A2B is "liquid-lfm-2-24b-a2b". Use this ID in your API requests to specify this model.

### Does LiquidAI: LFM2-24B-A2B have a free tier?

Yes, ModelsLab offers a free tier that lets you try LiquidAI: LFM2-24B-A2B and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-05-13*